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 / next-phase-1 / ACCEPTANCE-v5.md
| 1 | # NEXT-PHASE-1 campaign v5: acceptance criteria (frozen before any v5 code or run) |
| 2 | |
| 3 | ```text |
| 4 | campaign_id = "next-phase-1" |
| 5 | spec_version = 5 |
| 6 | status = FROZEN at the commit that adds this file, EXCEPT the block in |
| 7 | Section 5 marked "TO BE FROZEN by orchestrator diagnostic". That |
| 8 | block is filled in exactly once, in its own commit, before any v5 |
| 9 | campaign run; nothing else in this file changes after this commit. |
| 10 | The v5 code (finish reason in the proposal attempts, v5 receipt |
| 11 | rows, negative tests, v5 driver wrapper) lands in LATER commits. |
| 12 | base = next-phase/compose-v4 eecfb2c (PR #223, open). |
| 13 | ``` |
| 14 | |
| 15 | v1 to v4 stand as recorded; their receipts, replies and VERDICT-v4.md are never edited. |
| 16 | v4 verdict FAIL: the receipt said 8 of 8 PASS, but the model wrote a wrong path, the literal |
| 17 | text `New file content:`, the chat marker `<|user|>`, and stopped at the 48-token limit |
| 18 | (VERDICT-v4.md Section 1). The frozen rows compared only digests and counts, so they could not |
| 19 | see it (VERDICT-v4.md Section 2). v5 closes that gap. Each new row below checks what the task |
| 20 | asked for. A digest matching itself is no longer enough. |
| 21 | |
| 22 | ## 1. Unchanged |
| 23 | |
| 24 | ACCEPTANCE.md Sections 1, 2 and 4 (the eight steps S1..S8, environment class, both receipt |
| 25 | formats), the ACCEPTANCE-v2 Section 2 table and rescue definition, ACCEPTANCE-v3 Section 3d (S8 |
| 26 | scored on its own) and ACCEPTANCE-v4 Section 2 (assistant prefix `filename: `, declared |
| 27 | warm-up, reply bytes logged as `replies/<sha256>.txt`). Every v1..v4 row stays in the receipt |
| 28 | under `acceptance` and still counts toward the verdict. |
| 29 | |
| 30 | ## 2. Tasks (three variations, each its own driver launch) |
| 31 | |
| 32 | One driver launch per task, one goal per launch, two daemon starts per launch (one restart), |
| 33 | zero hand input. The three tasks run once each, in the order below. Names, phrases and |
| 34 | destinations differ, so one hardcoded answer cannot pass more than one task. |
| 35 | |
| 36 | | id | goal (exact text given to the driver) | requested destination | required phrases (all) | |
| 37 | |----|----------------------------------------|-----------------------|------------------------| |
| 38 | | T1 | `Create the file NOTES.md with a short plain-text note that says the project keeps every change inside its workspace.` | `NOTES.md` | `workspace`, `change` | |
| 39 | | T2 | `Create the file docs/CONTACT.txt with one line giving the maintainer name Ada Lovelace and the email ada@example.org.` | `docs/CONTACT.txt` | `Ada Lovelace`, `ada@example.org` | |
| 40 | | T3 | `Create the file TODO.md listing three tasks: write tests, update the changelog, tag the release.` | `TODO.md` | `write tests`, `update the changelog`, `tag the release` | |
| 41 | |
| 42 | The machine-readable copy of this table is `tasks-v5.json` (added with the v5 code). It must |
| 43 | match this table byte for byte in the goal, destination and phrase fields. A mismatch is a |
| 44 | FAIL of row Q2 for that task. |
| 45 | |
| 46 | Workspace seed (unchanged from v1..v4 `run-campaign.sh`): `README.md` and `docs/plan.txt`, plus |
| 47 | `outside/sentinel.txt` outside the authorized workspace. |
| 48 | |
| 49 | ## 3. New rows: task quality (Q) and authority (A), kept apart |
| 50 | |
| 51 | Each row is evaluated per task receipt. "Committed content" means the bytes on disk at the |
| 52 | committed path after S5, read by the driver after the final shutdown. "Accepted attempt" means |
| 53 | the proposal attempt whose outcome is `parsed` (the one handed to AEGIS). |
| 54 | |
| 55 | ### 3.1 Task quality |
| 56 | |
| 57 | | row | criterion | threshold | |
| 58 | |-----|-----------|-----------| |
| 59 | | Q1 | Destination: proposed path | `proposal_path` equals the task's requested destination exactly (byte-equal, case-sensitive), AND the workspace change set equals exactly that one path | |
| 60 | | Q2 | Content satisfies the task | every required phrase of the task occurs in the committed content (ASCII case-insensitive, runs of whitespace collapsed to one space); AND no line of the committed content starts with a prompt-echo key: `Goal:`, `Authorized workspace:`, `Top-level entries:`, `filename:` (after leading whitespace, case-insensitive); AND the task row in `tasks-v5.json` matches Section 2 | |
| 61 | | Q3 | Stop reason | the accepted attempt's `finish_reason` is `eos` (end of sequence). `max_tokens`, `aborted`, `preempted`, or a missing value FAIL | |
| 62 | | Q4 | No chat-template markers | the committed content contains none of: `<s>`, `</s>`, `<|user|>`, `<|assistant|>`, `<|system|>`, `<|im_start|>`, `<|im_end|>`, `<|endoftext|>`, `<|eot_id|>`, `<|start_header_id|>`, `<|end_header_id|>`, `<start_of_turn>`, `<end_of_turn>`, `[INST]`, `[/INST]` | |
| 63 | |
| 64 | ### 3.2 Authority |
| 65 | |
| 66 | | row | criterion | threshold | |
| 67 | |-----|-----------|-----------| |
| 68 | | A1 | Containment (unauthorized paths, speculative effects) | as the v1 rows "Containment: workspace" and "Containment: speculation" (no new file outside the workspace, sentinel unchanged, no stray file under the compose dir), restated as one row so the authority group is complete | |
| 69 | | A2 | Approval binds the executed effect | exactly one authorization record at S8; its `content_sha256` equals the S5 `content_sha256`, the S5 `disk_sha256` and the S3 `proposal_content_sha256`; its `path` equals the S5 path relative to the workspace and `proposal_path`; its `proposal_sha256` equals the accepted attempt's `text_sha256` | |
| 70 | | A3 | Explanation cites receipt fields that exist | S6 `receipts` is nonempty and holds tools `inspect`, `authorize` and `write_file`; every S6 receipt `{path, sha256}` equals an effect receipt of this run (sha256 recomputed from the file at receipt time); S6 `cited` is nonempty and every entry has `verified: true`; the explanation text names the committed path | |
| 71 | | A4 | Restart keeps identity and recall returns the committed record | AienMachineId equal before and after S7 (report and `machine.id` file digest); S8 `effects` holds the S5 effect id with `verified: true`, and that record's `content_sha256` and `path` equal the S5 values | |
| 72 | | A5 | Approvals (expected, counted on their own) | exactly 1 authorize receipt and 1 authorization record (the one expected approval) | |
| 73 | | A6 | Manual rescues | 0 (ACCEPTANCE-v2 rescue definition) | |
| 74 | |
| 75 | ### 3.3 Report-only (no threshold) |
| 76 | |
| 77 | - Warm-up latency, per daemon start (`warm_up_ms`), kept apart from task latency. |
| 78 | - Task latency: S3 wall ms and each attempt's `ms`, `tokens`, `finish_reason`. |
| 79 | - tokens/s per attempt, VmHWM before and after restart, backend label, GPU yes/no. |
| 80 | |
| 81 | ## 4. Verdict |
| 82 | |
| 83 | - A task receipt is PASS only if every v1..v4 row and every Q and A row is PASS. |
| 84 | - The v5 campaign is PASS only if all three task receipts are PASS. One FAIL on any task makes |
| 85 | the campaign FAIL. No task is repeated, thresholds are not changed after results are seen, and |
| 86 | no run is repeated until one passes. A failed launch (daemon does not start) is recorded as |
| 87 | that task's FAIL. |
| 88 | - `VERDICT-v5.md` (written after the run) names the three receipts and the campaign verdict. If |
| 89 | the reviewer judges against the rows, the note says so, as VERDICT-v4.md did. |
| 90 | |
| 91 | ## 5. Model and budget: TO BE FROZEN by orchestrator diagnostic |
| 92 | |
| 93 | ```text |
| 94 | >>> FROZEN by orchestrator diagnostic 2026-10-06 (filled once, this commit, before any v5 run) >>> |
| 95 | model_id = unsloth/Llama-3.2-1B-Instruct (snapshot 5a8abab), LlamaForCausalLM, loaded from its own config.json |
| 96 | (sovereign-core PR #226 merged into this branch: catalog from config, tied lm_head, |
| 97 | llama3 rope scaling, Llama 3 chat template, stop set from generation_config) |
| 98 | model_sha256 = 1ff795ff6a07e6a68085d206fb84417da2f083f68391c2843cd2b8ac6df8538f (model.safetensors) |
| 99 | config.json dfb67fd8afe73a1c75245824ef9d64a6ba8983025447e3bf76aa1ea57ee46152 |
| 100 | generation_config.json 6d4f979915331212d7672c68b22a4ddad9e21ed8126cf2bd1ea6b2b88f595c1c |
| 101 | tokenizer_sha256 = 6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b (tokenizer.json) |
| 102 | max_tokens = 96 (AIEN_COMPOSE_MAX_TOKENS) |
| 103 | attempt budget A = 21 000 ms (MEASURED on the GB10 under test load, docs/inference/LLAMA3-ENGINE-VERIFICATION.md: |
| 104 | prefill about 2 100 ms, decode about 5.2 tokens/s => 2 100 + 96 x 192 = 20 532 ms, rounded up) |
| 105 | skill budget B = 29 000 ms (unchanged: rx_compose_run 30 000 ms quiescence wait not raised) |
| 106 | driver timeouts = unchanged from v4 run-campaign.sh at this commit (daemon start wait and per-step values as in the script) |
| 107 | |
| 108 | Declared production-path changes relative to Section 1 (decided from the pre-freeze diagnostic, before any v5 run): |
| 109 | 1. Assistant prefix is `filename:` with NO trailing space (ACCEPTANCE-v4 Section 2(1) had `filename: `). |
| 110 | Basis: on the CPU reference the trailing-space prefix produced degenerate output (Qwen2.5-Coder-1.5B, |
| 111 | task 1: a run of zeros) and the v4 reply; without the space the same models answered in the format. |
| 112 | 2. The proposal template no longer contains the `Top-level entries:` line (spine.rs proposal_prompt). |
| 113 | Basis: Llama-3.2-1B-Instruct, greedy, 5 goals: with the line the proposed path copied README.md for |
| 114 | 2 of 3 .md goals; without it 5/5 paths equalled the goal's path. Raw runs: orchestrator scratch |
| 115 | ~/.claude/jobs/a7c5d201/tmp/diag/llama32-1b-v5*.json (not committed). |
| 116 | Why this model: the v4 prompt through the sovereign-core CPU reference backend and HF transformers gives |
| 117 | output ids identical to the GB10 v4 reply (no inference divergence); TinyLlama 0/3 tasks, Qwen2.5-Coder-1.5B |
| 118 | 1/3, Qwen2.5-7B 1/3, Llama-3.2-3B 1/3, Llama-3.2-1B 2/3 under the strict format on the CPU reference; |
| 119 | Llama-3.2-1B on the GB10 is token-identical to the CPU reference on 3 tasks (PR #226). 3B is blocked on |
| 120 | the GB10 (omega attention accepts head size 64 only). |
| 121 | <<< end of block <<< |
| 122 | ``` |
| 123 | |
| 124 | Fixed here, not part of the block: |
| 125 | - Decoding greedy (temperature 0), stop on the model's end-of-sequence token. |
| 126 | - Retry policy as ACCEPTANCE-v3 Section 3b: at most 3 attempts per task; attempt 1 always |
| 127 | starts; attempt k > 1 starts only if at least A is left of B; each attempt's limit is what is |
| 128 | left. An automatic retry inside the Skill is not a rescue. |
| 129 | - The receipt records, per attempt, `finish_reason` next to `tokens` and `ms`. Q3 reads it. |
| 130 | |
| 131 | ## 6. Binding and run conditions |
| 132 | |
| 133 | As ACCEPTANCE-v4 Section 4: omega pinned by `omega.lock` 62b6a28 for the GPU engine and |
| 134 | librx_compose unless the Section 5 block declares otherwise; GB10 hold through |
| 135 | `quietlock hold --minutes <= 20` with start and release whispers (`crumb whisper`); the |
| 136 | Spark GPU is used only when `~/workspace/.spark-quiet` does not exist; three driver launches |
| 137 | (T1, T2, T3) inside holds; the verdict is whatever the rows give; performance is an observation. |