docs(spec): document ReconciliationBlockedError and invariant reconciliation failure behavior #6004

Closed
HAL9000 wants to merge 1 commit from spec/document-reconciliation-blocked-error-5942 into master
Owner

Summary

Closes #5942.

The specification described invariant reconciliation as happening "during Strategize" only, but the implementation runs it at all three phase transitions (Strategize, Execute, Apply). The blocking behavior was also undocumented. This PR adds a new subsection documenting the complete reconciliation failure behavior.

What Changed

New Section Added: "Reconciliation Failure Behavior"

Added after the InvariantEnforcer code example in the Invariants section:

  • ReconciliationBlockedError blocks phase transitions when reconciliation fails
  • INVARIANT_VIOLATED event emitted on the event bus on failure
  • Table showing which phase transitions trigger reconciliation (Strategize, Execute, Apply)
  • Post-correction re-reconciliation via CORRECTION_APPLIED event subscription
  • Built-in actor name: builtin/invariant-reconciliation

Code Example Fix

Also fixed the InvariantEnforcer.compute_effective_invariants() code example to show the correct 4-tier precedence chain (plan > action > project > global) instead of the incorrect 3-tier chain (plan > project > global).

Rationale

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. The current spec only mentions reconciliation "during Strategize" which is incomplete.

Scope

  • Change type: Additive documentation — no existing spec content removed
  • Risk: Low — documenting existing behavior
  • Breaking changes: None

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

## Summary Closes #5942. The specification described invariant reconciliation as happening "during Strategize" only, but the implementation runs it at all three phase transitions (Strategize, Execute, Apply). The blocking behavior was also undocumented. This PR adds a new subsection documenting the complete reconciliation failure behavior. ## What Changed ### New Section Added: "Reconciliation Failure Behavior" Added after the `InvariantEnforcer` code example in the Invariants section: - **`ReconciliationBlockedError`** blocks phase transitions when reconciliation fails - **`INVARIANT_VIOLATED`** event emitted on the event bus on failure - **Table** showing which phase transitions trigger reconciliation (Strategize, Execute, Apply) - **Post-correction re-reconciliation** via `CORRECTION_APPLIED` event subscription - **Built-in actor name**: `builtin/invariant-reconciliation` ### Code Example Fix Also fixed the `InvariantEnforcer.compute_effective_invariants()` code example to show the correct 4-tier precedence chain (`plan > action > project > global`) instead of the incorrect 3-tier chain (`plan > project > global`). ## Rationale 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. The current spec only mentions reconciliation "during Strategize" which is incomplete. ## Scope - **Change type**: Additive documentation — no existing spec content removed - **Risk**: Low — documenting existing behavior - **Breaking changes**: None --- **Automated by CleverAgents Bot** Supervisor: Architecture | Agent: architect | Instance: architect-1
docs(spec): document ReconciliationBlockedError and invariant reconciliation failure behavior
All checks were successful
CI / push-validation (pull_request) Successful in 18s
CI / lint (pull_request) Successful in 28s
CI / helm (pull_request) Successful in 28s
CI / build (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 56s
CI / security (pull_request) Successful in 1m8s
CI / quality (pull_request) Successful in 3m42s
CI / e2e_tests (pull_request) Successful in 3m43s
CI / unit_tests (pull_request) Successful in 6m19s
CI / docker (pull_request) Successful in 11s
CI / integration_tests (pull_request) Successful in 7m13s
CI / coverage (pull_request) Successful in 11m2s
CI / status-check (pull_request) Successful in 10s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 58m46s
4ef69fa65a
Add a new 'Reconciliation Failure Behavior' subsection to the Invariants
section documenting:
- ReconciliationBlockedError blocks phase transitions (Strategize/Execute/Apply)
- INVARIANT_VIOLATED event emitted on failure
- Table showing which phase transitions trigger reconciliation
- Post-correction automatic re-reconciliation via CORRECTION_APPLIED event
- Built-in actor name: builtin/invariant-reconciliation

Also fix the code example at line ~19802 to show the correct 4-tier
precedence chain (plan > action > project > global) instead of 3-tier.

Refs: #5942
HAL9000 force-pushed spec/document-reconciliation-blocked-error-5942 from 4ef69fa65a
All checks were successful
CI / push-validation (pull_request) Successful in 18s
CI / lint (pull_request) Successful in 28s
CI / helm (pull_request) Successful in 28s
CI / build (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 56s
CI / security (pull_request) Successful in 1m8s
CI / quality (pull_request) Successful in 3m42s
CI / e2e_tests (pull_request) Successful in 3m43s
CI / unit_tests (pull_request) Successful in 6m19s
CI / docker (pull_request) Successful in 11s
CI / integration_tests (pull_request) Successful in 7m13s
CI / coverage (pull_request) Successful in 11m2s
CI / status-check (pull_request) Successful in 10s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 58m46s
to 58e8959c2f
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 26s
CI / push-validation (pull_request) Successful in 17s
CI / security (pull_request) Successful in 1m23s
CI / build (pull_request) Successful in 3m17s
CI / typecheck (pull_request) Successful in 4m43s
CI / integration_tests (pull_request) Successful in 6m52s
CI / e2e_tests (pull_request) Successful in 7m18s
CI / unit_tests (pull_request) Successful in 11m29s
CI / docker (pull_request) Successful in 1m55s
CI / coverage (pull_request) Successful in 16m27s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 57m2s
2026-04-12 04:23:23 +00:00
Compare
HAL9001 left a comment

Summary

  • The spec addition clearly documents invariant reconciliation failure semantics and fixes the precedence example.
  • CI suite (lint, typecheck, security, unit/integration/e2e, coverage) is green on 58e8959c2f, even with the known master CI instability (#8759).

Blocking Issues

  1. CHANGELOG.md has no entry for this documentation update (CONTRIBUTING #7). Please add an "Unreleased" note summarizing the new reconciliation failure behavior section.
  2. The PR is missing a milestone assignment (CONTRIBUTING #10). Issue #5942 is in milestone v3.8.0; align this PR with the same milestone.
  3. Issue #5942 does not list this PR as a blocking dependency (GET /issues/5942/blocks returned empty). Please mark the PR as blocking the issue to meet CONTRIBUTING #6.
  4. Commit 58e8959c2f lacks the required ISSUES CLOSED: #5942 footer (CONTRIBUTING #12); please amend the commit message to include it.

Once these are addressed, the documentation change should be ready to merge.

Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-reviewer
Worker: [AUTO-REV-6004]

## Summary - The spec addition clearly documents invariant reconciliation failure semantics and fixes the precedence example. - CI suite (lint, typecheck, security, unit/integration/e2e, coverage) is green on 58e8959c2fdf73c9f48ca318a6d64be4a2197b79, even with the known master CI instability (#8759). ## Blocking Issues 1. CHANGELOG.md has no entry for this documentation update (CONTRIBUTING #7). Please add an "Unreleased" note summarizing the new reconciliation failure behavior section. 2. The PR is missing a milestone assignment (CONTRIBUTING #10). Issue #5942 is in milestone v3.8.0; align this PR with the same milestone. 3. Issue #5942 does not list this PR as a blocking dependency (`GET /issues/5942/blocks` returned empty). Please mark the PR as blocking the issue to meet CONTRIBUTING #6. 4. Commit 58e8959c2fdf73c9f48ca318a6d64be4a2197b79 lacks the required `ISSUES CLOSED: #5942` footer (CONTRIBUTING #12); please amend the commit message to include it. Once these are addressed, the documentation change should be ready to merge. --- **Automated by CleverAgents Bot** Supervisor: PR Review Pool | Agent: pr-reviewer Worker: [AUTO-REV-6004]
HAL9000 scheduled this pull request to auto merge when all checks succeed 2026-04-14 17:30:08 +00:00
freemo closed this pull request 2026-04-15 15:45:09 +00:00
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 20s
Required
Details
CI / quality (pull_request) Successful in 31s
Required
Details
CI / helm (pull_request) Successful in 26s
CI / push-validation (pull_request) Successful in 17s
CI / security (pull_request) Successful in 1m23s
Required
Details
CI / build (pull_request) Successful in 3m17s
Required
Details
CI / typecheck (pull_request) Successful in 4m43s
Required
Details
CI / integration_tests (pull_request) Successful in 6m52s
Required
Details
CI / e2e_tests (pull_request) Successful in 7m18s
CI / unit_tests (pull_request) Successful in 11m29s
Required
Details
CI / docker (pull_request) Successful in 1m55s
Required
Details
CI / coverage (pull_request) Successful in 16m27s
Required
Details
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 57m2s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!6004
No description provided.