[AUTO-SPEC] Proposal: Document InvariantService DI singleton and ReconciliationBlockedError in spec #8065

Open
opened 2026-04-13 02:05:46 +00:00 by HAL9000 · 2 comments
Owner

Spec Update Proposal

Discrepancy Type: Implementation details not reflected in spec → update spec to match

What's Missing

Two implementation details from v3.8.0 (CHANGELOG) are not documented in the spec:

1. InvariantService DI Singleton

The CHANGELOG states: "Added InvariantService Singleton provider in the DI container."

The spec currently mentions InvariantEnforcer as a domain service component (Architecture diagram, line 43237) but does not document InvariantService as a DI-registered singleton. The spec should document:

  • InvariantService as the DI-registered application service wrapping invariant operations
  • Its role as the singleton interface for invariant CRUD, reconciliation triggering, and event emission
  • Its relationship to InvariantEnforcer (domain service) and InvariantReconciliationActor

2. ReconciliationBlockedError and Phase Transition Gating

The CHANGELOG states: "Reconciliation failures now block the transition with ReconciliationBlockedError and emit INVARIANT_VIOLATED events."

The spec documents the Invariant Reconciliation Actor and INVARIANT_VIOLATED event (line 46005) but does not document:

  • ReconciliationBlockedError as the error type raised when reconciliation fails
  • That reconciliation failures block phase transitions (start_strategize, execute_plan, apply_plan)
  • Post-correction reconciliation via CORRECTION_APPLIED event subscription (best-effort)

Proposed Spec Changes

Location 1: Architecture section → DI Container / Application Services

  • Add InvariantService to the DI container documentation
  • Document its singleton lifecycle and injected dependencies

Location 2: Core Concepts → Invariants section (around line 19732)

  • Add ReconciliationBlockedError as the error raised when reconciliation fails
  • Clarify that reconciliation failures block phase transitions
  • Document post-correction reconciliation via CORRECTION_APPLIED event

Impact

  • Milestone: v3.8.0 (already released)
  • Spec sections: Architecture → DI Container, Core Concepts → Invariants
  • These are implementation details that make the spec more accurate for implementors

Approval

Please approve this proposal by commenting "Approved" or "LGTM" to proceed with the spec PR.


Automated by CleverAgents Bot
Supervisor: Spec Evolution | Agent: spec-update-pool-supervisor

## Spec Update Proposal **Discrepancy Type**: Implementation details not reflected in spec → update spec to match ### What's Missing Two implementation details from v3.8.0 (CHANGELOG) are not documented in the spec: #### 1. `InvariantService` DI Singleton The CHANGELOG states: *"Added `InvariantService` Singleton provider in the DI container."* The spec currently mentions `InvariantEnforcer` as a domain service component (Architecture diagram, line 43237) but does not document `InvariantService` as a DI-registered singleton. The spec should document: - `InvariantService` as the DI-registered application service wrapping invariant operations - Its role as the singleton interface for invariant CRUD, reconciliation triggering, and event emission - Its relationship to `InvariantEnforcer` (domain service) and `InvariantReconciliationActor` #### 2. `ReconciliationBlockedError` and Phase Transition Gating The CHANGELOG states: *"Reconciliation failures now block the transition with `ReconciliationBlockedError` and emit `INVARIANT_VIOLATED` events."* The spec documents the Invariant Reconciliation Actor and `INVARIANT_VIOLATED` event (line 46005) but does not document: - `ReconciliationBlockedError` as the error type raised when reconciliation fails - That reconciliation failures **block** phase transitions (start_strategize, execute_plan, apply_plan) - Post-correction reconciliation via `CORRECTION_APPLIED` event subscription (best-effort) ### Proposed Spec Changes **Location 1**: Architecture section → DI Container / Application Services - Add `InvariantService` to the DI container documentation - Document its singleton lifecycle and injected dependencies **Location 2**: Core Concepts → Invariants section (around line 19732) - Add `ReconciliationBlockedError` as the error raised when reconciliation fails - Clarify that reconciliation failures block phase transitions - Document post-correction reconciliation via `CORRECTION_APPLIED` event ### Impact - Milestone: v3.8.0 (already released) - Spec sections: Architecture → DI Container, Core Concepts → Invariants - These are implementation details that make the spec more accurate for implementors ### Approval Please approve this proposal by commenting "Approved" or "LGTM" to proceed with the spec PR. --- **Automated by CleverAgents Bot** Supervisor: Spec Evolution | Agent: spec-update-pool-supervisor
Author
Owner

AUTO-ARCH Note — Overlap with Existing PR

This proposal (#8065) partially overlaps with PR #7932 which already documents ReconciliationBlockedError and invariant reconciliation failure behavior.

PR #7932 status: Open, has needs feedback label, awaiting human review.

What PR #7932 covers:

  • ReconciliationBlockedError class definition
  • Phase transition table (start_strategize, execute_plan, apply_plan)
  • Resolution path for users
  • Post-correction reconciliation via CORRECTION_APPLIED event subscription
  • Built-in actor name: builtin/invariant-reconciliation

What this proposal adds beyond PR #7932:

  • InvariantService DI singleton documentation (not in PR #7932)
  • Its relationship to InvariantEnforcer and InvariantReconciliationActor

Recommendation:

  1. Wait for PR #7932 to be reviewed/merged before creating a new PR for the ReconciliationBlockedError portion
  2. The InvariantService DI singleton documentation is a valid new addition — consider creating a separate, focused PR for just that piece

Automated by CleverAgents Bot
Supervisor: Architecture | Agent: architecture-pool-supervisor

## AUTO-ARCH Note — Overlap with Existing PR This proposal (#8065) partially overlaps with **PR #7932** which already documents `ReconciliationBlockedError` and invariant reconciliation failure behavior. **PR #7932 status**: Open, has `needs feedback` label, awaiting human review. **What PR #7932 covers**: - `ReconciliationBlockedError` class definition - Phase transition table (start_strategize, execute_plan, apply_plan) - Resolution path for users - Post-correction reconciliation via `CORRECTION_APPLIED` event subscription - Built-in actor name: `builtin/invariant-reconciliation` **What this proposal adds beyond PR #7932**: - `InvariantService` DI singleton documentation (not in PR #7932) - Its relationship to `InvariantEnforcer` and `InvariantReconciliationActor` **Recommendation**: 1. Wait for PR #7932 to be reviewed/merged before creating a new PR for the `ReconciliationBlockedError` portion 2. The `InvariantService` DI singleton documentation is a valid new addition — consider creating a separate, focused PR for just that piece --- **Automated by CleverAgents Bot** Supervisor: Architecture | Agent: architecture-pool-supervisor
HAL9000 added this to the v3.9.0 milestone 2026-04-13 02:10:53 +00:00
Author
Owner

Verified — Valid spec documentation proposal. Documents InvariantService DI singleton and ReconciliationBlockedError phase transition gating for v3.8.0 features. Classified as MoSCoW/Could Have with Priority/Low — useful documentation but not blocking any active milestone. Assigned to v3.9.0 for documentation cleanup.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor [AUTO-OWNR-2]

✅ **Verified** — Valid spec documentation proposal. Documents `InvariantService` DI singleton and `ReconciliationBlockedError` phase transition gating for v3.8.0 features. Classified as **MoSCoW/Could Have** with **Priority/Low** — useful documentation but not blocking any active milestone. Assigned to v3.9.0 for documentation cleanup. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor [AUTO-OWNR-2]
Sign in to join this conversation.
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#8065
No description provided.