Stage O-B: Hera drains her own mail at the idle point, not on the ~1 s idle beat (FABRIC-3.9.0 §2.5)

- sk_vm_idle_point(may_drain_self): with no frame live and mail pending,
  Hera drains one message and returns to the poll loop. Readline passes
  n == 0 (the mid-edit gate), headless 1, the key read 0.
- Removed sk_repl_idle()'s timer-paced drain of Hera's queue and the two
  flags that guarded it (g_mama_interpreting, g_idle_pump_active) -- the
  idle point's frames check already covers that re-entry hazard.

Probe (reverted), all three ISAs: admission -> drain for mail to an idle
Hera 0-1 beats (was up to 100); a message arriving mid-edit is held until
the line is entered (2080-3587 beats), never printed into typed text; an
event queued during a busy line drains when it ends; BLK-ATTACH at boot 1
beat. Acceptance passes; parity, dict_hash set and relay ledger unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-09-24 22:33:33 -04:00
co-authored by Claude Opus 5.5
parent fe55038e9a
commit ee4c401d1c
16 changed files with 55062 additions and 65 deletions
+8 -2
View File
@@ -65,8 +65,14 @@ void sk_vm_switch_checkpoint(struct VM *vm);
/* FABRIC-3.8.md §3.13.5 (Stage C-b, ruling C-5): the idle point. Called
* from the console's input poll loops (repl.c) each pass with no input.
* Acts only when Hera is running with no frame live (between lines); then
* switches to the coolest VM with work, if any. */
void sk_vm_idle_point(void);
* switches to the coolest VM with work, if any.
*
* FABRIC-3.9.8 Stage O-B (FABRIC-3.9.0.md §2.5): Hera's own mail is drained
* here first, one message per call, instead of on the timer-paced idle beat
* -- she is an observer that acts on events, promptly. may_drain_self is
* the caller's gate: readline passes (n == 0), so a drained payload never
* prints into a line being typed. */
void sk_vm_idle_point(int may_drain_self);
/* FABRIC-3.8.md §3.5 (Stage D): 1 if `vm` is parked at its own trampoline
* with nothing in progress -- its frame stack holds exactly one frame, its