docs(spec): clarify invariant CLI completeness requirements
CI / lint (pull_request) Successful in 45s
CI / typecheck (pull_request) Successful in 57s
CI / quality (pull_request) Successful in 42s
CI / push-validation (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 46s
CI / security (pull_request) Successful in 1m42s
CI / e2e_tests (pull_request) Successful in 4m14s
CI / integration_tests (pull_request) Successful in 7m45s
CI / unit_tests (pull_request) Successful in 8m3s
CI / docker (pull_request) Successful in 2m24s
CI / coverage (pull_request) Successful in 11m19s
CI / status-check (pull_request) Successful in 6s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 59m11s
CI / lint (pull_request) Successful in 45s
CI / typecheck (pull_request) Successful in 57s
CI / quality (pull_request) Successful in 42s
CI / push-validation (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 46s
CI / security (pull_request) Successful in 1m42s
CI / e2e_tests (pull_request) Successful in 4m14s
CI / integration_tests (pull_request) Successful in 7m45s
CI / unit_tests (pull_request) Successful in 8m3s
CI / docker (pull_request) Successful in 2m24s
CI / coverage (pull_request) Successful in 11m19s
CI / status-check (pull_request) Successful in 6s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 59m11s
UAT findings #7461 and #7462 identified two spec-implementation gaps in the invariant system: 1. Missing --non-overridable CLI flag (#7461): The spec defines 'agents invariant add --global --non-overridable' but the CLI raises 'No such option: --non-overridable'. System administrators cannot create non-overridable global safety constraints. 2. Action-scope omitted from --effective output (#7462): The spec defines four-tier precedence (plan > action > project > global) but InvariantService.get_effective_invariants() only merges plan/project/ global, omitting action scope entirely. The --effective output also ignores non_overridable semantics. Added 'CLI completeness requirements for invariants' section clarifying: - --non-overridable flag MUST be implemented (global scope only) - Action-scope MUST be included in --effective output - non_overridable semantics MUST be correctly applied in --effective Refs: UAT #7461, UAT #7462
This commit is contained in:
@@ -19748,6 +19748,14 @@ Each effective invariant is then recorded as an `invariant_enforced` decision in
|
||||
|
||||
**Non-overridable global invariants**: A global invariant may be marked `non_overridable: true`. When set, this invariant takes precedence over all lower-scope invariants regardless of the normal precedence chain -- even plan-level invariants cannot override it. This is intended for system-wide safety constraints that must never be relaxed (e.g., "Never commit secrets to version control"). Non-overridable invariants are set via `agents invariant add --global --non-overridable "<constraint>"`. The `non_overridable` flag is only meaningful on `GLOBAL`-scoped invariants; it is ignored on project, action, and plan invariants.
|
||||
|
||||
**CLI completeness requirements for invariants**:
|
||||
|
||||
1. **`--non-overridable` flag**: The `agents invariant add --global --non-overridable "<text>"` command MUST be implemented. Without this flag, system administrators cannot create non-overridable global safety constraints, making the safety override feature effectively unusable. The flag is only accepted when combined with `--global`; using it with `--project`, `--action`, or `--plan` MUST raise a validation error.
|
||||
|
||||
2. **Action-scope in `--effective` output**: The `agents invariant list --effective` command MUST include action-scope invariants in the effective set. The four-tier precedence is `plan > action > project > global` — action-scope invariants sit between plan and project scope. Omitting action-scope invariants from the effective view causes the CLI output to disagree with the Invariant Reconciliation Actor used during Strategize, making `--effective` unreliable for UAT validation.
|
||||
|
||||
3. **`non_overridable` in `--effective` output**: The `--effective` output MUST correctly apply `non_overridable` semantics. When a global invariant has `non_overridable: true`, it MUST appear at the top of the effective set and MUST NOT be overridden by plan-scope invariants, even when a plan-scope invariant would normally take precedence. The output MUST indicate which invariants are non-overridable (e.g., via a `[NON-OVERRIDABLE]` marker or a dedicated column).
|
||||
|
||||
**Child plan inheritance**: When a top-level plan spawns child plans, the parent's effective invariant view (already reconciled) is passed down to each child plan. Child plans do not re-run reconciliation — they inherit the parent's resolved view.
|
||||
|
||||
**Correcting invariants**: The correction mechanism for `invariant_enforced` decisions supports two operations:
|
||||
|
||||
Reference in New Issue
Block a user