From 0f683c15fd3d3656ff49b29fafbd93b6327f1075 Mon Sep 17 00:00:00 2001 From: Robert Allan James Date: Wed, 26 Aug 2026 00:52:36 -0400 Subject: [PATCH] FABRIC-3.md: close the live-MIGRATE verification gap; report a USE/RUN shadowing bug Confirmed the real MIGRATE dispatch fires live: a temporary boot probe (STADIUM-ADMIT + STADIUM-EVICT against the live Artemis VM, inserted into the existing 4.6 self-test and reverted immediately after capture) produced "Stadium: dispatch cell=63257 behaviour=MIGRATE lbn=100" with blk_flush(100) firing and zero error -- closes the honest gap left open in the previous commit. Interactive flooding alone couldn't reach this: Hera's reservoir sits at the Q48_ONE/3 floor from boot self-tests, so block-touch candidates pull 0 heat and can never out-density an existing resident, a pre-existing reservoir-floor/eviction interaction unrelated to this pass. Also reports (not fixes, per CLAUDE.md) a real dictionary-shadowing bug found while chasing this: capsules/lib.4th:13 redefines USE as EXEC, shadowing the C primitive mama_word_use() (REPL VM-redirect) with an unrelated capsule-loading meaning -- same for RUN at lib.4th:14. Same bug class as the K-PUSH dictionary-shadowing issue. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01CXjAPTEKrgY2Mrk25KoLDn --- FABRIC-3.md | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/FABRIC-3.md b/FABRIC-3.md index 3554eba..ecc35a9 100644 --- a/FABRIC-3.md +++ b/FABRIC-3.md @@ -317,18 +317,37 @@ other three become honest, explicit punch-list items instead of being touched sp identically across all three; `BLOCK`/`BUFFER` touches exercised live from the REPL on amd64 and riscv64 with no crash; a 22,000-distinct-block flood loop (amd64, artificially shrunk to a 20,971-cell Stadium via a one-off smaller `-m` to make quota pressure reachable) ran clean under - heavy admission-path load with no corruption. **Honest gap, not silently claimed:** a live - `MIGRATE lbn=...` console print was NOT directly observed firing in this session. Root cause - traced, not a defect in this work: Hera's reservoir was already sitting exactly at the - `Q48_ONE / 3` floor from the boot-time self-tests before any manual testing began, so every - block-touch candidate pulled 0 heat — and a 0-heat candidate can never be *strictly denser* than - an existing resident, so `stadium_admit()`'s eviction fallback correctly refuses rather than - evicts once the free list is exhausted. This is a pre-existing interaction between the reservoir - floor and density-based eviction (applies equally to word patrons, not something this pass - introduced), not something wrong with the new code. Follow-up: force a live `MIGRATE` fire from - inside a child VM's own REPL context (where the `STADIUM-ADMIT`/`STADIUM-EVICT` diagnostic words - are registered — attempted via `USE` this session, which failed with "EXEC: failed", not yet - root-caused) to directly and deterministically exercise the eviction path with nonzero heat. + heavy admission-path load with no corruption. **Live `MIGRATE` fire confirmed (2026-08-26):** + interactive flooding alone never triggered it — Hera's reservoir was already sitting exactly at + the `Q48_ONE / 3` floor from the boot-time self-tests, so every block-touch candidate pulled 0 + heat, and a 0-heat candidate can never be *strictly denser* than an existing resident, so + `stadium_admit()`'s eviction fallback correctly refuses rather than evicts once the free list is + exhausted (a pre-existing reservoir-floor/density-eviction interaction, applies equally to word + patrons, not introduced by this pass). Closed deterministically instead with a temporary boot + probe (`kernel_main.c`, inserted into the existing Artemis 4.6 self-test block, reverted + immediately after capture — no code left behind): `100 65536 0 STADIUM-ADMIT ... STADIUM-EVICT` + against the live Artemis VM. Captured live: `Stadium: dispatch cell=63257 behaviour=MIGRATE + lbn=100`, followed by `DBG err after MIGRATE probe=0` — `blk_flush(100)` fired for real, with + the correct LBN threaded through from the departing patron's `identity` field exactly as + designed. (Artemis's own reservoir went briefly out of Q48_ONE-balance during the probe — raw + `STADIUM-ADMIT` doesn't debit the reservoir on its own, by its own doc, so a heat value handed + to it directly is invented, not pulled; harmless here since Artemis is killed and her whole + economy discarded immediately after, and Hera's own conservation was independently confirmed + back at the normal 43691/21845/65536 baseline afterward.) +- [x] **Bug found and reported, not fixed (2026-08-26): `capsules/lib.4th:13` shadows the C + primitive `USE`.** While chasing the live-MIGRATE test above, `S" Artemis" USE` (meant to + redirect the REPL into Artemis's own vocabulary, `mama_word_use()`) instead printed `EXEC: + failed: Artemis`. Root cause: `capsules/lib.4th:13` defines `: USE ( addr u -- ) EXEC ;` — a + FORTH word with the same name but a completely different meaning ("load/exec a capsule"), + which shadows the C-registered `USE` in dictionary search order since `lib.4th` loads after + primitive registration. `lib.4th:14` does the identical thing to `RUN` (`: RUN ( addr u -- ) + EXEC ;`), which CLAUDE.md also names as an untouchable C primitive ("BIRTH, RUN, USE are + primitives — registered in C exactly like DUP, BYE, EXEC"). Same bug class as the K-PUSH + dictionary-shadowing issue (`docs/working/architecture/K-PUSH-DICTIONARY-SHADOWING-BUG- + 20260704.md`). Per CLAUDE.md's rule against unrequested fixes, this is reported here, not + patched — `lib.4th`'s `USE`/`RUN` were presumably meant as private helpers for + `doe-campaign.4th`-style capsules and never intended to collide with the REPL primitives of + the same name. - [ ] Scope VM-`COOL`: confirm whether `capsule_vm_kill()`/Tripod's existing VM lifecycle has any real hook point equivalent to `stadium_evict()`, or needs the same kind of admission work `MIGRATE` needs. **Deferred (2026-08-25)** per the user's own "we're going to have to