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

Merged
freemo merged 1 commits 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 added the
Type
Feature
label 2026-03-04 09:39:20 +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 to 3487be53e8 2026-03-04 17:00:37 +00:00 Compare
freemo force-pushed feature/m6-invariant-reconciliation from 3487be53e8 to c2400c29fa 2026-03-04 19:08:41 +00:00 Compare
freemo force-pushed feature/m6-invariant-reconciliation from c2400c29fa to abd4c6de49 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 Label
Type
Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cleveragents/cleveragents-core#561