Stage 3 follow-on: message-arrival eligibility hook + trampoline-blind switch-storm fix (FABRIC-3.md §XXVIII.2)
Build / build-amd64-iso (push) Waiting to run
Build / build-aarch64-iso (push) Waiting to run
Build / build-riscv64-img (push) Waiting to run

Implements the message-arrival eligibility signal FABRIC-3.md §XXVIII.1 left
open (has_work per-slot flag, set via new SWITCH-MARK-WORK primitive from
MSG-SEND) so an idle VM never becomes a switch target purely by waiting out
the readiness threshold.

Also root-causes and fixes a second, independent switch-storm: the tick's
"who is current" check used vm_log_attributed_vm(), which can't see a VM
parked in switch.c's own raw trampoline. Replaced with a dedicated
g_switch_current_vm tracked by the switch mechanism itself, and moved
target-slot eligibility reset to the switch decision point instead of
relying on ISR polling to observe a window that can be only a few
instructions wide.

Verified live on all 3 architectures: clean boot to zuse@Hera] ok>, live
cross-VM message dispatch, and (since a quiet log looks identical to a
livelocked storm once the DoE probe is gone) confirmed genuine REPL
liveness via QMP send-key + screendump on aarch64/riscv64, not log
inspection alone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWpNjdwPtFLuVLaAq44L9K
This commit is contained in:
Robert Allan James
2026-09-14 17:39:20 -04:00
co-authored by Claude Sonnet 5
parent 862d7d9c48
commit 66beae7fd4
29 changed files with 121129 additions and 338 deletions
+42 -42
View File
@@ -1,5 +1,5 @@
# Capsule Block Manifest — Auto-generated
<!-- Generated by mkcapsule --manifest 2026-09-14T03:55:53Z -->
<!-- Generated by mkcapsule --manifest 2026-09-14T20:33:48Z -->
<!-- DO NOT EDIT — re-run mkcapsule --manifest to refresh. -->
<!-- Hand-written justifications and immutability notes live -->
<!-- in MANIFEST.md alongside this auto-generated index. -->
@@ -12,7 +12,7 @@
| `acl-std79.4th` | 4023, 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048 | `0x773bf9209df191d1` | yes |
| `artemis:init.4th` | 4110, 4111, 4112, 4113, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170, 4171, 4172, 4173, 4174, 4177, 4178, 4179, 4180, 4181, 4182, 4851, 4852, 4853, 4854, 4856, 4857, 4858, 4860 | `0xf55edc4e76a8c294` | yes |
| `block-acl.4th` | 4019, 4020 | `0xf6cc2a59e3a6734e` | yes |
| `common:messaging.4th` | 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039, 5040, 5041, 5042 | `0xedde53f6faed7355` | yes |
| `common:messaging.4th` | 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039, 5040, 5041, 5042 | `0x201cfd6d39fcb22d` | yes |
| `common:msg.4th` | 4055 | `0x850a0382344ea6c4` | yes |
| `doe-campaign.4th` | 4060, 4061, 4062, 4063, 4064, 4065 | `0x3d4549142d91ec20` | yes |
| `doe.4th` | 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107 | `0xf154616d248e861f` | yes |
@@ -331,46 +331,46 @@
| 5000 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
| 5001 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
| 5002 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
| 5003 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5004 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5005 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5006 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5007 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5008 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5009 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5010 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5011 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5012 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5013 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5014 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5015 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5016 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5017 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5018 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5019 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5020 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5021 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5022 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5023 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5024 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5025 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5026 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5027 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5028 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5029 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5030 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5031 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5032 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5033 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5034 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5035 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5036 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5037 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5038 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5039 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5040 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5041 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5042 | `common:messaging.4th` | `0xedde53f6faed7355` | ok |
| 5003 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5004 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5005 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5006 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5007 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5008 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5009 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5010 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5011 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5012 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5013 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5014 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5015 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5016 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5017 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5018 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5019 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5020 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5021 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5022 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5023 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5024 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5025 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5026 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5027 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5028 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5029 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5030 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5031 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5032 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5033 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5034 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5035 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5036 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5037 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5038 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5039 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5040 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5041 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5042 | `common:messaging.4th` | `0x201cfd6d39fcb22d` | ok |
| 5100 | `turtle.4th` | `0x4d470418ca543365` | ok |
| 5101 | `turtle.4th` | `0x4d470418ca543365` | ok |
| 5102 | `turtle.4th` | `0x4d470418ca543365` | ok |