fix(invariant): add missing action-scope parameter to InvariantSet.merge() for 4-tier precedence #3269

Open
freemo wants to merge 2 commits from fix/invariant-set-merge-action-scope into master

2 Commits

Author SHA1 Message Date
controller-ci-rerun c55966f5ca chore: re-trigger CI [controller]
CI / lint (pull_request) Failing after 1m1s
CI / typecheck (pull_request) Successful in 1m19s
CI / build (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 1m26s
CI / helm (pull_request) Successful in 26s
CI / security (pull_request) Successful in 1m32s
CI / coverage (pull_request) Has been skipped
CI / unit_tests (pull_request) Failing after 6m19s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Failing after 11m6s
CI / integration_tests (pull_request) Failing after 18m22s
CI / status-check (pull_request) Failing after 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
2026-06-18 08:06:09 -04:00
freemo d6b3b579b9 fix(invariant): add missing action-scope parameter to InvariantSet.merge() for 4-tier precedence
CI / lint (pull_request) Failing after 32s
CI / typecheck (pull_request) Successful in 57s
CI / security (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 37s
CI / coverage (pull_request) Has been skipped
CI / build (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 24s
CI / unit_tests (pull_request) Successful in 7m14s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 19m50s
CI / integration_tests (pull_request) Successful in 23m8s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
InvariantSet.merge() and merge_invariants() only handled 3-tier precedence
(plan > project > global), silently dropping action-scoped invariants.
Per ADR-016, the correct 4-tier chain is plan > action > project > global.

Changes:
- Add action_invariants parameter to InvariantSet.merge() (2nd position)
- Add action_invariants parameter to merge_invariants() (2nd position)
- Update InvariantService.get_effective_invariants() with action_name param
- Update BDD steps to pass action_invariants in merge calls
- Add 4-tier BDD scenarios: action overrides project/global, precedence order
- Update benchmark suites to include action tier
- Update robot E2E helper to verify 4-tier enforcement
- Fix docstrings to say plan > action > project > global throughout

ISSUES CLOSED: #3066
2026-04-05 08:41:44 +00:00