starkernel: item 4.2 -- Hermes native on the Stadium (complete)

Migrates Hermes's message/channel lifecycle onto the Stadium's unified
heat/capacity economy: MSG-ALLOC/FREE-NODE and CH-ALLOC/FREE-NODE now
route entirely through stadium_admit()/stadium_evict(), replacing the
old local free-list + independent heat-field mechanism. Eight
kernel-only STADIUM-* FORTH primitives (ADMIT, EVICT, RES@, RES-PULL,
RES-PUSH, HEAT@, HEAT!, WORD-HEAT), VM.stadium_vm_id threaded through
all three vm_core.c dispatch sites (replacing item 4.1's hardcoded
vm_uuid_hera()), and the stadium_owner[idx] fix so evict-credit lands
in the VM that actually admitted a patron, not whoever owned cell 0.

This session's own contribution, on top of that pre-existing
implementation: found and fixed two bugs blocking the item's own K≡1.0
conservation self-check (HERMES-K was reading 0, not 65536):

- Q.SLOT admission-heat fix (capsules/hermes/init.4th): MSG-SEND/
  CH-ACCEPT admitted with Q.1 (the entire fleet-wide "1.0" unit) per
  item, a leftover from before the Stadium migration when each
  message/channel had its own unconstrained heat field. Instantly
  drained the shared, finite reservoir.

- Reservoir floor for word-execution admission (stadium_words.c):
  stadium_word_dispatch() (item 4.1) pulls STADIUM_WORD_HEAT_QUANTUM on
  every word dispatch, not just first admission -- exhausts a VM's
  entire reservoir in ~32 dispatches, starving any application-level
  economy sharing that VM's reservoir before it gets a chance to pull
  anything. word_dispatch_pull() now clamps word-execution's own pulls
  to leave a Q48_ONE/3 floor (same fair-share figure COMMON-CH's own
  floor already uses); application-level pulls are unaffected.

- STADIUM-WORD-HEAT primitive + stadium_words_resident_heat(): the
  floor deliberately leaves word-execution residents holding real
  heat, invisible to HERMES-K's original formula (MSG+CH+reservoir,
  no term for word patrons). Adding this term closes K to exactly
  65536 on all three architectures.

Also rules on two open scope questions in FABRIC.md: MBR-ALLOC/
MBR-FREE-NODE stay off the Stadium (membership records have no heat
field, never did -- the acceptance bullet's inclusion of them was a
completeness gesture predating a check of the actual layout), and
records the effort number (12 implementation files, +759/-120 lines).

Verified: all three architectures boot clean, full self-test passes,
Stadium conservation closes exactly (resident_sum + reservoir =
Q48_ONE) at both the C/Stadium level and the FORTH-level HERMES-K
check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-08-07 01:49:23 -04:00
co-authored by Claude Sonnet 5
parent 0a7f144367
commit 5a28458b21
19 changed files with 1034 additions and 162 deletions
+40 -32
View File
@@ -1,5 +1,5 @@
# Capsule Block Manifest — Auto-generated
<!-- Generated by mkcapsule --manifest 2026-08-05T17:10:15Z -->
<!-- Generated by mkcapsule --manifest 2026-08-07T05:36:57Z -->
<!-- DO NOT EDIT — re-run mkcapsule --manifest to refresh. -->
<!-- Hand-written justifications and immutability notes live -->
<!-- in MANIFEST.md alongside this auto-generated index. -->
@@ -13,7 +13,7 @@
| `common:msg.4th` | 4055 | `0xa99c5bcd3877f80e` |
| `doe-campaign.4th` | 4060, 4061, 4062, 4063, 4064, 4065 | `0x3d4549142d91ec20` |
| `doe.4th` | 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107 | `0xb6ecf5374e8ee77c` |
| `hermes:init.4th` | 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4114, 4115, 4116, 4117, 4118, 4119, 4120, 4121, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152, 4153 | `0xbb77f3ac463f507f` |
| `hermes:init.4th` | 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4114, 4115, 4116, 4117, 4118, 4119, 4120, 4121, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159, 4175, 4176 | `0x85c7b311d1e5bf97` |
| `init-0.4th` | 2200, 2201 | `0xd0a9550baf786bb3` |
| `init-1.4th` | 4406, 4415, 4425, 4435 | `0x63e251adb0a03613` |
| `init-2.4th` | 4506, 4515, 4525, 4535, 4545 | `0xf113b3d0bcccae47` |
@@ -109,28 +109,28 @@
| 4063 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok |
| 4064 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok |
| 4065 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok |
| 4100 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4101 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4102 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4103 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4104 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4105 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4106 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4107 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4108 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4109 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4100 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4101 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4102 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4103 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4104 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4105 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4106 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4107 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4108 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4109 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4110 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4111 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4112 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4113 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4114 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4115 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4116 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4117 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4118 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4119 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4120 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4121 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4114 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4115 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4116 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4117 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4118 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4119 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4120 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4121 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4122 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4123 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4124 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
@@ -151,18 +151,24 @@
| 4139 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4140 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4141 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4142 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4143 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4144 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4145 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4146 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4147 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4148 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4149 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4150 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4151 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4152 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4153 | `hermes:init.4th` | `0xbb77f3ac463f507f` | ok |
| 4142 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4143 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4144 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4145 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4146 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4147 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4148 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4149 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4150 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4151 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4152 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4153 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4154 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4155 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4156 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4157 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4158 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4159 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4160 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4161 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4162 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
@@ -178,6 +184,8 @@
| 4172 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4173 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4174 | `artemis:init.4th` | `0xc9e92cd18f4c7b49` | ok |
| 4175 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4176 | `hermes:init.4th` | `0x85c7b311d1e5bf97` | ok |
| 4300 | `process.4th` | `0x781afc1dbd0294f7` | ok |
| 4301 | `process.4th` | `0x781afc1dbd0294f7` | ok |
| 4406 | `init-1.4th` | `0x63e251adb0a03613` | ok |