fix(test): add root_plan_id to raw SQL in plan_phase_migration constraint tests #10806
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!10806
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m3-plan-phase-migration-raw-sql-root-plan-id"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix the
plan_phase_migrationBDD feature tests to properly test the database CHECK constraint on thephasecolumn. The raw SQL in the test step was missing theroot_plan_idcolumn, causing SQLite to reject the insert for the wrong reason (NOT NULL violation instead of CHECK constraint violation). This change addsroot_plan_idto the INSERT statement so the test fails specifically due to the CHECK constraint violation as intended.Also updates the
tdd_a2a_sdk_dependency.featureto reference the correctClientclass name (instead ofA2AClient) matching the actual a2a SDK API.Changes
step_try_insert_plan_with_phase_and_stateinfeatures/steps/plan_phase_migration_steps.pyto includeroot_plan_idcolumn in the raw SQL INSERT statementroot_plan_idto the same value asplan_idfor root plan testingphasecolumn, not the NOT NULL constraint onroot_plan_idfeatures/tdd_a2a_sdk_dependency.featureto useClientinstead ofA2AClientto match the actual a2a SDK APITesting
The following BDD scenarios now properly test the CHECK constraint:
These tests verify that the database correctly rejects invalid phase values through the CHECK constraint mechanism.
Issue Reference
Closes #9411
Automated by CleverAgents Bot
Agent: implementation-worker
Implementation Attempt — Tier 1: haiku — Success
The PR correctly adds the missing
root_plan_idcolumn to the raw SQL INSERT statement in thestep_try_insert_plan_with_phase_and_statefunction. This allows the test to properly exercise the CHECK constraint on thephasecolumn instead of failing on the NOT NULL constraint forroot_plan_id.Changes verified:
root_plan_idto the INSERT column list:rpidparameter bindingroot_plan_idto the same value asplan_id(for root plan testing)Quality gates status:
The code changes are syntactically correct and logically sound. The fix properly addresses the issue described in #9411 by ensuring the test fails for the correct reason (CHECK constraint violation on phase column).
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
Implementation Attempt — Tier 1: haiku — Success
The PR correctly adds the missing
root_plan_idcolumn to the raw SQL INSERT statement in thestep_try_insert_plan_with_phase_and_statefunction. This allows the test to properly exercise the CHECK constraint on thephasecolumn instead of failing on the NOT NULL constraint forroot_plan_id.Changes verified:
root_plan_idto the INSERT column list:rpidparameter bindingroot_plan_idto the same value asplan_id(for root plan testing)Quality gates status:
The code changes are syntactically correct and logically sound. The fix properly addresses the issue described in #9825 by ensuring the test fails for the correct reason (CHECK constraint violation on phase column).
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
Implementation Attempt — Tier 3: sonnet — Success
Root Cause Analysis
The CI
unit_testsfailure was caused by an outdated scenario infeatures/tdd_a2a_sdk_dependency.feature. The scenario referencedA2AClientas the class name in thea2a.clientmodule, but the actual a2a SDK usesClient(notA2AClient). This was fixed in master via commit6bad73babut the PR branch had not picked up this change.Changes Made
features/tdd_a2a_sdk_dependency.feature: renamed scenario from "a2a SDK provides the A2AClient class" to "a2a SDK provides the Client class", and updated the step to accessClientinstead ofA2AClientQuality Gates
The fix is minimal and targeted: only the feature file scenario name and step text were updated to match the actual a2a SDK API. The original PR fix (adding
root_plan_idto raw SQL inplan_phase_migration_steps.py) remains intact.Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
Implementation Attempt — Tier 3: sonnet — Success
Summary
Fixed all outstanding issues with this PR (successor to PR #9825).
Changes Made
Closes #9825→Closes #9411(the original issue this PR addresses)v3.2.0(ID: 105) matching the linked issue #9411Code Verification
The two code changes in this PR are correct:
features/steps/plan_phase_migration_steps.py:root_plan_idproperly included in raw SQL INSERT so the CHECK constraint (not NOT NULL) is exercisedfeatures/tdd_a2a_sdk_dependency.feature: UsesClient(notA2AClient) matching the actual a2a SDK APIQuality Gate Status
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
CI checks are failing for this PR. The following required checks must pass before approval:
CI / lint (pull_request): Failing after 1sCI / status-check (pull_request): Failing after 3sPer company policy, all CI gates (lint, typecheck, security, unit_tests, coverage) must pass before a PR can be approved and merged. Please fix the linting errors and ensure all CI checks pass.
Note: The code changes themselves look correct for addressing issue #9411 (adding
root_plan_idto raw SQL to properly test CHECK constraints), but CI failures block approval. Once CI is green, this PR will be re-reviewed promptly.Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
Implementation Attempt — Tier 1: haiku — Success
Root Cause Analysis
The CI failures (
lint,quality,status-check) in the previous run (triggered by commit70612e05) were infrastructure-related — all three jobs failed after 1s, which is consistent with runner/infrastructure issues rather than code failures. The other CI jobs in the same run (unit_tests,integration_tests,e2e_tests,typecheck,security,build,helm,push-validation) all passed successfully.Actions Taken
nox -e lint✓ (All checks passed)nox -e format -- --check✓ (1942 files already formatted)nox -e typecheck✓ (0 errors, 3 pre-existing warnings)nox -e complexity✓ (Average complexity: A)54385d5b) to retrigger CI with a fresh runnerCode Verification
The two code changes in this PR remain correct and unchanged:
features/steps/plan_phase_migration_steps.py:root_plan_idproperly included in raw SQL INSERT so the CHECK constraint (not NOT NULL) is exercisedfeatures/tdd_a2a_sdk_dependency.feature: UsesClient(notA2AClient) matching the actual a2a SDK APIQuality Gate Status
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
Review submitted
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker