EPIC: Invariant System Correctness — Scoping, Multi-Plan, and CLI Flags (v3.5.0) #5367

Open
opened 2026-04-09 06:13:19 +00:00 by HAL9000 · 1 comment
Owner

Epic: Invariant System Correctness

Milestone: v3.5.0
Parent Legendary: #4944 (LEGENDARY: Autonomy Hardening)

Background

The invariant system allows users to define constraints that must be satisfied during plan execution. Several correctness issues have been identified:

  • InvariantService.get_effective_invariants() incorrectly includes all plan-scoped invariants from unrelated plans (UAT #5359)
  • agents invariant add --plan PLAN1 --plan PLAN2 only creates one invariant instead of one per plan (UAT #5357)
  • agents invariant add/list missing -p short flag for --project (UAT #5355)

Scope

  • Fix InvariantService.get_effective_invariants() to correctly scope plan-level invariants
  • Fix agents invariant add --plan to create one invariant per plan value
  • Add -p short flag for --project to agents invariant add and agents invariant list
  • Ensure invariant scoping (project, plan, action) works correctly

Child Issues

  • #5355 — UAT: agents invariant add and agents invariant list missing -p short flag
  • #5357 — UAT: agents invariant add --plan PLAN1 --plan PLAN2 only creates one invariant
  • #5359 — UAT: InvariantService.get_effective_invariants() incorrectly includes all plan-scoped invariants

Definition of Done

  • All child issues are closed
  • Invariant scoping works correctly for project, plan, and action levels
  • -p short flag works for project filtering
  • Multi-plan invariant creation works correctly
  • All nox stages pass
  • Coverage >= 97%

Metadata

  • Branch Naming Convention: fix/v350/invariant-system-correctness
  • Milestone: v3.5.0

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Epic: Invariant System Correctness **Milestone**: v3.5.0 **Parent Legendary**: #4944 (LEGENDARY: Autonomy Hardening) ### Background The invariant system allows users to define constraints that must be satisfied during plan execution. Several correctness issues have been identified: - `InvariantService.get_effective_invariants()` incorrectly includes all plan-scoped invariants from unrelated plans (UAT #5359) - `agents invariant add --plan PLAN1 --plan PLAN2` only creates one invariant instead of one per plan (UAT #5357) - `agents invariant add/list` missing `-p` short flag for `--project` (UAT #5355) ### Scope - Fix `InvariantService.get_effective_invariants()` to correctly scope plan-level invariants - Fix `agents invariant add --plan` to create one invariant per plan value - Add `-p` short flag for `--project` to `agents invariant add` and `agents invariant list` - Ensure invariant scoping (project, plan, action) works correctly ### Child Issues <!-- Updated by automation after child issues are created --> - [ ] #5355 — UAT: `agents invariant add` and `agents invariant list` missing `-p` short flag - [ ] #5357 — UAT: `agents invariant add --plan PLAN1 --plan PLAN2` only creates one invariant - [ ] #5359 — UAT: `InvariantService.get_effective_invariants()` incorrectly includes all plan-scoped invariants ### Definition of Done - [ ] All child issues are closed - [ ] Invariant scoping works correctly for project, plan, and action levels - [ ] `-p` short flag works for project filtering - [ ] Multi-plan invariant creation works correctly - [ ] All nox stages pass - [ ] Coverage >= 97% ## Metadata - **Branch Naming Convention**: `fix/v350/invariant-system-correctness` - **Milestone**: v3.5.0 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.5.0 milestone 2026-04-09 06:13:19 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels to bring issue into compliance with CONTRIBUTING.md

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

Label compliance fix applied: - Added missing labels to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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.

Reference
cleveragents/cleveragents-core#5367
No description provided.