feat(adr-0250): T2a multi-register executor — multi-entity arithmetic (18/18 wrong=0) #72

Merged
core-labs merged 1 commit from feat/adr-0250-t2a-executor into main 2026-07-18 21:20:01 +00:00
Owner

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.pycompile_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 coupled T₋ₖ / 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 MultiRegisterError and 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 on gma-050, which chains to 222), so an absolute tolerance is brittle; a genuine non-conserving transfer is off by a whole k and is still caught. Mirrors how relax_to_ground certifies against its own spectrum.

Ledger + governance

Content-addressed MultiRegisterRecord chain carries the entity + certificate id + step, never a decoded value; GENESIS_DIGEST-linked; verify_multi_register_chain mirrors verify_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.py11/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.

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 coupled `T₋ₖ` / `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 `MultiRegisterError` and 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 on `gma-050`, which chains to 222), so an absolute tolerance is brittle; a genuine non-conserving transfer is off by a whole `k` and is still caught. Mirrors how `relax_to_ground` certifies against its own spectrum. ## Ledger + governance Content-addressed `MultiRegisterRecord` chain carries the **entity** + certificate id + step, never a decoded value; `GENESIS_DIGEST`-linked; `verify_multi_register_chain` mirrors `verify_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.
core-labs added 1 commit 2026-07-18 21:17:05 +00:00
Multi-entity arithmetic as a product of independent conformal lines: one
register (null point) per entity; per-register affine ops reuse Tier-1 transport;
transfer = coupled T-k/T+k on disjoint registers (exact by P1 per-line exactness).

Transactional atomicity: immutable register mapping, prepare->validate->commit —
both candidate states relaxed into locals, validated (both converged AND
conservation), then a NEW mapping only on full success. Failure anywhere = new
mapping never built, original untouched (no partial mutation, no rollback); abort
raises typed MultiRegisterError and aborts the whole program (fail-closed).

Conservation pin = hard-reject, RELATIVE (|after-before| <= rtol*max(1,|before|)):
decoded-quantity error scales with magnitude (found via gma-050 chaining to 222),
so absolute tol is wrong; relative still catches real violations (off by whole k).

Content-addressed MultiRegisterRecord chain carries entity + certificate id +
step, never a decoded value; GENESIS-linked; verify_multi_register_chain mirrors
verify_replay_chain. Tier-2a fail-closed taxonomy: total-unknown (needs summation
= 2b), derived operand, non-affine kind, non-positive scale, unit mismatch,
unknown endpoints. Off-serving (A-04).

REAL GSM8K single-entity refused holdout: 18/18 solved wrong=0 (26/50 -> 44/50).
11/11 pins green.

[Verification]: uv run python -m pytest tests/test_adr_0250_multi_register.py -q
core-labs merged commit efd5335e86 into main 2026-07-18 21:20:01 +00:00
core-labs deleted branch feat/adr-0250-t2a-executor 2026-07-18 21:20:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: core-labs/core#72
No description provided.