aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / docs / campaigns / whole-system-e2e / REGRESSION-sc380.md
| 1 | # REGRESSION-sc380: operator objective record and the CTRL-E2 refusal |
| 2 | |
| 3 | Tracking: aien-sovereign-core#380 (lane L6), aien-architecture#190. Contract: `docs/plans/release-readiness/ACCEPTANCE_E2E.md` step E2 and CTRL-E2. |
| 4 | |
| 5 | ## Failing behaviour as observed |
| 6 | |
| 7 | In the harness runs under `docs/campaigns/whole-system-e2e/runs/` step E2 is recorded NOT_RUN: the installation has no command that accepts an objective and records it. `aien compose propose --goal` runs the model first and only afterwards stores the goal inside the proposal report. The harness therefore wrote the objective receipt itself, and CTRL-E2 (a forbidden effect class refused before execution) had nothing to test. |
| 8 | |
| 9 | ## What is added |
| 10 | |
| 11 | - `aien objective record --text TEXT [--effect-class CLASS]` writes `objectives/<objective_id>.json` under `AIEN_PROVENANCE_DIR` (same fallback as effect receipts) and prints `ok`, `objective_id`, `path`, `objective_text_sha256`, `recorded_before_work` (true), `operator_surface` (`aien-cli`), `utc`. |
| 12 | - `objective_id` = lowercase hex sha256 of `AIEN_E2E_OBJECTIVE_V1`, LF, then the text bytes. Text is at most 2000 bytes UTF-8. |
| 13 | - The operator declares the effect class. Default is `WORKSPACE_WRITE`. The CLI does not classify natural language. CTRL-E2 therefore tests the declared class: `EXTERNAL_IRREVERSIBLE` is refused with `OBJECTIVE_REFUSED ForbiddenEffectClass: ...` on stderr, `ok:false` on stdout, non-zero exit, and no record is written. |
| 14 | - `aien objective show ID` prints the record. |
| 15 | - `aien compose propose --objective-id ID` refuses (`ObjectiveMissing`, `ObjectiveMismatch`) before any model call if the record is missing or sha256 of `--goal` differs from the record; on success the report carries `objective_id`. Without the flag nothing changes. |
| 16 | |
| 17 | ## Tests (crates/aien-cli/tests/objective_record_test.rs and unit tests in src/objective.rs) |
| 18 | |
| 19 | | test | on current main | after fix | |
| 20 | |---|---|---| |
| 21 | | record_writes_file_and_id_is_reproducible | FAIL (no command) | PASS | |
| 22 | | record_refuses_over_length_text | FAIL | PASS | |
| 23 | | record_refuses_forbidden_effect_class_before_any_work | FAIL | PASS | |
| 24 | | show_prints_the_record | FAIL | PASS | |
| 25 | | propose_with_mismatched_objective_id_is_refused | FAIL | PASS | |
| 26 | | propose_with_missing_objective_id_is_refused | FAIL | PASS | |
| 27 | | unit: matching_objective_id_is_accepted_and_carried | FAIL (does not compile) | PASS | |
| 28 | |
| 29 | The matching case is a unit test of the check and the report attachment, because a live propose needs a daemon and the linked composition library. |
| 30 | |
| 31 | ## Must not change |
| 32 | |
| 33 | Every existing command and flag, `compose propose` without `--objective-id`, the effect receipt format and location, `scripts/whole_system_e2e.sh`, and anything under `runs/`. |
| 34 | |
| 35 | ## Done-when 4: the cockpit shows only approvals the desk issued (2026-10-17) |
| 36 | |
| 37 | Pre-registered before the cockpit change. |
| 38 | |
| 39 | Failing behaviour on main at `5870446d`: `spark-cockpit-rs` starts with two hard-coded approvals (`appr-gb10-parity`, `appr-cortex-sync`) in an in-memory list. `GET /api/approvals` shows them as `pending`, the feed announces "2 Actions Awaiting Review", and `POST /api/approvals/<id>/resolve` with `approve` flips the in-memory entry to `approved`. None of them came from the approval desk, and the cockpit "approve" grants nothing. |
| 40 | |
| 41 | Change: the placeholder list and the in-memory approval store are removed. The cockpit holds no approvals. `GET /api/approvals` returns an empty list and names the desk (`aien compose authorize`) as the only issuer. `POST /api/approvals/<id>/resolve` refuses every id with HTTP 409 and the named refusal `NotTheDesk`, changing nothing. The feed has no approvals item. Reading desk records into the cockpit is not part of this change. |
| 42 | |
| 43 | | row | on main 5870446d | after fix | |
| 44 | |---|---|---| |
| 45 | | R4a live binary: `GET /api/approvals` on a fresh cockpit lists no approval | FAIL (2 placeholders) | PASS | |
| 46 | | R4b live binary: `POST /api/approvals/appr-gb10-parity/resolve` `approve` is refused, nothing approved | FAIL (`status ok`, `approved`) | PASS | |
| 47 | | R4c unit: `GET /api/approvals` is empty and names the desk | n/a | PASS | |
| 48 | | R4d unit: resolve refuses with 409 `NotTheDesk` for any id | n/a | PASS | |
| 49 | | R4e unit: the feed has no approvals item | n/a | PASS | |
| 50 | | negative control: the live run with the same request shape against a route that exists (`/api/feed`) answers 200, so R4a/R4b fail or pass on content, not on auth | PASS | PASS | |