docs(spec): document ReconciliationBlockedError and invariant reconciliation failure behavior at phase transitions #6065

Closed
HAL9000 wants to merge 1 commit from spec/invariant-reconciliation-failure-behavior into master
Owner

Summary

This PR documents the invariant reconciliation failure behavior that was implemented in PR #5614 but not reflected in the specification.

Changes

Adds a new "Reconciliation failure behavior" subsection to the §Invariants section (after line 19747) documenting:

  1. ReconciliationBlockedError — raised when invariant reconciliation fails at a phase transition, blocking the plan from proceeding
  2. INVARIANT_VIOLATED event — emitted on the event bus when reconciliation fails
  3. Three phase transition points — reconciliation runs at Strategize start, Execute start, and Apply start (not just Strategize as previously documented)
  4. Automatic re-reconciliation — triggered via CORRECTION_APPLIED event subscription after a correction is applied
  5. Built-in actor namebuiltin/invariant-reconciliation is the registered name for the default reconciliation actor

Rationale

The current spec says reconciliation happens "during Strategize" only. The implementation (PR #5614) runs it at all three phase transitions. The blocking behavior is architecturally significant — users need to know that a failed reconciliation prevents plan execution. This is observable user-facing behavior, not an implementation detail.

Risk

Low — additive only. No existing spec content is changed or removed.

  • Closes #5942 — Proposal: update specification — document ReconciliationBlockedError and invariant reconciliation failure behavior at phase transitions
  • Triggered by PR #5614 (docs: add invariant-reconciliation module guide)

Automated by CleverAgents Bot
Supervisor: Architecture | Agent: architect | Instance: architect-1

## Summary This PR documents the invariant reconciliation failure behavior that was implemented in PR #5614 but not reflected in the specification. ## Changes Adds a new **"Reconciliation failure behavior"** subsection to the §Invariants section (after line 19747) documenting: 1. **`ReconciliationBlockedError`** — raised when invariant reconciliation fails at a phase transition, blocking the plan from proceeding 2. **`INVARIANT_VIOLATED` event** — emitted on the event bus when reconciliation fails 3. **Three phase transition points** — reconciliation runs at Strategize start, Execute start, and Apply start (not just Strategize as previously documented) 4. **Automatic re-reconciliation** — triggered via `CORRECTION_APPLIED` event subscription after a correction is applied 5. **Built-in actor name** — `builtin/invariant-reconciliation` is the registered name for the default reconciliation actor ## Rationale The current spec says reconciliation happens "during Strategize" only. The implementation (PR #5614) runs it at all three phase transitions. The blocking behavior is architecturally significant — users need to know that a failed reconciliation prevents plan execution. This is observable user-facing behavior, not an implementation detail. ## Risk **Low** — additive only. No existing spec content is changed or removed. ## Related Issues - Closes #5942 — Proposal: update specification — document ReconciliationBlockedError and invariant reconciliation failure behavior at phase transitions - Triggered by PR #5614 (docs: add invariant-reconciliation module guide) --- **Automated by CleverAgents Bot** Supervisor: Architecture | Agent: architect | Instance: architect-1
docs(spec): document ReconciliationBlockedError and invariant reconciliation failure behavior at phase transitions
All checks were successful
CI / lint (pull_request) Successful in 20s
CI / push-validation (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 23s
CI / build (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 50s
CI / security (pull_request) Successful in 1m1s
CI / quality (pull_request) Successful in 3m40s
CI / e2e_tests (pull_request) Successful in 6m25s
CI / integration_tests (pull_request) Successful in 7m4s
CI / unit_tests (pull_request) Successful in 8m5s
CI / docker (pull_request) Successful in 1m17s
CI / coverage (pull_request) Successful in 10m36s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m27s
bbbd39c6ee
Adds documentation for the reconciliation failure behavior that was
implemented in PR #5614 but not reflected in the specification:

- ReconciliationBlockedError blocks phase transitions when invariants fail
- INVARIANT_VIOLATED event emitted on reconciliation failure
- Reconciliation runs at Strategize, Execute, and Apply phase starts
- CORRECTION_APPLIED event triggers automatic re-reconciliation
- builtin/invariant-reconciliation actor name documented

ISSUES CLOSED: #5942
Author
Owner

Closing as duplicate of PR #6004 which was created first for the same proposal #5942. Please review and merge PR #6004 instead.


Automated by CleverAgents Bot
Supervisor: Architecture | Agent: architect | Instance: architect-1

Closing as duplicate of PR #6004 which was created first for the same proposal #5942. Please review and merge PR #6004 instead. --- **Automated by CleverAgents Bot** Supervisor: Architecture | Agent: architect | Instance: architect-1
HAL9000 closed this pull request 2026-04-09 15:36:19 +00:00
All checks were successful
CI / lint (pull_request) Successful in 20s
Required
Details
CI / push-validation (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 23s
CI / build (pull_request) Successful in 35s
Required
Details
CI / typecheck (pull_request) Successful in 50s
Required
Details
CI / security (pull_request) Successful in 1m1s
Required
Details
CI / quality (pull_request) Successful in 3m40s
Required
Details
CI / e2e_tests (pull_request) Successful in 6m25s
CI / integration_tests (pull_request) Successful in 7m4s
Required
Details
CI / unit_tests (pull_request) Successful in 8m5s
Required
Details
CI / docker (pull_request) Successful in 1m17s
Required
Details
CI / coverage (pull_request) Successful in 10m36s
Required
Details
CI / status-check (pull_request) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m27s

Pull request closed

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!6065
No description provided.