§H.12 step 4: Hera registers as session zero; punch list to checkboxes

Rewired stadium_birth_hera() to admit unpinned then register through
session_register()/session_set_pinned() instead of setting
STADIUM_FLAG_PIN directly on the candidate header. Self-referential
parent (vm_uuid_hera(), vm_uuid_hera()), matching capsule_run.h's
parent_vm_id == vm_id root convention. Soft-fail, non-fatal, if
session_register() fails -- Hera's actual Stadium admission is what the
patron-zero invariant is about. Wired session_boot_init() into
kernel_main.c right after stadium_boot_init(), before stadium_birth_hera().

Also converted §H.12's punch list from bold "DONE" markers to this
document's established - [ ]/- [x] checkbox convention (already used
throughout §A), for consistency.

Verified 3-arch boot to ok> (amd64/aarch64/riscv64), no soft-fail message
on any arch, Hermes/Artemis births unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-09-03 06:15:53 -04:00
co-authored by Claude Opus 5
parent a621131ef6
commit 67793ea4a1
11 changed files with 27673 additions and 64 deletions
+9
View File
@@ -58,6 +58,7 @@ EFI_RUNTIME_SERVICES *g_sk_runtime_services = NULL;
#include "starkernel/vm/stadium.h"
#include "starkernel/vm/stadium_words.h"
#include "starkernel/vm/stadium_blocks.h"
#include "starkernel/session.h"
#include "starkernel/capsule_generated.h"
#include "starkernel/capsule_loader.h"
#include "starkernel/capsule_birth.h" /* capsule_birth_mama, capsule_find_mama_init */
@@ -512,6 +513,14 @@ static void kernel_main_deep(BootInfo *boot_info) {
* yet, so a failed allocation logs and boot continues. */
(void)stadium_boot_init();
/* Session: boot-time allocation (FABRIC-3.md §H.12 step 4), sized from
* stadium_max_vm_count() so it must run after stadium_boot_init() above
* and before the first session is registered (stadium_birth_hera()
* below registers Hera as session zero). Soft failure, same reasoning
* as stadium_boot_init() -- stadium_birth_hera() itself soft-fails a
* failed session_register() rather than treating it as fatal. */
(void)session_boot_init();
/* item 4.1, FABRIC.md item 3.6/§17.7: actually enforce "Hera is patron
* zero" before anything else can land on cell 0 via the free list, then
* bring up the word layer's map. Both must happen before the first word