aien-architecture-mv
Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.
Brought by drakestapleton
GitHub aien-dev/aien-architecture-mv#337 (code only)
Apply it
git checkout -b patch-5dc03ec9f40b4d6a fabf7b765a29d1e9b7d45c5b52852ee39bbfad56 curl -fsSL https://interplane.io/drakestapleton/aien-architecture-mv/patches/5dc03ec9f40b4d6a.patch | git am
Provenance
github-import 1
aien-dev/aien-architecture-mv
337
20f8e8e6963c1aeee6ec81c4a7b2cb62dfe60b2c
{"kind":"github-import","owner":"aien-dev","repo":"aien-architecture-mv","number":337,"url":"https://github.com/aien-dev/aien-architecture-mv/pull/337","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:38:02Z","metadata":"unavailable","state_derived":true}
Changes
diff --git a/docs/adr/0033-aien-verification-pipeline.md b/docs/adr/0033-aien-verification-pipeline.md index 7883ca5..2f97476 100644 --- a/docs/adr/0033-aien-verification-pipeline.md +++ b/docs/adr/0033-aien-verification-pipeline.md @@ -86,5 +86,16 @@ Identity 1-4 and 17: Slice D. Verdict algebra 5-7: Slice E. Analog 8-10 and 19: The names and paths above are corrected by what the inventory of 2026-10-11 found on the machine and in the code; nothing in Decisions 2 to 8 changes. The Spark worker is not a new binary and is not called `aien-verify` (that name now belongs to the whole-system end-to-end verifier, `tools/aien-verify`, sovereign-core #414); it is the subcommand **`aien-test worker`** of the one runner, with `plan`, `test changed`, `test crate:NAME`, `status` and `verify COMMIT` beside it, and the bash wrapper `aien-local-ci` only forwards arguments (the `ready` logic is Rust). Worktrees live under **`/var/lib/aien-run/wt/<repo>/<sha>`**, owned by the trusted side and built in by the unprivileged `aien-run` user, not under the worker's home. Two contexts are required on `main` once Phase 3 is reached: **`AIEN Verification`** (the GitHub thin gate of Decision 11) and **`AIEN Verification (Spark)`** (the trusted worker's SHA-bound status; it cannot be forged without the worker's token). Trust anchors are read from the protected base ref, never from the head under test: the worker and the thin gate take `.aien/verify.pub`, `.aien/always` (gate names that are never dropped by path filtering, the explicit allow-list of Decision 12) and `.aien/unmapped-ok` (base-ref globs such as `docs/**`; a changed path that matches needs only the always set) from `origin/main`. A changed path that matches neither a manifest's `inputs` nor `.aien/unmapped-ok` makes the plan UNMAPPED and the commit verdict NOT_RUN, never PASS. Any head that changes the pipeline's own configuration (`.aien/`, `tests/gates/`, `.github/workflows/`, `.forgejo/`, `tools/aien-test/`) is **`BLOCKED_OPERATOR`**: the operator runs it by hand, exactly as Decision 2 already treats `requires: operator`. Every gate required at base must exist and PASS at head; a gate deleted at head is NOT_RUN. Every manifest under `tests/gates/` declares explicit `inputs` (the ARCH-0028 implied-inputs rule is meaningless there). Of Decision 10, `aien-test graph` and `aien-test cache status|prune` are stretch, not required for the pipeline to be complete. `.aien/verify.pub` may hold several public keys, one per line, **oldest first**; a verifier accepts a bundle signed by any listed key, rotation appends a key, and revocation is a pull request that removes the key, which is itself a BLOCKED_OPERATOR change. Phase 2 of Decision 11 is not complete for a repository until, for at least **three commits** of that repository, the hosted verdict set and the local signed bundle's verdict are recorded as agreeing; disagreement still blocks Phase 3. The offline bundle queue and the reconnect sync are test-covered, not assumed. +## Amendment 2026-10-26 (org audit stamps on the receipts shelf) + +Approved by the maintainer, Drake Stapleton, on 2026-10-26 (relayed to the audit lane by the coordinating agent). Nothing in Decisions 1 to 14 or in the 2026-10-11 amendment changes, and published `<repo>/<sha>/bundle.json` files keep their bytes, layout and meaning. + +1. **A second record type on the same shelf.** `aien-dev/aien-receipts` gains one top-level subtree, `audit/`, holding *org audit stamps*: one `audit/stamps/<repo-or-anonymous-id>/<sha>/stamp.json` per audited commit plus the reviewer reports it cites, an org index, and live line-of-code counts. A stamp is not a VerificationBundleV1, is not signed with the Spark bundle key and is never an input to `aien-test verify-bundle`, the AIEN Alpha job or any merge gate. +2. **What a stamp claims.** It binds the repository, commit and tree to: DETERMINISTIC-CHECKED results (tool, pinned version, command and SHA-256 of the normalized output, so anyone can re-run the check at the same commit and compare); MODEL-REVIEWED opinions (agent role, model, effort, files covered, SHA-256 of the report), labelled as opinions, not proof; findings with their fix pull requests; NOT_RUN items; and a verdict PASS, PASS-WITH-NOTES or FAIL. The verdict algebra of Decision 7 still holds for bundles; a stamp's verdict is not a gate verdict. +3. **Signing.** Stamps are signed by GitHub artifact attestations (Sigstore, keyless) produced by a workflow in `aien-receipts`, after that workflow re-runs the deterministic checks of each public stamp on a hosted runner and finds the same output hashes. No new long-lived key is created. A valid attestation proves which workflow, at which shelf commit, published the stamp bytes; it does not prove the reviews are right. +4. **Workflows, only for `audit/`.** The rule "no workflows run in this repository" is narrowed to: workflows may run only for the audit subtree (attest new stamps; on a schedule, re-verify stamps, mark a stamp STALE when the repository's default branch has moved past the stamped commit, and recount lines of code at each public default-branch HEAD). They never write, move or re-sign anything under the bundle directories. +5. **Private repositories** appear only under anonymous ids (`private-01` and so on) with a salted SHA-256 commitment to the name; the salts stay off the shelf. Their counts and checks are labelled self-reported by the owner's machine, not independently reproducible. +6. **Append-only.** A published stamp is never edited; a correction is a new file beside it (the `.correction.json` convention used by omega-evidence). The live files `audit/loc/latest.json` and `audit/status.json` are mutable pointers by design; their history is appended to `audit/loc/history.jsonl`. + ## Not decided here The analog device itself; the final receipt wire contract (ARCH-0029 Decision 6 owns it); whether `aien-verify` later runs as its own daemon under the Spark supervisor or stays a cron-driven poller; pool sizes beyond the ARCH-0028 defaults.