Architecture research toward an agent-native operating system; rigorous, pre-prototype, and intentionally self-aware.

Commits on master

D-012 rev16 correction (reviewer:d012-rev15-verifier MEDIUM): stale-entry reconciliation now requires the referenced attempt's durable binding to EQUAL the looked-up digest. Previously a residue entry (digest B1 -> attempt T1, ALLOCATED, from a failed commit whose compensation failed) became permanently false-binding if T1 legitimately retried with a different digest B2: the entry then pointed at a CONSUMED record, passed the state check, and B1 was rejected as replay forever despite T1's durable record showing B2. Now: a binding-state record whose binding differs from the looked-up digest is stale residue, released only after verifying the attempt's actual digest holds the canonical index entry (otherwise the unverifiable index fails CLOSED); genuine replay still requires binding-state AND binding equality; ALLOCATED/ABANDONED entries remain non-binding residue. Also: commit-boundary error objects are front-loaded (an allocation failure at the boundary can no longer prevent the typed outcome) and exception handlers narrowed from BaseException to Exception — asynchronous process-control exceptions may propagate untyped but under the reserve-first order can leave at most a non-binding self-reconciling residue, the conservative direction; the absolute typed-guarantee claim is scoped accordingly per the reviewer's residual-risk note. Injection-machinery classes hoisted to module level. Alternate-digest retry probe added and mutation-checked against the state-only guard. 68/68 tests.
david.boston committed
D-012 rev15 correction (reviewer:d012-rev14-verifier MEDIUM): the two-sided replay commit was lock-atomic but not EXCEPTION-atomic — the CONSUMED attempt write and the _consumed_bindings insertion were separate potentially-allocating operations, so a failure between them (e.g. MemoryError during dict growth) left an attempt durably CONSUMED with no global replay entry, defeating global uniqueness. The commit is now exception-atomic by construction: (1) allocation is front-loaded (the CONSUMED record and index entry are prepared before the first durable write); (2) the index reservation goes FIRST — its failure leaves the attempt retryable ALLOCATED with nothing written; (3) a failure of the durable attempt write triggers allocation-free compensation (existing-key deletion) restoring the neither-side state; (4) a residue surviving even compensation failure (catastrophic only) is NON-BINDING — the duplicate check now verifies the recorded attempt's durable state, so an ALLOCATED/ABANDONED-side entry causes conservative rejection until the next consumer reconciles it away, never duplicate admission; compensation failure itself is swallowed into the typed FAIL_CLOSED outcome (guaranteed typed boundary), with the fixed detail distinguishing released vs self-reconciling reservations. Failure-injection probe added covering all three boundaries plus reconciliation and genuine-replay retention; guards mutation-checked against the rev14 commit shape and the reconciliation removal. 67/67 tests.
david.boston committed
david.boston committed