§H.12 steps 5-6: pin Hera/Hermes/Artemis in generic capsule-birth admission

capsule_birth.c's generic admission block now registers a session for
every born VM (session_register) and pins it (session_set_pinned) when
the birthing capsule is Hera/Hermes/Artemis.

Bug found and fixed via a temporary probe (written, run, captured,
reverted): the fleet-foundation name check first used an exact-match
comparison against "Hermes"/"Artemis", but capsule_name is actually
"hermes:init.4th"/"artemis:init.4th" (the real namespace:filename
convention) -- the check silently never matched, both would-be-pinned
VMs stayed unpinned. Fixed with a new vm_name_prefix_eq_nocase() helper
matching everything before a literal ':'. Probe confirmed pinned=0 before
the fix, pinned=1 after, on all relevant VMs.

Session.parent is hardcoded to vm_uuid_hera() for now (every birth
through this path is Hera-initiated today); step 7 generalizes this to
the actual birthing VM's own id.

Verified 3-arch boot to ok> (amd64/aarch64/riscv64) on the final,
probe-free code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-09-03 06:26:50 -04:00
co-authored by Claude Opus 5
parent 67793ea4a1
commit 09998af999
15 changed files with 46014 additions and 16 deletions
+17 -5
View File
@@ -3982,11 +3982,23 @@ work, not new invention.
unaffected.
**Phase 2 — Pin Hermes/Artemis (Correction 1 above)**
- [ ] **5.** In `capsule_birth.c`'s existing generic admission block, add a name check
("Hera"/"Hermes"/"Artemis" → pinned, everything else → unpinned) routed through
`session_register()`/`session_set_pinned()`.
- [ ] **6.** Confirm (boot-log/diagnostic) Hermes and Artemis now admit pinned; ordinary
births still admit unpinned.
- [x] **5. DONE 2026-09-03, one bug found and fixed via probe.** `capsule_birth.c`'s generic
admission block now registers a session for every born VM and pins it if
`is_fleet_foundation` (Hera/Hermes/Artemis). Admits unpinned then pins after, same ordering
as step 4 (`stadium_admit()` confirmed to have no admission-time pin handling). **Bug found
by step 6's probe**: the fleet-foundation name check first used
`vm_name_eq_nocase(capsule_name, "Hermes")`, exact match — but `capsule_name` is actually
`"hermes:init.4th"`/`"artemis:init.4th"` (the real "namespace:filename" convention), never
a bare name, so the check silently never matched. Fixed with a new
`vm_name_prefix_eq_nocase()` helper matching everything before a literal `:`. Parent is
hardcoded to `vm_uuid_hera()` for now (every birth through this path is Hera-initiated
today) — step 7 generalizes this to the actual birthing VM's own id.
- [x] **6. DONE 2026-09-03.** Confirmed via a temporary probe (`console_println` after
`session_set_pinned()`, captured once then reverted per this project's probe convention):
first run showed `hermes:init.4th pinned=0` / `artemis:init.4th pinned=0` (the bug above),
second run after the fix showed `pinned=1` for both. Probe code fully reverted before
commit — only its finding (the `:`-suffixed capsule-name format) remains, in step 5's doc
comment and this entry.
**Phase 3 — Session fields wired at birth**
- [ ] **7.** Populate `Session.parent` from the birthing VM's `stadium_vm_id`.