feat(adr-0250): T2a multi-register executor — multi-entity arithmetic (18/18 wrong=0) #72
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/adr-0250-t2a-executor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second phase of the Tier-2 arc (design spike merged in #71). The multi-register executor takes multi-entity arithmetic onto the substrate.
What it does
evals/multi_register_program.py—compile_multi_register_program(graph)→ a register program (a seed + turns per entity);execute_multi_register_program(program)runs it as a product of independent conformal lines (one register/null-point per entity). Per-register ops (add/subtract/multiply/divide by constants) reuse the Tier-1 transport; a transfer is a coupledT₋ₖ/T₊ₖpair on disjoint registers, so exactness across the independent null points is inherited from ADR-0249 P1.Load-bearing result
Real GSM8K single-entity refused holdout: 18/18 solved, wrong = 0 — coverage 26/50 → 44/50. (The 6 total-like "altogether" cases are correctly refused pending the certified summation turn, 2b.)
Transactional atomicity (Shay's Q)
The register mapping is an immutable snapshot; a transfer runs prepare → validate → commit: both candidate states are relaxed into locals, validated (both converged and conservation), then a new mapping is produced only on full success. A failure anywhere means the new mapping is never built → the original stands → no partial-mutation window, no rollback. Records append only on commit; any abort raises a typed
MultiRegisterErrorand aborts the whole program (fail-closed — no partial answer, wrong=0 preserved).Relative conservation pin (hard-reject)
Σ decode(after) ≡ Σ decode(before)within a relative tolerance|Δ| ≤ rtol·max(1,|before|)— decoded-quantity error scales with magnitude (found ongma-050, which chains to 222), so an absolute tolerance is brittle; a genuine non-conserving transfer is off by a wholekand is still caught. Mirrors howrelax_to_groundcertifies against its own spectrum.Ledger + governance
Content-addressed
MultiRegisterRecordchain carries the entity + certificate id + step, never a decoded value;GENESIS_DIGEST-linked;verify_multi_register_chainmirrorsverify_replay_chain. Fail-closed taxonomy: total-unknown (→ summation, 2b), derived operand, non-affine kind, non-positive scale, unit mismatch, unknown endpoints. Off-serving (A-04); no gate activated.Tests
tests/test_adr_0250_multi_register.py— 11/11 green. Transfers (both registers), large-magnitude relative conservation, real-holdout 18/18 wrong=0, conservation, chain verify + tamper + entity provenance, anti-hollow record shape, determinism, and five refusal classes.Next
2b certified summation turn (decode-staged over registers) for the 6 total-like cases → targeting 50/50; then the instrument domain + ADR-0250.
[Verification]:
uv run python -m pytest tests/test_adr_0250_multi_register.py -q→ 11 passed;uv run core test --suite smoke -q→ 176 passed.