Rename FABRIC series: FABRIC.md->0, FABRIC-2.md->1, FABRIC-3.md->2, FABRIC-4.md unchanged

FABRIC.md -> FABRIC-0.md
FABRIC-2.md -> FABRIC-1.md
FABRIC-3.md -> FABRIC-2.md (the current/living document)
FABRIC-4.md unchanged (new #3 to follow separately)

Every cross-reference repo-wide updated to match, including doc-comment
citations inside kernel source (.c/.h) files -- done via an ordered
placeholder substitution (FABRIC-3.md->placeholder2, FABRIC-2.md->
placeholder1, FABRIC.md->placeholder0, then placeholders resolved to
final names) in a single pass per file to avoid double-shifting
already-renamed references.

One line in capsules/font.4th grew past the 64-char block-format limit
as a side effect of the longer filename; shortened it and reverified
with mkcapsule --lint (34/34 pass) before rebuilding.

Verified 3-arch boot to ok> (amd64/aarch64/riscv64, each in the
foreground) after the fix; logs and DoE CSVs from this session's
verification runs included per this repo's own audit-artifact
convention.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YcT3H2PQeyujrzjqS3Var
This commit is contained in:
Robert Allan James
2026-09-04 11:22:51 -04:00
co-authored by Claude Sonnet 5
parent ff2941dfb9
commit b031b802e3
128 changed files with 37154 additions and 9572 deletions
+12 -12
View File
@@ -34,8 +34,8 @@
#include "starkernel/kmalloc.h"
#include "starkernel/console.h"
#include "starkernel/vm/stadium.h" /* item 4.1a -- stadium_grant_quota() */
#include "starkernel/session.h" /* session_register()/session_set_pinned() -- FABRIC-3.md §H.12 step 5 */
#include "starkernel/timer.h" /* timer_calibration_record()->vm_mode -- FABRIC-3.md §I.5 CONTRIB trust tier */
#include "starkernel/session.h" /* session_register()/session_set_pinned() -- FABRIC-2.md §H.12 step 5 */
#include "starkernel/timer.h" /* timer_calibration_record()->vm_mode -- FABRIC-2.md §I.5 CONTRIB trust tier */
#include "vm.h"
#include "platform_alloc.h"
/* No LOG_LINE_MAX include-order constraint anymore: vm.h's own
@@ -105,7 +105,7 @@ static VMRegistryEntry *vm_find_entry_ptr(VMUuid vm_id) {
return (void *)0;
}
/* FABRIC-3.md §H.12 step 10: creator-ceiling enforcement, birth-time
/* FABRIC-2.md §H.12 step 10: creator-ceiling enforcement, birth-time
* snapshot only, no live sync (§H.3, decided 2026-09-03 -- "if something
* was developed with a particular set of ACLs, it should remain at
* that... otherwise parent changes break the child's program"). For
@@ -244,7 +244,7 @@ int capsule_vm_registry_get_by_index(uint32_t index, VMRegistryEntry *out) {
/* Live population, distinct from vm_registry_count above: vm_registry_count
* is monotonic (incremented on every vm_registry_alloc(), never decremented
* on death), so it counts every VM ever born, not the outer Stadium's
* current occupancy. FABRIC.md item 1.5's bound is on LIVE VMs -- a dead or
* current occupancy. FABRIC-0.md item 1.5's bound is on LIVE VMs -- a dead or
* stillborn slot doesn't hold Stadium capacity, and gating on the monotonic
* total would mean the fleet could never regrow after any VM's death,
* which contradicts Hera's own kill-then-rebirth lifecycle (TRIPOD-TEST's
@@ -394,7 +394,7 @@ int capsule_vm_kill(const char *name) {
vm_id = entry->vm_id;
vm = (VM *)entry->vm_ptr;
/* FABRIC-3.md SS B, VM-COOL: reap this VM's own Stadium patron cell for
/* FABRIC-2.md SS B, VM-COOL: reap this VM's own Stadium patron cell for
* real, dispatching COOL. Refusal (already naturally reclaimed by
* unrelated quota pressure, or never admitted) is silently tolerated --
* KILL tears the VM down unconditionally either way. */
@@ -451,7 +451,7 @@ void capsule_vm_kill_all_nonmama(void) {
}
}
/* FABRIC-3.md §I.5, 2026-09-04: contributor-capsule trust tier
/* FABRIC-2.md §I.5, 2026-09-04: contributor-capsule trust tier
* (QEMU-vs-real-hardware conditional enforcement, decided in
* conversation). CAPSULE_FLAG_CONTRIB capsules get the same WARN-only
* treatment as everything else under QEMU (timer_calibration_record()->
@@ -574,7 +574,7 @@ CapsuleRunResult capsule_birth_baby(
/* Milestone 6 (Phase 8): enforced only on INVALID -- see the fuller
* comment in capsule_birth_mama() above for why MISSING/NO_ROOT_KEY
* stay WARN-only. Skipped entirely when skip_pki_sig is set (RUNCAP,
* FABRIC-3.md §F.6/F.18): capsule_get_signatures() is the compile-
* FABRIC-2.md §F.6/F.18): capsule_get_signatures() is the compile-
* time-baked array, indexed against the build-time capsule_descriptors[]
* -- meaningless for a heap-built directory sourced from a thumbdrive,
* where idx 0 would just compare against whatever real capsule happens
@@ -589,7 +589,7 @@ CapsuleRunResult capsule_birth_baby(
names[idx].name, capsule_sig_result_str(sr));
if (sr == CAPSULE_SIG_INVALID) return CAPSULE_RUN_ERR_INVALID;
}
/* FABRIC-3.md §I.5: contrib trust tier -- see contrib_capsule_
/* FABRIC-2.md §I.5: contrib trust tier -- see contrib_capsule_
* refused()'s own doc comment. */
if (contrib_capsule_refused(cap->flags, sr)) {
log_message(LOG_WARN, "capsule sig: %s: contrib capsule refused on real hardware (%s)",
@@ -627,7 +627,7 @@ CapsuleRunResult capsule_birth_baby(
* own reservoir, not vm_uuid_hera()'s (item 4.1's hardcoded default). */
((VM *)new_vm)->stadium_vm_id = vm_id;
/* item 4.6 fix (FABRIC-2.md, 2026-08-18): granted here, before IDENTITY
/* item 4.6 fix (FABRIC-1.md, 2026-08-18): granted here, before IDENTITY
* exec, not after a confirmed live birth as item 4.1a originally placed
* it. item 4.1a's placement assumed no VM's own IDENTITY code would ever
* need a Stadium quota before birth completes -- true until item 4.6's
@@ -641,7 +641,7 @@ CapsuleRunResult capsule_birth_baby(
* stillbirth here is the rare case, not the common one. */
(void)stadium_grant_quota(vm_id, vm_uuid_hera());
/* FABRIC-3.md SS B, VM-COOL: admit this VM as a patron of its own
/* FABRIC-2.md SS B, VM-COOL: admit this VM as a patron of its own
* quota -- identity 0 (same convention stadium_birth_hera() uses for
* "patron zero"), heat 0 (no reservoir cost). Admitted unpinned here
* regardless of which VM this is -- pinning (when it applies) happens
@@ -650,7 +650,7 @@ CapsuleRunResult capsule_birth_baby(
* Hera (stadium_admit() has no admission-time-special pin handling,
* just copies the candidate header, so this ordering is safe).
*
* FABRIC-3.md §H.12 step 5: fleet-foundation VMs (Hera/Hermes/Artemis)
* FABRIC-2.md §H.12 step 5: fleet-foundation VMs (Hera/Hermes/Artemis)
* are pinned -- permanent, exempt from COOL, per §H.1's decision.
* Ordinary/user VMs stay unpinned, matching the original comment's own
* reasoning here (unrelated quota pressure can naturally evict this
@@ -786,7 +786,7 @@ CapsuleRunResult capsule_run_experiment(
names[idx].name, capsule_sig_result_str(sr));
if (sr == CAPSULE_SIG_INVALID) return CAPSULE_RUN_ERR_INVALID;
}
/* FABRIC-3.md §I.5: contrib trust tier -- see contrib_capsule_
/* FABRIC-2.md §I.5: contrib trust tier -- see contrib_capsule_
* refused()'s own doc comment. */
if (contrib_capsule_refused(cap->flags, sr)) {
log_message(LOG_WARN, "capsule sig: %s: contrib capsule refused on real hardware (%s)",
+2 -2
View File
@@ -30,7 +30,7 @@
#define MINT_IDENTITY_SRC_DEVBLOCKS 2u /* 1 seed record + 1 personality source */
#define MINT_METADATA_DEVBLOCKS 5u /* devblocks 0..4 reserved */
/* Real, working, minimal default personality -- FABRIC-3.md §F.6/§F.8's
/* Real, working, minimal default personality -- FABRIC-2.md §F.6/§F.8's
* "default personality content" question stays open (mint-time-fixed vs.
* user-editable), but the identity this mints must actually do something
* when RUNCAP births it, not just exist. Needs the "Block NNNN" header
@@ -43,7 +43,7 @@
* A minted identity's RUNCAP-born VM is not exempt from that pump, so
* omitting this left it spamming "UNKNOWN WORD: 'MSG-TICK'" every idle
* tick forever from the moment WIREBIND made the VM live -- found live
* minting a real second identity (FABRIC-3.md §F.26 follow-up). */
* minting a real second identity (FABRIC-2.md §F.26 follow-up). */
static const char MINT_DEFAULT_PERSONALITY[] =
"Block 4999\n"
"S\" common:messaging.4th\" EXEC\n"
+1 -1
View File
@@ -106,7 +106,7 @@ CapsuleRunResult capsule_runcap_birth(
* -ARTEMIS) does this as a separate step after a successful birth,
* via capsule_vm_registry_set_name(). Found live: skipping this left
* a freshly RUNCAP-born VM's registry name empty, which the idle-loop
* pump (FABRIC-3.md Phase C) then read as a zero-length name and
* pump (FABRIC-2.md Phase C) then read as a zero-length name and
* refused ("VM name too long or empty") every tick. */
if (r == CAPSULE_RUN_OK && out_vm_id) {
capsule_vm_registry_set_name(*out_vm_id, vm_name);
+6 -6
View File
@@ -83,9 +83,9 @@ static vm_physics_node_t *vm_physics_head = (void *)0;
* wasn't clamped (rate = amount / elapsed_ticks), rather than curve-fitting
* a reconstructed trajectory against a synthetic time axis.
*
* Restated on the virtual tick (FABRIC.md item 2.1, 2026-08-04): this used
* Restated on the virtual tick (FABRIC-0.md item 2.1, 2026-08-04): this used
* to be elapsed_us, wall-clock microseconds -- non-reproducible under TCG
* per GAP-A1 (FABRIC.md §25.7.1). Now counts fleet_heartbeat_tick_count
* per GAP-A1 (FABRIC-0.md §25.7.1). Now counts fleet_heartbeat_tick_count
* ticks, which is execution-paced (incremented once per vm_tick() call,
* confirmed at vm_runtime.c:143). */
typedef struct {
@@ -135,7 +135,7 @@ static VMFleetWindow fleet_window = { { { 0, 0, 0 } }, 0, 0, 0 };
* via doe_log.c's per-VM heat CSV columns showing a dead-flat trajectory
* across a full boot (VM-FLEET-ATTRACTOR-DESIGN-20260705.md rev f).
*
* UNVALIDATED after the ns-to-tick restatement (FABRIC.md item 2.1,
* UNVALIDATED after the ns-to-tick restatement (FABRIC-0.md item 2.1,
* 2026-08-04): this value was calibrated against elapsed wall-clock
* microseconds. Elapsed fleet-heartbeat *ticks* between touches is a
* different quantity at a different scale, and the seed has not been
@@ -289,10 +289,10 @@ void vm_physics_touch(VMUuid vm_id)
if (!target || !target->physics.is_live) return;
/* Restated on the virtual tick (FABRIC.md item 2.1, 2026-08-04): this
/* Restated on the virtual tick (FABRIC-0.md item 2.1, 2026-08-04): this
* used to gate on target->physics.last_active_ns > 0 and scale by
* elapsed wall-clock microseconds -- non-reproducible run to run under
* TCG (GAP-A1, FABRIC.md §25.7.1). fleet_heartbeat_tick_count is
* TCG (GAP-A1, FABRIC-0.md §25.7.1). fleet_heartbeat_tick_count is
* execution-paced (vm_runtime.c:143), so elapsed_ticks is now a pure
* function of the execution stream. `touched` replaces the old
* `> 0` sentinel: tick 0 is a legitimate value for a genuine first
@@ -458,7 +458,7 @@ void vm_physics_tick(uint64_t now_ns)
}
/* Gated on STADIUM_CAPACITY_TICK, not HEARTBEAT_INFERENCE_FREQUENCY (fixed
* 2026-08-15, FABRIC-2.md §12 Q5): fleet_heartbeat_tick_count is fed by
* 2026-08-15, FABRIC-1.md §12 Q5): fleet_heartbeat_tick_count is fed by
* EVERY live VM's own vm_tick() (see the comment above this counter's
* declaration), so it advances several times faster in wall-clock terms
* than a single VM's own tick_count -- comparing it against
+4 -4
View File
@@ -18,7 +18,7 @@
#include "starkernel/vm_identity.h"
#include "starkernel/user_identity_seed.h"
#include "starkernel/console.h"
#include "starkernel/repl.h" /* sk_repl_get/set_active_vm() -- FABRIC-3.md §F.10 EJECT */
#include "starkernel/repl.h" /* sk_repl_get/set_active_vm() -- FABRIC-2.md §F.10 EJECT */
#include "blkio.h"
#include "block_subsystem.h" /* compute_crc64() */
#include "word_source/include/block_words.h" /* blk_vm_flush_all() -- §F.10 EJECT */
@@ -26,7 +26,7 @@
#include <string.h>
#include <stddef.h>
/* FABRIC-3.md §F.10: "the VM currently attached via the home-blocks USB
/* FABRIC-2.md §F.10: "the VM currently attached via the home-blocks USB
* path" -- WIREBIND's own to track, set at successful birth in
* capsule_wirebind_try_attach(), read and cleared by both
* capsule_wirebind_eject() and capsule_wirebind_unclean_detach(). Single-
@@ -37,7 +37,7 @@ static int g_wirebind_attached_valid = 0;
/* Plain username (no "~user" registry-name suffix), tracked separately
* from g_wirebind_attached_vm_id -- the registry entry's own name is
* user_vm_name ("<username>~user"), not the bare form the (user) prompt
* segment wants (FABRIC-3.md §I.1/4.4s). */
* segment wants (FABRIC-2.md §I.1/4.4s). */
static char g_wirebind_attached_username[USER_IDENTITY_USERNAME_MAX] = {0};
/* WIREBIND_CERT_MAX_DEVBLOCKS: a sane upper bound on how much cert
@@ -178,7 +178,7 @@ void capsule_wirebind_try_attach(struct blkio_dev *dev,
((VM *)user_ctx)->identity = identity;
}
/* FABRIC-3.md §F.10: this is the successful-birth point EJECT/UNCLEAN
/* FABRIC-2.md §F.10: this is the successful-birth point EJECT/UNCLEAN
* need a tracked VMUuid from -- the user VM, not the console VM
* (blk_vm_flush_all()/capsule_vm_kill() below both act on the VM that
* actually owns block-subsystem state). */
+3 -3
View File
@@ -21,7 +21,7 @@
#include <string.h>
#include <stddef.h>
/* FABRIC-3.md §I.8 (re-scoped 2026-09-04): tracks whether the currently
/* FABRIC-2.md §I.8 (re-scoped 2026-09-04): tracks whether the currently
* home-blocks-attached device is Zuse's own -- the single-USB-device
* constraint (§F.8) means capsule_zuse_boot_logout() only needs one flag,
* not a device/uuid comparison, to know a detach event is hers to act on
@@ -57,7 +57,7 @@ static void install_and_activate(VM *mama_vm, const uint8_t seed[32], const uint
* once vm->zuse_cert_installed is already 1) -- that's a real
* security property (the cert/pubkey must never be re-installed or
* swapped) and stays untouched here. Its return is NOT used to gate
* ACL-ZUSE-BOOT below anymore (FABRIC-3.md §I.8, re-scoped
* ACL-ZUSE-BOOT below anymore (FABRIC-2.md §I.8, re-scoped
* 2026-09-04): re-authenticating after capsule_zuse_boot_logout()
* needs ACL-ZUSE-BOOT to re-run and re-set zuse_session even when
* the cert itself was already installed from an earlier boot-time
@@ -81,7 +81,7 @@ void capsule_zuse_boot_try_attach(struct blkio_dev *dev,
const homeblocks_sig_t *sig,
VM *mama_vm) {
if (!dev || !mama_vm) return;
/* FABRIC-3.md §I.8, re-scoped 2026-09-04: gate on zuse_session, not
/* FABRIC-2.md §I.8, re-scoped 2026-09-04: gate on zuse_session, not
* zuse_cert_installed. zuse_cert_installed never clears (one-way,
* see install_and_activate()'s own comment) and would permanently
* block re-authentication after a logout; zuse_session does clear
+12 -12
View File
@@ -43,7 +43,7 @@
#include "starkernel/capsule_runcap.h"
#include "starkernel/capsule_console.h"
#include "starkernel/capsule_wirebind.h"
#include "starkernel/capsule_zuse_boot.h" /* capsule_zuse_boot_logout() -- FABRIC-3.md §I.8 EJECT */
#include "starkernel/capsule_zuse_boot.h" /* capsule_zuse_boot_logout() -- FABRIC-2.md §I.8 EJECT */
#include "starkernel/homeblocks_sig.h"
#include "freestanding/stdio.h"
#include "starkernel/capsule_mint.h"
@@ -483,7 +483,7 @@ void mama_word_use(VM *vm)
return;
}
/* BINDSTEP (FABRIC-3.md §F.9/§F.24): if the target has a real
/* BINDSTEP (FABRIC-2.md §F.9/§F.24): if the target has a real
* installed identity (WIREBIND set this at attach time), re-verify
* it against whatever drive is CURRENTLY attached -- live, not
* cached (decision 1: this is a rare, human-triggered, interactive
@@ -584,7 +584,7 @@ void mama_word_kill(VM *vm)
/**
* @brief EJECT ( -- )
* Graceful detach of whatever identity is currently attached via the
* home-blocks USB path (FABRIC-3.md §F.10, extended §I.8 2026-09-04) --
* home-blocks USB path (FABRIC-2.md §F.10, extended §I.8 2026-09-04) --
* a regular WIREBIND user VM or Zuse herself, no identity handled any
* differently. Single-USB-device constraint (§F.8) means there is only
* ever one candidate, so at most one of the two calls below actually
@@ -834,7 +834,7 @@ static void mama_word_vm_call(VM *vm)
/**
* @brief MINT ( -- ok? )
* Mint a fresh identity onto the currently attached USB drive
* (FABRIC-3.md §F.8/§F.19). Deliberately no name/string argument despite
* (FABRIC-2.md §F.8/§F.19). Deliberately no name/string argument despite
* F.8's original "S\" name\" MINT" sketch: this design never binds a VM
* name at mint time -- the drive holds an anonymous, self-contained
* identity, and a name is only assigned later, at RUNCAP birth (a
@@ -865,7 +865,7 @@ static int mint_pop_string(VM *vm, char *dst, size_t dst_cap)
/**
* @brief MINT ( fname-c fname-u uname-c uname-u email-c email-u phone-c phone-u -- ok? )
* Mint a fresh identity onto the currently attached USB drive, with a
* real human profile (FABRIC-3.md §F.20). full_name/username required
* real human profile (FABRIC-2.md §F.20). full_name/username required
* and non-empty; pass a zero-length string (S" ") for email/phone to
* leave them null.
*/
@@ -922,7 +922,7 @@ static void mama_word_mint(VM *vm)
/**
* @brief ZUSE-ELIGIBILITY-ADD ( c-addr -- ok? )
* Add the 32-byte Ed25519 public key at c-addr to Zuse's elevation
* eligibility list (FABRIC-3.md §H.5/§H.12 item 19). Plain, unconditional
* eligibility list (FABRIC-2.md §H.5/§H.12 item 19). Plain, unconditional
* primitive -- no authorization check here or anywhere else in this
* codebase gates on vm->zuse_session. Zuse's authority is the *absence*
* of any ACL restricting her, not a bit this or any other word checks;
@@ -957,7 +957,7 @@ static void mama_word_zuse_eligibility_add(VM *vm)
/**
* @brief ZUSE-ELIGIBLE? ( c-addr -- flag )
* Membership check over Zuse's elevation eligibility list (FABRIC-3.md
* Membership check over Zuse's elevation eligibility list (FABRIC-2.md
* §H.5/§H.12 item 21). Plain, unconditional wrapper over
* zuse_eligibility_is_member() -- same "no bespoke gate" convention as
* ZUSE-ELIGIBILITY-ADD above; is_member() itself is already fail-closed.
@@ -1046,7 +1046,7 @@ static void mama_word_elevate_pubkey_unpack(VM *vm)
/**
* @brief RUNCAP-TEST ( caddr u -- ok? rc )
* Diagnostic-only word (FABRIC-3.md §F.6/§F.18): calls
* Diagnostic-only word (FABRIC-2.md §F.6/§F.18): calls
* capsule_runcap_birth() against whatever drive sk_repl_get_homeblocks_
* dev()/sig() currently report, naming the new VM from the given string.
* Not the real RUNCAP call site -- that's WIREBIND (still unbuilt); this
@@ -1092,7 +1092,7 @@ static void mama_word_runcap_test(VM *vm)
/**
* @brief PAIR-TEST ( caddr u -- ok? )
* Diagnostic-only word (FABRIC-3.md Phase F, 2026-08-28): births a
* Diagnostic-only word (FABRIC-2.md Phase F, 2026-08-28): births a
* console VM (bare, capsule_console.h) named by the given string, and a
* user VM (capsule_runcap_birth(), from whatever drive sk_repl_get_
* homeblocks_dev()/sig() currently report) named "<string>~user" --
@@ -1583,7 +1583,7 @@ void register_mama_forth_words(VM *vm)
}
/* ============================================================================
* Stadium Words (FABRIC.md punch list item 4.2)
* Stadium Words (FABRIC-0.md punch list item 4.2)
*
* The entire C surface item 4.2 is permitted to add, per HERMES.md's
* language constraint: all eight operate on the CALLING VM's own identity
@@ -1679,7 +1679,7 @@ static void mama_word_stadium_res_fetch(VM *vm)
* Sum of heat held by the calling VM's own word-execution residents
* (item 4.1's cells) -- the term a VM's own application-level conservation
* check (e.g. Hermes's HERMES-K) needs to close exactly, since word patrons
* are otherwise invisible to FORTH (FABRIC.md §25.7, ruling 2026-08-06).
* are otherwise invisible to FORTH (FABRIC-0.md §25.7, ruling 2026-08-06).
*/
static void mama_word_stadium_word_heat(VM *vm)
{
@@ -1788,7 +1788,7 @@ void register_child_vm_words(VM *vm)
register_word(vm, "EXEC", mama_word_exec);
register_word(vm, "VM-EXEC", mama_word_vm_exec);
register_word(vm, "VM-CALL", mama_word_vm_call);
/* USE (FABRIC-3.md §F.24): not console-specific -- any VM can
/* USE (FABRIC-2.md §F.24): not console-specific -- any VM can
* redirect the physical REPL to any other VM it has ACL access to
* (BINDSTEP re-verifies on every call, §F.9), including a console
* VM switching back to Hera or to a different session entirely.
+1 -1
View File
@@ -22,7 +22,7 @@
*/
/**
* vm_uuid.c - 128-bit VM identifiers (FABRIC.md punch list item 3.8)
* vm_uuid.c - 128-bit VM identifiers (FABRIC-0.md punch list item 3.8)
*
* See vm_uuid.h for the design rationale (no RNG source exists on any of
* the three ISAs uniformly, so this is deterministic, not random).