Stage D: CONSOLE-CMD-EVENT real cutover -- FABRIC-3.6.md task 3.9
Send-side cutover: sk_repl_dispatch_line()'s FORTH-string
"CONSOLE-CMD-EVENT 0 3 S\" ...\" 0 MSG-SEND" interpret is replaced with
a direct sk_hermes_send_one() call (SK_HERMES_MSG_TYPE_CONSOLE_CMD,
kernel_hermes.h, deliberately reusing CONSOLE-CMD-EVENT's own value 7,
same partition-rule reasoning as task 3.8's BLK-ATTACH-EVENT cutover).
Real finding along the way: kernel-Hermes's drain only ever runs as a
side effect of vm_interpret() being called on the target VM. Task
3.8's target (Hera) is always being interpreted via the interactive
REPL loop; task 3.9's target is a WIREBIND identity's own ~user VM, a
passive receiver nothing else drives. The existing idle-loop pump only
ticked VMs with the old FORTH MSG-TICK word ACL-allowed -- a VM minted
with the STD79-lockdown personality never has it, so the pump silently
skipped it forever and queued messages never delivered. Fixed by
adding an unconditional, direct sk_hermes_drain_checkpoint() call in
the same pump loop, independent of the MSG-TICK gate.
Verified live on all three architectures: WIREBIND-attach a real
identity, USE into it, type a plain console line, confirm the Stage D
evidence line and correct relayed execution result. Zero UNKNOWN WORD,
dict_hash identical across all three ISAs and matching task 3.8's own
baseline. The FABRIC-3.md-documented USE/BINDSTEP crash did not
reproduce in any of these live sessions (recorded as a finding, not
chased further).
Depends on the zuse_root_pubkey_known fix already landed in ac4d431 --
without it, WIREBIND cannot attach any identity on a fresh boot at
all, which blocked this task's own verification until found and fixed
separately.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ac4d431aee
commit
3975dc61cd
@@ -45,6 +45,7 @@
|
||||
#ifdef __STARKERNEL__
|
||||
|
||||
#include <string.h>
|
||||
#include "freestanding/stdio.h" /* task 3.9 evidence print -- snprintf() */
|
||||
#include "starkernel/vm/kernel_hermes.h"
|
||||
#include "starkernel/vm/stadium.h"
|
||||
#include "starkernel/q48_16.h"
|
||||
@@ -586,6 +587,31 @@ int sk_hermes_drain_checkpoint(VM *vm) {
|
||||
saved_error = vm->error;
|
||||
saved_abort = vm->abort_requested;
|
||||
|
||||
/* FABRIC-3.6.md task 3.9 evidence: CONSOLE-CMD-EVENT has no fixed
|
||||
* FORTH handler word to hang a print on (task 3.8's BLK-ATTACH-ACK
|
||||
* did) -- its payload is an arbitrary console line, interpreted
|
||||
* as-is below. So the evidence line lives here instead, gated on
|
||||
* msg->type, printed before vm_interpret() runs while this
|
||||
* message's heat is still held (release()/pop() are further down
|
||||
* in this same function) -- the same mid-hold-instant evidence task
|
||||
* 3.8 used, same honest limit: evidence for mid-hold, not
|
||||
* post-release. console_println, not log_message() (confirmed
|
||||
* invisible in this build's serial capture, task 3.8's own
|
||||
* finding); fires once per relayed console line, not per word. */
|
||||
if (msg->type == SK_HERMES_MSG_TYPE_CONSOLE_CMD) {
|
||||
uint64_t held, pulled, returned, consumed;
|
||||
char line[160];
|
||||
int conserved = stadium_conserved(self);
|
||||
sk_hermes_ledger(&held, &pulled, &returned, &consumed);
|
||||
snprintf(line, sizeof(line),
|
||||
"Kernel-Hermes CONSOLE-CMD-EVENT (real, Stage D): ledger held=%llu "
|
||||
"pulled=%llu returned=%llu consumed=%llu stadium_conserved(self)=%s",
|
||||
(unsigned long long)held, (unsigned long long)pulled,
|
||||
(unsigned long long)returned, (unsigned long long)consumed,
|
||||
conserved ? "true" : "FALSE");
|
||||
console_println(line);
|
||||
}
|
||||
|
||||
vm->mode = MODE_INTERPRET; /* a payload is never compiled into whatever
|
||||
* the enclosing context was mid-defining */
|
||||
vm_interpret(vm, (const char *)msg->payload_addr);
|
||||
|
||||
Reference in New Issue
Block a user