From 0b4a2d9fd95239fce823fa3a8481c018119a0328 Mon Sep 17 00:00:00 2001 From: aien Date: Sun, 11 Oct 2026 01:36:21 -0500 Subject: [PATCH 1/3] WHOLE-SYSTEM-E2E v1.5 addendum: fixed run root WSE2E_RUN_ROOT, declared before RUN-6 (R6, #402) Co-Authored-By: Claude Opus 5.5 --- .../ACCEPTANCE-v1.5-fixed-root.md | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 docs/campaigns/whole-system-e2e/ACCEPTANCE-v1.5-fixed-root.md diff --git a/docs/campaigns/whole-system-e2e/ACCEPTANCE-v1.5-fixed-root.md b/docs/campaigns/whole-system-e2e/ACCEPTANCE-v1.5-fixed-root.md new file mode 100644 index 00000000..e1d3b13f --- /dev/null +++ b/docs/campaigns/whole-system-e2e/ACCEPTANCE-v1.5-fixed-root.md @@ -0,0 +1,71 @@ +# WHOLE-SYSTEM-E2E, harness v1.5: a fixed run root (RUN-6-GB10 onward) + +Tracking: aien-dev/aien-sovereign-core#402 (R6, owning issue), aien-dev/aien-architecture#190. Contract: +`ACCEPTANCE_E2E.md` FROZEN at aien-architecture b2400fe, sha256 +`9e3d5f4e23d65ac17be8f2f4ca48355f0aaa486f67ff5a8a8044dcdd646d34e8`. This file is committed before the harness change +that implements it. `ACCEPTANCE-v1.md` to `-v1.4-e1.md` stay as written; RUN-1 to RUN-5 stay as recorded. No row, rule, +score, threshold, objective text or input changes. + +## Disclosure: written after RUN-5 showed the path sensitivity + +This control was written after RUN-5-GB10 (`RESULT-RUN-5-GB10.md`). There, E3 failed D4, and a CPU reconstruction of +the E3 model input with the product's own functions showed that the only difference from RUN-3-GB10 (E3 PASS) was the +absolute workspace path the proposal prompt carries once (`spine::proposal_prompt`: `Authorized workspace: {workspace}`): +345 tokens, `prompt_ids_sha256` `ede9f1e8...` under RUN-3's job folder, 347 tokens, `6847127a...` under RUN-5's. Until +now the run state lived under `$CLAUDE_JOB_DIR/tmp/e2e/run`, so the folder name of whichever session started the run +entered the model input. That is an uncontrolled harness variable: attempts under different job folders are not +comparable. + +## The control + +New option `WSE2E_RUN_ROOT=`: the run state (workspaces, home, daemon state, socket, logs) lives there +instead of `$CLAUDE_JOB_DIR/tmp/e2e/run`. Build targets, the verifier binary and the pin checkouts stay under +`$CLAUDE_JOB_DIR/tmp/e2e`; they do not enter the prompt. Without the variable the harness behaves exactly as v1.4 (cpu, +gb10 and artifact modes unchanged, `selftest` still passes). + +**Declared run root for every declared attempt from RUN-6 on: `/home/drakestapleton/.aien-e2e/run`.** It is a neutral +constant, chosen without regard to any prior outcome. It was NOT chosen because of RUN-2/3's path (which was +`.claude/jobs/ade3c837/tmp/e2e/run`); reusing a path because it once passed would be selecting on outcome and is +forbidden. Its E3 prompt token count and `prompt_ids_sha256` are UNKNOWN at declaration: no model input under it has +been built or run before this file is merged. Every later declared attempt uses the same root, so its E3 model input is +the same across attempts and sessions (on this host; the home directory differs on another machine, which is stated as +a limit, not hidden). + +Rules for the option: + +1. The path must be absolute and must be its own real path once created (no symlink, no `..`, no trailing `/`), so the + text in the prompt is exactly the declared text. Otherwise the run stops before any build. +2. An empty directory at the root is removed and recreated; a non-empty one is moved aside to `.old-`, as + v1.4 does with its default run folder. The prompt path is the same either way. +3. The PRE receipt records `run_root` (the path) and `run_root_rule` (this file). +4. Rows E3, E3m and E4 record `prompt_attempts`: for each proposal attempt the daemon reports in its propose output, + `prompt_tokens` and `prompt_ids_sha256` (`report.proposal_attempts[]`, fields the daemon already exposes; + the same values Lane A2 matched in `RESULT-RUN-5-GB10.md`). Recording only; no row is judged on them. A missing + propose file or missing fields give an empty list or nulls, never a failure. +5. A copy of this file is written into the run folder as `ACCEPTANCE-v1.5-fixed-root.as-run.md`. + +## Predictions for RUN-6-GB10 (written before the run) + +| row | prediction | why | +|---|---|---| +| PRE, CTRL-E3a, E2, CTRL-E2, E6, CTRL-E3b, NET, CTRL-E6, CTRL-E4 | PASS | PASS in RUN-5-GB10 with fallback 0; nothing here depends on the path text | +| E3 | PASS or FAIL as measured | UNVERIFIED: the 1B model's E3 text is sensitive to the workspace path (RUN-3 vs RUN-5); the new path has never been run, so no outcome is predicted | +| E3m | PASS or FAIL as measured | same path sensitivity applies to its prompt; PASS in RUN-3 and RUN-5 | +| E4 | PASS or FAIL as measured | PASS on the chip in RUN-5; depends on E3m and on the path text | +| CTRL-E5 | PASS if E3 PASS, else FAIL as a consequence | as RUN-3 and RUN-5: the control cannot change the verdict id when E3 already failed | +| CTRL-E4b | RECORDED | not judged (v1.2) | +| E1, E5, CTRL-E1 | NOT_RUN | gb10 source-build mode; R8 (install) and R7 (second machine) | +| G4, G5 | `fallback_detected: false`; every model-calling row `gpu_executions >= 1` | as RUN-3 and RUN-5 | + +## Rules of this run + +As `ACCEPTANCE-v1.3-gb10.md`: one declared attempt, gb10 mode, from the merged main commit that contains v1.5, folder +`runs/RUN-6-GB10-/`, `WSE2E_RUN_ROOT=/home/drakestapleton/.aien-e2e/run`, started detached, never killed, +`quietlock check` first, the chip free of other runs, nothing under `runs/` edited afterwards. The result names RUN-2, +RUN-3 and RUN-5 as earlier attempts. If E3 fails again under the fixed root, that outcome stands; the root is not +changed to find a passing path. No program PASS is claimed by any outcome of this run. + +## Not part of this control + +The product fix (a stable logical workspace name in the prompt instead of the machine path) is a separate product +issue for Drake's decision: it changes every model input and needs a new baseline. v1.5 only holds the path constant. From ae1d24c157e113d7bd088deafc3d1c7a9665aab2 Mon Sep 17 00:00:00 2001 From: aien Date: Sun, 11 Oct 2026 01:38:03 -0500 Subject: [PATCH 2/3] WHOLE-SYSTEM-E2E harness v1.5: WSE2E_RUN_ROOT fixed run root, run_root and prompt ids recorded (R6, #402) selftest PASS with new positive and negative controls (run-root rule, prompt_fields); mutants of both helpers make selftest fail. Without the variable receipts are unchanged. Co-Authored-By: Claude Opus 5.5 --- scripts/whole_system_e2e.sh | 53 ++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/scripts/whole_system_e2e.sh b/scripts/whole_system_e2e.sh index 97e1fbb6..15abe763 100755 --- a/scripts/whole_system_e2e.sh +++ b/scripts/whole_system_e2e.sh @@ -16,6 +16,10 @@ # the INSTALLED binaries, and adds the CTRL-E1 refused copies (ACCEPTANCE-v1.4-e1.md). ENGINEERING READINESS only for a dry-run-key install. # Without the variable nothing changes. Needs the archive's SHA256SUMS.txt and SHA256SUMS.txt.sig beside it; WSE2E_DRY_RUN_SIGNERS names the # signer file (default: dry-run-signers beside the archive, when present); WSE2E_RELEASE_TAG names the install (default e2e-artifact). +# v1.5: WSE2E_RUN_ROOT= puts the run state (workspaces, home, state, socket, logs) there instead of +# $CLAUDE_JOB_DIR/tmp/e2e/run, so the workspace path inside the model prompt is the same every attempt; PRE records +# run_root, E3/E3m/E4 record the daemon's prompt token count and prompt id per attempt (ACCEPTANCE-v1.5-fixed-root.md). +# Without the variable nothing changes. # # scripts/whole_system_e2e.sh run build the CLI, run the chain E2..E6 + controls, write one run folder # scripts/whole_system_e2e.sh check F the document checks of rows E3/E3m on file F (prints failed ids) @@ -114,6 +118,22 @@ gb10_receipt() { zero_cuda_gate_exit:$zc, daemon_strict_line:$sl, host_load:$hl, gb10_problems:$why}') } +# ---- v1.5 (ACCEPTANCE-v1.5-fixed-root.md): a fixed run root and the prompt ids --------------------------------- +# run_root_ok PATH: 0 when PATH is absolute, has no '.', '..' or empty component and no trailing '/', is at most +# 100 bytes (the daemon socket lives inside it), and, once it exists, is its own real path (no symlink on the way). +run_root_ok() { + case $1 in /*) ;; *) return 1 ;; esac + case $1 in */|*//*|*/./*|*/../*|*/.|*/..) return 1 ;; esac + [ ${#1} -le 100 ] || return 1 + [ ! -e "$1" ] || [ "$(readlink -f -- "$1")" = "$1" ] +} +# prompt_fields PROPOSE_JSON: per proposal attempt, the prompt token count and token-id digest the daemon reports in +# report.proposal_attempts[]; [] when the file or the attempts are absent. Recorded only, never judged. +prompt_fields() { + jq -c '[.report.proposal_attempts[]? | {prompt_tokens:(.prompt_tokens // null), prompt_ids_sha256:(.prompt_ids_sha256 // null)}]' \ + "$1" 2>/dev/null | grep -E '^\[' || echo '[]' +} + # ---- v1.4 (ACCEPTANCE-v1.4-e1.md): install from a release artifact (E1) and the refused copies (CTRL-E1) -------- # ENGINEERING READINESS only: a dry-run-key install is never a public PASS. The functions take every input as an # argument so selftest can run them on a throwaway fixture release with no daemon. @@ -277,6 +297,16 @@ selftest() { [ "$(fallback_lines "$t/logs"/daemon-*.txt)" = 2 ] || { echo "selftest: fallback lines not counted"; rc=1; } gb10_receipt NONE; [ "$(jq -c '[.fallback_count,.fallback_detected]' <<<"$G_JSON")" = '[2,true]' ] && [ -n "$G_WHY" ] || { echo "selftest: fallback not flagged $G_JSON"; rc=1; } ART=$sv_art; LOGS=$sv_logs; PROP_DN=(); GPU_SEEN_DN=""; GPU_SEEN_TOTAL=0; FALLBACK_SEEN=false + # v1.5 (ACCEPTANCE-v1.5-fixed-root.md): run-root rule and the recorded prompt ids, with negative controls. + mkdir -p "$t/root/real"; ln -s "$t/root/real" "$t/root/link"; local rt; rt=$(readlink -f -- "$t/root") + run_root_ok /home/drakestapleton/.aien-e2e/run && run_root_ok "$rt/real" && run_root_ok "$rt/new" || { echo "selftest: a valid run root was refused"; rc=1; } + for bad in relative/run /a/b/ /a//b /a/./b /a/../b /a/.. "$rt/link" "/$(printf 'x%.0s' $(seq 1 100))"; do + ! run_root_ok "$bad" || { echo "selftest: run root '$bad' was accepted"; rc=1; } + done + jq -nc '{report:{proposal_attempts:[{prompt_tokens:347,prompt_ids_sha256:"6847"},{prompt_tokens:350,prompt_ids_sha256:"ab"}]}}' >"$t/p6.json" + [ "$(prompt_fields "$t/p6.json")" = '[{"prompt_tokens":347,"prompt_ids_sha256":"6847"},{"prompt_tokens":350,"prompt_ids_sha256":"ab"}]' ] || { echo "selftest: prompt_fields p6 gave '$(prompt_fields "$t/p6.json")'"; rc=1; } + [ "$(prompt_fields "$t/p5.json")" = '[{"prompt_tokens":null,"prompt_ids_sha256":null}]' ] || { echo "selftest: prompt_fields without ids gave '$(prompt_fields "$t/p5.json")'"; rc=1; } + [ "$(prompt_fields "$t/p3.json")" = '[]' ] && [ "$(prompt_fields "$t/absent.json")" = '[]' ] || { echo "selftest: prompt_fields on no attempts or no file"; rc=1; } # v1.4 (ACCEPTANCE-v1.4-e1.md): E1 and CTRL-E1 on a throwaway signed fixture release (no daemon, no network). [ "$(map_sig release)" = verified ] && [ "$(map_sig dry-run-key)" = dry-run-key ] && [ "$(map_sig internal-test-key)" = internal-test-key ] || { echo "selftest: map_sig wrong"; rc=1; } if command -v ssh-keygen >/dev/null 2>&1; then @@ -335,6 +365,11 @@ D=$JOB/tmp/e2e MODE=${WSE2E_BACKEND:-cpu} # v1.3: cpu (default, v1.2 behaviour) or gb10 (ACCEPTANCE-v1.3-gb10.md) case $MODE in cpu|gb10) ;; *) echo "WSE2E_BACKEND must be cpu or gb10, not '$MODE'" >&2; exit 2 ;; esac ARTIFACT=${WSE2E_ARTIFACT:-} # v1.4: install from a release artifact instead of building the system under test +RUN_ROOT=${WSE2E_RUN_ROOT:-} # v1.5: a fixed run root (ACCEPTANCE-v1.5-fixed-root.md); empty keeps $D/run +if [ -n "$RUN_ROOT" ]; then + run_root_ok "$RUN_ROOT" && mkdir -p -- "$RUN_ROOT" && run_root_ok "$RUN_ROOT" \ + || { echo "WSE2E_RUN_ROOT '$RUN_ROOT' must be an absolute real path (no symlink, '.', '..', '//' or trailing '/'), at most 100 bytes" >&2; exit 2; } +fi TGT=$D/target; RUN_NAME0=RUN-1 [ "$MODE" = gb10 ] && { TGT=$D/target-gb10; RUN_NAME0=RUN-3-GB10; } [ -n "$ARTIFACT" ] && RUN_NAME0=RUN-4-INSTALL @@ -403,7 +438,11 @@ C_T=$(sed -n 's/^tokenizer-json-sha256 = "\(.*\)"/\1/p' "$REPO/release/candidate C_ID=$(sed -n 's/^model-id = "\(.*\)"/\1/p' "$REPO/release/candidate.toml") HOST=$(hostname) +if [ -n "$RUN_ROOT" ]; then # v1.5: the same path every attempt; an empty root is reused, an earlier run is moved aside + RUN=$RUN_ROOT; rmdir -- "$RUN" 2>/dev/null || mv -- "$RUN" "$RUN.old-$(date +%s)" +else RUN=$D/run; [ -e "$RUN" ] && mv "$RUN" "$RUN.old-$(date +%s)" +fi mkdir -p "$RUN"/{state,compose,prov,home,logs,ws-contract/inbox,ws-contract/outbox,ws/inbox,ws/outbox} "$OUT/chain" "$OUT/artifacts" SOCK=$RUN/s; LOGS=$RUN/logs; ART=$OUT/artifacts; WS=$RUN/ws; WSC=$RUN/ws-contract E=(env -u AIEN_OMEGA_DIR -u AIEN_OMEGA_COMPOSE_DIR -u AIEN_OMEGA_GPU_LIB -u AIEN_REQUIRE_BLACKWELL @@ -465,17 +504,24 @@ RUN_ID=$(printf '%s\n%s\n%s\n%s' "$OBJ_ID" "$BIN_SHA" "$W_SHA" "$HOST" | sha256s N=0; PREV=$(printf '0%.0s' $(seq 1 64)); CHAIN=$OUT/chain; ROWS="" rcpt() { # step status evidence [fields json] N=$((N + 1)); local f; f=$(printf '%s/%03d-%s.json' "$CHAIN" "$N" "$1") - local st=$2 ev=$3 gx='{}' + local st=$2 ev=$3 gx='{}' px='{}' if [ "$MODE" = gb10 ]; then # v1.3 G3-G5: counters in every receipt; a fallback or an off-chip model call is a FAIL gb10_receipt "$1"; gx=$G_JSON if [ -n "$G_WHY" ]; then case $st in PASS|RECORDED) st=FAIL ;; esac; ev="$ev | gb10: ${G_WHY# }"; fi fi + if [ -n "$RUN_ROOT" ]; then # v1.5 (ACCEPTANCE-v1.5-fixed-root.md): recorded only, never judged + case $1 in + PRE) px=$(jq -nc --arg r "$RUN_ROOT" '{run_root:$r, run_root_rule:"ACCEPTANCE-v1.5-fixed-root.md"}') ;; + E3|E3m|E4) px=$(jq -nc --argjson a "$(prompt_fields "$ART/$1-propose.json")" \ + '{prompt_attempts:$a, prompt_source:"report.proposal_attempts[].prompt_tokens and .prompt_ids_sha256 of the propose output (ACCEPTANCE-v1.5-fixed-root.md)"}') ;; + esac + fi jq -n --arg oid "$OBJ_ID" --arg rid "$RUN_ID" --arg step "$1" --arg status "$st" --arg ev "$ev" --argjson fields "${4:-{\}}" \ --arg utc "$(utc)" --arg prev "$PREV" --arg commit "$COMMIT" --arg bin "$BIN_SHA" --arg w "$W_SHA" --arg t "$T_SHA" \ - --arg backend "${CUR_BACKEND:-no daemon started}" --arg host "$HOST" --argjson gx "$gx" --argjson rx "${RCPT_EXTRA:-{\}}" \ + --arg backend "${CUR_BACKEND:-no daemon started}" --arg host "$HOST" --argjson gx "$gx" --argjson rx "${RCPT_EXTRA:-{\}}" --argjson px "$px" \ '{objective_id:$oid, run_id:$rid, step:$step, status:$status, utc:$utc, prev_receipt_sha256:$prev, evidence:$ev, repo_commit:$commit, daemon_sha256:$bin, cli_sha256:$bin, model_weights_digest:$w, tokenizer_sha256:$t, - backend_line:$backend, host:$host} + $fields + $gx + $rx' >"$f" + backend_line:$backend, host:$host} + $fields + $gx + $rx + $px' >"$f" PREV=$(sha_of "$f") case $1 in CTRL-*|E[0-9]*) ROWS="$ROWS$1 $st"$'\n' ;; esac echo "[$(date -u +%H:%M:%S)] $1 $st: $ev" | cut -c1-300 | tee -a "$OUT/console.txt" @@ -600,6 +646,7 @@ if [ "$MODE" = gb10 ]; then # v1.3: the gb10 rows as run, the zero-CUDA gate o [ -n "$ARTIFACT" ] || { cp "$D/zero-cuda-gate.txt" "$ART/zero-cuda-gate.txt"; cp "$D/pins.txt" "$ART/pins.txt"; } # artifact mode wrote its own gate output at the install fi [ -z "$ARTIFACT" ] || cp "$REPO/docs/campaigns/whole-system-e2e/ACCEPTANCE-v1.4-e1.md" "$OUT/ACCEPTANCE-v1.4-e1.as-run.md" +[ -z "$RUN_ROOT" ] || cp "$REPO/docs/campaigns/whole-system-e2e/ACCEPTANCE-v1.5-fixed-root.md" "$OUT/ACCEPTANCE-v1.5-fixed-root.as-run.md" FIX=$(cd "$WS/inbox" && sha256sum -- * | LC_ALL=C sort -k2 | jq -R -s 'split("\n") | map(select(length>0) | split(" ") | {name:.[1], sha256:.[0]})') PRE_OK=1; PRE_EV="host $HOST; model $C_ID" [ "$W_SHA" = "$C_W" ] && [ "$T_SHA" = "$C_T" ] || { PRE_OK=0; PRE_EV="$PRE_EV; model digests differ from release/candidate.toml"; } From 6903ed29942042caccb3572d8dd929bfa000944a Mon Sep 17 00:00:00 2001 From: aien Date: Sun, 11 Oct 2026 01:38:17 -0500 Subject: [PATCH 3/3] crumb compile (R6, #402) Co-Authored-By: Claude Opus 5.5 --- .crumb | 16 ++++++++-------- scripts/.crumb | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.crumb b/.crumb index 16647b79..b1ab93cf 100644 --- a/.crumb +++ b/.crumb @@ -64,8 +64,8 @@ "generated": { "children": [ { - "digest": "521340a68dbb187a25bfa88a2e98a33caa3d2e926eff288c055935e93941a1a0", - "last_commit": "cb15198", + "digest": "83fec06a58e8f390a0760fc7a1a56f92e8a367205ede8ef2b88b02069854694f", + "last_commit": "ae1d24c", "name": "scripts", "purpose": "" }, @@ -76,15 +76,15 @@ "purpose": "" } ], - "children_root": "sha256:b4a88d00fbc5cf930963548825322b50b2e5f495415573584d303253a36ce020", - "compiled_at": "2026-10-11T06:18:37Z", + "children_root": "sha256:487a2166057a996c7eb8d85014729071455e5ac4b1728a0b23f5a3cbfada4ab7", + "compiled_at": "2026-10-11T06:38:07Z", "compiler": "crumb-compile/1", - "digest": "sha256:cd76a440fc5e9fdc071466579f368bf177bab0ea6f2f17ed6f2f999802a44088", + "digest": "sha256:13d36b4f1f1e0884875d137809af76c84bb90b4f2a67804acee6ff5778764bcc", "evidence_files": 187, "evidence_root": "sha256:27ee0353cb4d4aae2b7dbce2bfe0d9f4ef2a94cd7a4555b84684d59372503280", - "files": 3307, - "generated_at_commit": "1cb43c021cbd57c42886726f1832122cbb89ce80", - "source_tree": "sha256:98e62bb464bbb0b16ac09e10237607c8fdc8e802ab7fa0362fafbef16aa037ab" + "files": 3308, + "generated_at_commit": "ae1d24c157e113d7bd088deafc3d1c7a9665aab2", + "source_tree": "sha256:381fa88865ed196ef23dc7932be16ef7808098cc50cac2cbfd5c0fe997605ac2" } }, "history": [], diff --git a/scripts/.crumb b/scripts/.crumb index 0f2dab99..6b299905 100644 --- a/scripts/.crumb +++ b/scripts/.crumb @@ -4,14 +4,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-11T05:24:02Z", + "compiled_at": "2026-10-11T06:38:07Z", "compiler": "crumb-compile/1", - "digest": "sha256:521340a68dbb187a25bfa88a2e98a33caa3d2e926eff288c055935e93941a1a0", + "digest": "sha256:83fec06a58e8f390a0760fc7a1a56f92e8a367205ede8ef2b88b02069854694f", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 33, - "generated_at_commit": "cfdb3e8771e42f5abc362aef39cda85f86d6bde4", - "source_tree": "sha256:e9835443ef2c993f7589559163f8478a338c5edc993daeaaa3bcb6d7d37a9105" + "generated_at_commit": "ae1d24c157e113d7bd088deafc3d1c7a9665aab2", + "source_tree": "sha256:8f381c78e075ecfa3aef94cbf86068d40702dd43fd00ae2b4352ddd31c73d97b" } }, "parent": {