fix(invariant): restore ACTION scope in merge_invariants and InvariantSet.merge #11233
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
overdue
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!11233
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pr-fix-11196"
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
merge_invariants()andInvariantSet.merge(), correcting the precedence chain fromplan > project > globalto spec-compliantplan > action > project > global.InvariantService.get_effective_invariants()to accept anaction_nameparameter and collect/action-filter action-scoped invariants.Files changed
src/cleveragents/domain/models/core/invariant.pysrc/cleveragents/application/services/invariant_service.pyfeatures/steps/invariant_models_steps.pyfeatures/invariant_action_scope_merge.featurerobot/helper_m3_e2e_verification.pybenchmarks/invariant_merge_bench.pyCHANGELOG.mdCloses #9126.
Blocked by: #9126
CI Flag Review — PR #11233
No substantive code review was conducted. Per company policy, all mandatory CI gates must pass before a PR can be approved and merged.
The following required CI checks are failing on commit
5900673:Required gates per company policy: lint, typecheck, security, unit_tests, and coverage must all be passing.
Once the author ensures CI is configured and a green run passes on this PR, a full code review will be conducted. Please resolve the underlying CI failures — they may stem from merge conflicts with
master(this PR has been flagged as stale with conflicts) or from substantive issues introduced by these changes.CI Gate — Review Blocked (PR #11233)
No full code review was performed because the mandatory CI checks are failing. All required gates — lint, typecheck, security, unit_tests, and coverage — must pass before this PR can be approved and merged.
Failing checks on commit
5900673:Please resolve the CI failures and confirm that a green CI run exists on this PR. A full review will be conducted once CI is passing.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
5900673d506a67bd5b2c[CONTROLLER-DEFER:Gate 1:full_duplicate]
This PR has been deferred for re-evaluation. The controller has stepped back
from processing it. To resume, a human or scope-evaluator must clear the
deferral flag AND re-add the auto/sentinel label.
Decision:
To clear the deferral (SQL):
UPDATE workflows SET deferred_reason=NULL,
deferred_at=NULL,
deferred_target_workflow_id=NULL
WHERE workflow_id = 13;
Audit ID: 1392
Automated by the CleverAgents controller pipeline.
Identity: HAL9000 (pipeline action)
🌱 Grooming: proceed — PR cleared for processing.
(check
no_duplicates, categoryno_duplicates)Clear topical overlap with #3269 (InvariantSet.merge() action-scope) and #3329 (get_effective_invariants() action_name param), but PR #11233 is more comprehensive—combining both fixes plus restoration of merge_invariants() ACTION tier. By the canonical-selection heuristic (pick the more-complete), #11233 is canonical, not duplicate. The 0/0/0 diff stats on the anchor are suspicious vs. claimed +182/−18 across 7 files and warrant verification.
📋 Estimate: tier 1.
7-file, +182/-18 change spanning domain model, application service, BDD steps, a new feature file, robot helpers, and benchmarks. The core logic adds a fourth tier (ACTION) to the invariant precedence chain and threads a new
action_nameparameter throughInvariantService.get_effective_invariants(), requiring all call sites to be updated. Test burden is significant: new BDD feature file plus step-definition, robot helper, and benchmark updates. Architectural impact is moderate — the service API changes but the scope is bounded to the invariant subsystem. Clear task definition, CI green. Standard multi-file engineering work; well above tier-0 threshold (new logic + test infrastructure), does not reach tier-2 (no concurrency/state hazards, no repo-wide architectural consequences).6a67bd5b2cbd19d1685e6248608b2a9647e8c280(attempt #10, tier 1)
🔧 Implementer attempt —
rebased.Pushed 1 commit:
9647e8c.✅ Approved
Reviewed at commit
9647e8c.Confidence: high.
Claimed by
merge_drive.py(pid 231638) until2026-06-19T00:31:47.653126+00:00.This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.
9647e8c280626a5acdabApproved by the controller reviewer stage (workflow 13).