UAT: LLMStrategizeActor bypasses Invariant Reconciliation Actor — invariants accepted without reconciliation #3260

Open
opened 2026-04-05 08:43:15 +00:00 by freemo · 3 comments
Owner

Metadata

  • Branch: fix/llm-strategize-actor-invariant-reconciliation
  • Commit Message: fix(actors): wire LLMStrategizeActor to invoke InvariantReconciliationActor for effective invariant view
  • Milestone: None (backlog)
  • Parent Epic: #394

Bug Report

Feature Area: Invariant Reconciliation / Decision Framework

Spec Reference

Per docs/specification.md lines 18980–18991:

"The Invariant Reconciliation Actor computes the effective invariant view (resolving conflicts using plan > project > global precedence) and recording them as invariant_enforced decisions."

Steps to Reproduce

  1. Inspect LLMStrategizeActor.execute() in src/cleveragents/application/services/llm_actors.py (lines ~148–157)
  2. Note the comment "enforcement_note": "llm: accepted without reconciliation"
  3. Verify that InvariantReconciliationActor is never imported or called in llm_actors.py

Expected Behavior

LLMStrategizeActor should invoke the Invariant Reconciliation Actor to:

  1. Compute the effective invariant view (resolving conflicts using plan > project > global precedence)
  2. Record invariants as invariant_enforced decisions
  3. Surface any invariant conflicts to the user

Actual Behavior

LLMStrategizeActor.execute() simply iterates over the provided invariants and marks them all as "enforced": True with the note "llm: accepted without reconciliation". It never invokes InvariantReconciliationActor to compute the effective invariant view or resolve conflicts.

The PlanLifecycleService._run_invariant_reconciliation() method exists and correctly invokes InvariantReconciliationActor, but it is only called during phase transitions in the lifecycle service — not from within LLMStrategizeActor.execute().

Code Locations

  • src/cleveragents/application/services/llm_actors.pyLLMStrategizeActor.execute() (lines ~148–157): blindly accepts all invariants without reconciliation
  • src/cleveragents/actor/reconciliation.pyInvariantReconciliationActor: exists and is correct but is never called from LLMStrategizeActor

Impact

  • Invariant conflicts between plan, project, and global scopes are not resolved
  • The LLM may receive contradictory invariants without knowing which takes precedence
  • invariant_enforced decisions are not recorded in the decision tree
  • The enforcement_note field explicitly documents this as a known gap: "llm: accepted without reconciliation"

Backlog note: This issue was discovered during autonomous operation
on milestone v3.5.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Subtasks

  • Audit LLMStrategizeActor.execute() in src/cleveragents/application/services/llm_actors.py (lines ~148–157) and remove the blind-accept loop
  • Import and invoke InvariantReconciliationActor from within LLMStrategizeActor.execute() to compute the effective invariant view
  • Ensure the reconciliation result uses plan > project > global precedence as specified
  • Record resolved invariants as invariant_enforced decisions in the decision tree
  • Surface invariant conflicts to the user when detected
  • Add Behave BDD scenario: features/invariant_reconciliation.feature — verify LLMStrategizeActor invokes reconciliation and records invariant_enforced decisions
  • Add Robot Framework integration test verifying conflict resolution precedence (plan > project > global)
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/llm-strategize-actor-invariant-reconciliation` - **Commit Message**: `fix(actors): wire LLMStrategizeActor to invoke InvariantReconciliationActor for effective invariant view` - **Milestone**: None (backlog) - **Parent Epic**: #394 ## Bug Report **Feature Area**: Invariant Reconciliation / Decision Framework ### Spec Reference Per `docs/specification.md` lines 18980–18991: > "The Invariant Reconciliation Actor computes the effective invariant view (resolving conflicts using plan > project > global precedence) and recording them as `invariant_enforced` decisions." ### Steps to Reproduce 1. Inspect `LLMStrategizeActor.execute()` in `src/cleveragents/application/services/llm_actors.py` (lines ~148–157) 2. Note the comment `"enforcement_note": "llm: accepted without reconciliation"` 3. Verify that `InvariantReconciliationActor` is never imported or called in `llm_actors.py` ### Expected Behavior `LLMStrategizeActor` should invoke the Invariant Reconciliation Actor to: 1. Compute the effective invariant view (resolving conflicts using plan > project > global precedence) 2. Record invariants as `invariant_enforced` decisions 3. Surface any invariant conflicts to the user ### Actual Behavior `LLMStrategizeActor.execute()` simply iterates over the provided invariants and marks them all as `"enforced": True` with the note `"llm: accepted without reconciliation"`. It never invokes `InvariantReconciliationActor` to compute the effective invariant view or resolve conflicts. The `PlanLifecycleService._run_invariant_reconciliation()` method exists and correctly invokes `InvariantReconciliationActor`, but it is only called during phase transitions in the lifecycle service — not from within `LLMStrategizeActor.execute()`. ### Code Locations - `src/cleveragents/application/services/llm_actors.py` — `LLMStrategizeActor.execute()` (lines ~148–157): blindly accepts all invariants without reconciliation - `src/cleveragents/actor/reconciliation.py` — `InvariantReconciliationActor`: exists and is correct but is never called from `LLMStrategizeActor` ### Impact - Invariant conflicts between plan, project, and global scopes are not resolved - The LLM may receive contradictory invariants without knowing which takes precedence - `invariant_enforced` decisions are not recorded in the decision tree - The `enforcement_note` field explicitly documents this as a known gap: `"llm: accepted without reconciliation"` > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.5.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Subtasks - [ ] Audit `LLMStrategizeActor.execute()` in `src/cleveragents/application/services/llm_actors.py` (lines ~148–157) and remove the blind-accept loop - [ ] Import and invoke `InvariantReconciliationActor` from within `LLMStrategizeActor.execute()` to compute the effective invariant view - [ ] Ensure the reconciliation result uses plan > project > global precedence as specified - [ ] Record resolved invariants as `invariant_enforced` decisions in the decision tree - [ ] Surface invariant conflicts to the user when detected - [ ] Add Behave BDD scenario: `features/invariant_reconciliation.feature` — verify `LLMStrategizeActor` invokes reconciliation and records `invariant_enforced` decisions - [ ] Add Robot Framework integration test verifying conflict resolution precedence (plan > project > global) - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.5.0 milestone 2026-04-05 08:57:40 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Backlog (keeping existing)
  • Milestone: v3.5.0 (Autonomy Hardening — invariant reconciliation is a core requirement)
  • MoSCoW: Should Have — the spec requires invariant reconciliation during Strategize. The LLMStrategizeActor explicitly bypasses this with a "accepted without reconciliation" note. This is a known gap that should be fixed for correct invariant enforcement.
  • Parent Epic: #394 (Decision Framework)

This is related to the broader 4-tier precedence chain issues (#3066, #3128, #3130, #3134) — even if the merge function is fixed, the LLMStrategizeActor would still bypass reconciliation entirely.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Backlog (keeping existing) - **Milestone**: v3.5.0 (Autonomy Hardening — invariant reconciliation is a core requirement) - **MoSCoW**: Should Have — the spec requires invariant reconciliation during Strategize. The LLMStrategizeActor explicitly bypasses this with a "accepted without reconciliation" note. This is a known gap that should be fixed for correct invariant enforcement. - **Parent Epic**: #394 (Decision Framework) This is related to the broader 4-tier precedence chain issues (#3066, #3128, #3130, #3134) — even if the merge function is fixed, the LLMStrategizeActor would still bypass reconciliation entirely. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Label compliance fix applied:

  • Added missing repo-level labels: State/Unverified, Type/Bug, Priority/Backlog
  • Reason: Issue was missing required repo-level State/*, Type/*, and Priority/* labels per CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Label compliance fix applied: - Added missing repo-level labels: `State/Unverified`, `Type/Bug`, `Priority/Backlog` - Reason: Issue was missing required repo-level `State/*`, `Type/*`, and `Priority/*` labels per CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Author
Owner

Milestone Triage Decision: Moved to Backlog

This edge case issue has been moved out of v3.5.0 during aggressive milestone triage. While important for completeness, it does not block core autonomy hardening functionality.

Reasoning:

  • v3.5.0 focus: Essential autonomy hardening (guard enforcement, A2A facade, plan lifecycle)
  • This issue: Invariant reconciliation bypass - edge case in actor behavior
  • Impact: Edge case handling, not core functional capability

Will be addressed in a future milestone after core autonomy functionality is stable.

**Milestone Triage Decision: Moved to Backlog** This edge case issue has been moved out of v3.5.0 during aggressive milestone triage. While important for completeness, it does not block core autonomy hardening functionality. **Reasoning:** - v3.5.0 focus: Essential autonomy hardening (guard enforcement, A2A facade, plan lifecycle) - This issue: Invariant reconciliation bypass - edge case in actor behavior - Impact: Edge case handling, not core functional capability Will be addressed in a future milestone after core autonomy functionality is stable.
freemo removed this from the v3.5.0 milestone 2026-04-06 21:05:26 +00:00
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.

Blocks
#394 Epic: Decision Framework
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3260
No description provided.