feat(actor): implement built-in invariant reconciliation actor #561

Merged
freemo merged 1 commit from feature/m6-invariant-reconciliation into master 2026-03-04 21:00:08 +00:00
Owner

Summary

Implements the built-in invariant reconciliation actor as specified in docs/specification.md § Invariants and § Strategize Phase.

Changes

  • InvariantReconciliationActor — built-in actor that runs at the start of Strategize phase
  • Multi-scope invariant collection — gathers invariants from 4 scopes: global, project, action, plan
  • Conflict detection — identifies contradictions between invariants at different scopes
  • Conflict resolution — higher specificity wins (plan > action > project > global) unless global invariant is marked non_overridable
  • invariant_enforced decision recording — records a decision for each active invariant in the reconciled set
  • Reconciled InvariantSet — produced and made available to subsequent actors in the Strategize phase

Testing

  • Behave BDD scenarios: single-scope, multi-scope compatible, conflicting with specificity resolution, non_overridable enforcement
  • Robot Framework integration tests for reconciliation followed by actor execution
  • ASV benchmarks for reconciliation throughput with varying scope sizes

Quality Gates

  • Full nox suite: 11/11 sessions passed
  • nox -s typecheck — 0 errors (Pyright strict)
  • nox -s unit_tests — 257 features, 0 failures
  • nox -s coverage_report — 97%

Closes #549

## Summary Implements the built-in invariant reconciliation actor as specified in docs/specification.md § Invariants and § Strategize Phase. ### Changes - **`InvariantReconciliationActor`** — built-in actor that runs at the start of Strategize phase - **Multi-scope invariant collection** — gathers invariants from 4 scopes: global, project, action, plan - **Conflict detection** — identifies contradictions between invariants at different scopes - **Conflict resolution** — higher specificity wins (plan > action > project > global) unless global invariant is marked `non_overridable` - **`invariant_enforced` decision recording** — records a decision for each active invariant in the reconciled set - **Reconciled `InvariantSet`** — produced and made available to subsequent actors in the Strategize phase ### Testing - Behave BDD scenarios: single-scope, multi-scope compatible, conflicting with specificity resolution, non_overridable enforcement - Robot Framework integration tests for reconciliation followed by actor execution - ASV benchmarks for reconciliation throughput with varying scope sizes ### Quality Gates - Full `nox` suite: 11/11 sessions passed - `nox -s typecheck` — 0 errors (Pyright strict) - `nox -s unit_tests` — 257 features, 0 failures - `nox -s coverage_report` — 97% Closes #549
freemo added this to the v3.5.0 milestone 2026-03-04 09:39:19 +00:00
freemo scheduled this pull request to auto merge when all checks succeed 2026-03-04 15:37:50 +00:00
freemo force-pushed feature/m6-invariant-reconciliation from 6c42ea0e02
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 18s
CI / typecheck (pull_request) Successful in 34s
CI / security (pull_request) Successful in 36s
CI / unit_tests (pull_request) Successful in 2m7s
CI / docker (pull_request) Successful in 42s
CI / integration_tests (pull_request) Successful in 3m10s
CI / coverage (pull_request) Successful in 4m8s
CI / benchmark-regression (pull_request) Successful in 25m31s
to 3487be53e8
All checks were successful
CI / lint (pull_request) Successful in 14s
CI / typecheck (pull_request) Successful in 32s
CI / quality (pull_request) Successful in 16s
CI / security (pull_request) Successful in 31s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 15s
CI / unit_tests (pull_request) Successful in 3m15s
CI / integration_tests (pull_request) Successful in 5m17s
CI / coverage (pull_request) Successful in 6m7s
CI / docker (pull_request) Successful in 3m16s
CI / benchmark-regression (pull_request) Successful in 26m47s
2026-03-04 17:00:37 +00:00
Compare
freemo force-pushed feature/m6-invariant-reconciliation from 3487be53e8
All checks were successful
CI / lint (pull_request) Successful in 14s
CI / typecheck (pull_request) Successful in 32s
CI / quality (pull_request) Successful in 16s
CI / security (pull_request) Successful in 31s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 15s
CI / unit_tests (pull_request) Successful in 3m15s
CI / integration_tests (pull_request) Successful in 5m17s
CI / coverage (pull_request) Successful in 6m7s
CI / docker (pull_request) Successful in 3m16s
CI / benchmark-regression (pull_request) Successful in 26m47s
to c2400c29fa
Some checks failed
CI / lint (pull_request) Successful in 1m13s
CI / typecheck (pull_request) Successful in 34s
CI / benchmark-publish (pull_request) Has been skipped
CI / security (pull_request) Successful in 36s
CI / build (pull_request) Successful in 14s
CI / quality (pull_request) Successful in 1m18s
CI / unit_tests (pull_request) Successful in 3m47s
CI / docker (pull_request) Successful in 42s
CI / integration_tests (pull_request) Failing after 4m50s
CI / coverage (pull_request) Successful in 4m42s
CI / benchmark-regression (pull_request) Successful in 25m55s
2026-03-04 19:08:41 +00:00
Compare
freemo force-pushed feature/m6-invariant-reconciliation from c2400c29fa
Some checks failed
CI / lint (pull_request) Successful in 1m13s
CI / typecheck (pull_request) Successful in 34s
CI / benchmark-publish (pull_request) Has been skipped
CI / security (pull_request) Successful in 36s
CI / build (pull_request) Successful in 14s
CI / quality (pull_request) Successful in 1m18s
CI / unit_tests (pull_request) Successful in 3m47s
CI / docker (pull_request) Successful in 42s
CI / integration_tests (pull_request) Failing after 4m50s
CI / coverage (pull_request) Successful in 4m42s
CI / benchmark-regression (pull_request) Successful in 25m55s
to abd4c6de49
All checks were successful
CI / lint (pull_request) Successful in 14s
CI / typecheck (pull_request) Successful in 32s
CI / security (pull_request) Successful in 30s
CI / quality (pull_request) Successful in 18s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 1m59s
CI / integration_tests (pull_request) Successful in 3m47s
CI / docker (pull_request) Successful in 47s
CI / coverage (pull_request) Successful in 5m48s
CI / lint (push) Successful in 13s
CI / typecheck (push) Successful in 35s
CI / security (push) Successful in 34s
CI / quality (push) Successful in 19s
CI / build (push) Successful in 17s
CI / unit_tests (push) Successful in 2m27s
CI / integration_tests (push) Successful in 2m59s
CI / benchmark-regression (push) Has been skipped
CI / coverage (push) Successful in 4m9s
CI / benchmark-publish (push) Successful in 16m43s
CI / docker (push) Successful in 39s
CI / benchmark-regression (pull_request) Successful in 30m2s
2026-03-04 20:26:47 +00:00
Compare
freemo merged commit abd4c6de49 into master 2026-03-04 21:00:08 +00:00
freemo deleted branch feature/m6-invariant-reconciliation 2026-03-04 21:00:09 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!561
No description provided.