interplane.Get Omega
Read in your language

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

branch main Branches Tags History

aien-sovereign-core-mv / evidence / aienet0-tur-ledger-20261027 / capacity-v2-notes.txt

135 lines · 7940 bytes Raw Blame History
1CAPACITY-DISCHARGE CORRECTION: HOST_TESTED ON THE DGX SPARK
2
3Finding and cause
4The shared wcmd append precheck required SKEYS + 4 <= KCAP for every new
5mutation, including settle/refund. Those operations touch only the reserved job
6and its existing account IDs; they allocate no keys. Near capacity, legitimate
7escrow could therefore become impossible to discharge. The defect is present in
8the authenticated source at Core #794's initial commit
96a0bfc0bb0b08d6fa08bc8109536218f50dd8b2c, not just merged #792.
10
11Fix
12Remove the blanket append guard. vpre counts its new PID plus a missing requester;
13vres counts its new job plus missing distinct provider/verifier accounts, with
14an existing requester required. Refuse 14 before append if the exact slots do
15not fit. Settlement/refund remain allocation-free, including at a full table.
16No signature, ownership, conservation, single-writer or fsync gate is weakened.
17No journal-format or authorization-message change from the earlier v2 commit.
18
19Pins
20- Pre-fix source SHA-256:
21 b188d4c8324eb1d99f9d5e0d08549c54358afca369171974433b456f59ae4ca6
22- Pre-fix native binary /tmp/ledger-auth-bin-final:
23 d12d05cda56604410b8716602a7e3988a0e90901d28294f04f6ea7d8081f435c
24- Fixed source SHA-256:
25 f47d8c6374f5e8a49068cc5372e97582e3eb81e87c5e53a661ea62ebb4279713
26- Fixed production binary /tmp/ledger-auth-capacity-bin and the independently
27 gate-built /tmp/ledger-auth-capacity-gate-bin:
28 afd2fbe7b68a9f5fe44ff67b28830ab2499a482b1a922b237bc1877716a3ef93
29- Compiler omega-mv 6999fa9e6dae4847c155ef4eacaece74f491d3ca seed/out/omc:
30 d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84
31- Final check.sh SHA-256:
32 2bb20abca2e6757ee30763644f87d8ec13df8bb9cdcf255168ec6f18970d0647
33
34Fast reproducible before/after regression
35Actual pre-fix command:
36 OMC=/tmp/ledger-auth-omega/seed/out/omc \
37 TUR_LEDGER_CAPACITY_SOURCE=/tmp/ledger-auth-capacity-before.om \
38 bash om/tur-ledger/check.sh
39Exit 1; capacity-v2-before.out. The overridden input source is the frozen
40pre-fix b188d4c8 above. The top-level `src` line describes the repository's
41current source, not this override. The current harness also prints the explicit
42capacity-source pin to avoid that ambiguity. The assertions are unchanged.
43Both capacity.settle and capacity.refund returned 14; escrow remained open.
44
45The fixed ten-slot fixture fills all slots through actual signed CLI commands,
46refuses new prefund/reserve without journal changes, settles one reservation,
47refunds the other and accepts unchanged once-only retries. A second case has
48one slot left but needs a new job and two account slots: reserve refuses before
49append and a one-slot prefund can still use the last slot. The full gate below
50runs this exact regression and records every PASS.
51
52Production-size fill-to-capacity fixture
53- Raw snapshot: 65,534 correctly chained records; 3 accounts, 2 jobs and 65,531
54 distinct prefund IDs, occupying all 65,536 keys. Two jobs remain reserved.
55- Raw snapshot SHA-256:
56 f37746ce5790659d49ae32f423dd109921c59b46c779561e41dce907f46aafd7
57- capacity-v2-full.journal.gz is 8,306,185 bytes; SHA-256:
58 3cdc3f31b62d1395d5266701252747f1342bfde375deacd289038d336f0c1ae8
59- Public authority config: capacity-v2-full.authority, no trailing LF.
60- Exact pre-signed argument vectors: capacity-v2-full.commands.
61- Actual outcomes: capacity-v2-full.results.tsv. journal_unchanged is a measured
62 SHA-256 equality before/after each command, not an inferred phase label.
63
64A one-off fixture oracle generated native P-256 keys in memory, signed every
65canonical prefund/reserve record and the two final authorizations, and built the
66SHA-256 chain. Oracle: installed Python cryptography 41.0.7, OpenSSL 3.0.13;
67private key objects were dropped after signing and never written to the repository.
68The oracle is verification-only, not ledger implementation or a production
69runtime dependency; no Python source is added. Native Omega verified every
70signature and replayed the actual production-size table. This is a bulk-built
71signed test history, not a claim that the old live writer accepted every fill:
72the old blanket guard stops admitting earlier, which the CLI regression also
73catches. Synthetic job/evidence IDs intentionally test capacity, not real work.
74
75Actual invocations were [BINARY, --journal, DIR, *ARGS] for each argument vector:
76- Before, same full snapshot: settle -> exit 14, refused 14 capacity, unchanged;
77 refund -> exit 14, refused 14 capacity, unchanged.
78- After, same full snapshot: prefund -> 14, unchanged; reserve -> 14, unchanged;
79 settle -> 0, settled JOB7 RECEIPT_A 27 3 10; refund -> 0, refunded JOB8.
80- Final native audit -> exit 0:
81 audit ok records 65536 head 26ebc6a04f4f8ace9a78669e4fdb013508dde61deddb99b5df31a7731aee68be accounts 3 jobs 2 open 0 settled 1 refunded 1 prefunded 65630 balances 65630 escrow 0
82 Raw output is capacity-v2-full-audit.out.
83
84To replay against a built ledger, from this evidence directory, in Bash without
85set -e (the first two exit-14 results are expected):
86 D=$(mktemp -d)
87 gzip -dc capacity-v2-full.journal.gz > "$D/journal"
88 cp capacity-v2-full.authority "$D/authority"
89 while read -r -a args; do
90 before=$(sha256sum "$D/journal")
91 "$LEDGER" --journal "$D" "${args[@]}"; rc=$?
92 case "${args[0]}" in prefund|reserve) expected=14;; *) expected=0;; esac
93 test "$rc" = "$expected" || exit 1
94 if test "$expected" = 14; then
95 test "$(sha256sum "$D/journal")" = "$before" || exit 1
96 fi
97 done < capacity-v2-full.commands
98 "$LEDGER" --journal "$D" audit
99The old binary fails the settlement assertion; the fixed binary gives the audit
100above. The journal fixture and public signatures are replayable without any
101private key. Reconstructing this test context is not provisioning a real ledger.
102
103Full final gate and mutants
104Actual command:
105 OMC=/tmp/ledger-auth-omega/seed/out/omc CRASH_N=200 MUTANT_CRASH_N=0 \
106 TUR_LEDGER_OUT=/tmp/ledger-auth-capacity-gate-bin \
107 bash om/tur-ledger/check.sh
108Exit 0; SUITE PASS; TUR_LEDGER gate: PASS. Raw stdout: capacity-v2-check.out.
109All twelve mutants were killed. capacity-lockup restores the exact blanket
110append guard and fails thirteen capacity assertions. no-slot-preflight deletes
111the allocating-operation checks and fails ten assertions, including unchanged
112journal and partial-reserve refusal. The other ten existing authentication,
113exactly-once, integrity, conservation, durability and recovery mutants still die.
114All 200 random-delay SIGKILL attempts preceded a new durable write; each was
115audited/retried and final balances matched control. The separate strace injection
116proved the post-fsync/pre-ack SIGKILL and once-only retry. Do not describe the
117random-delay trials as 200 post-fsync kills or as interrupted RPC qualification.
118
119Required Core preflight
120 TINYLLAMA_MODEL_PATH=/home/drakestapleton/.cache/huggingface/hub/models--TinyLlama--TinyLlama-1.1B-Chat-v1.0/blobs/6e6001da2106d4757498752a021df6c2bdc332c650aae4bae6b0c004dcf14933 \
121 bash scripts/agent-preflight.sh
122Exit 0, PREFLIGHT VERIFICATION COMPLETE; branch/secrets/style/workspace/advisory
123checks pass. aien-proof reported 58 stamped passes and 0 newly run crates; these
124are reused valid Rust results, not a fresh execution claim. Six pre-existing
125allowed advisory warnings remain. The changed native ledger path above was
126actually compiled/exercised independently of those stamps. The physical model
127blob path is the supported test override; no symlink/advisory gate was relaxed.
128
129Scope
130Local native host evidence only; no GPU, live 18091, deployment, real economic
131authority, malicious filesystem rollback resistance or Core RPC is qualified.
132The actual signed-artifact caller is separately migrated/tested in protocols #67.
133No compiler/language/host primitive/shared harness example changes here; the
134application README and evidence are updated, and no Omega harness guide is stale
135because of this application-specific capacity correction.