v4: starshipos.4th loaded before POST, as MACHINE.md 3 step 3 says

Captain Bob ruled that MACHINE.md stands. The kernel's system capsules
are now starshipos.4th, centre.4th, hera.4th and physics.4th, after
forth79.4th.

COLD, after POST, leaves FORTH alone in the search order, so the
prompt reaches STARSHIPOS's words by naming the vocabulary. The ruling
is that init.4th will set the search order; the capsule's header now
says so.

Test first in test_mesh_boot.c: its parity line, and `STARSHIPOS S" ok"
DOE`. It failed before the change. 105 checks now pass, POST is
990/990, and ASan/UBSan and the amd64 build are clean.

Logs are in logs/20261118-starshipos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-18 00:59:04 +00:00
parent 9ee797db7f
commit 4137f1b70d
7 changed files with 283 additions and 7 deletions
+6 -2
View File
@@ -85,7 +85,7 @@ static int key(void) { return V4_BOOT_KEY_END; }
static const char *const words[] = { "BYE" };
static unsigned served;
static void serve(v4_node *n, unsigned request) { (void)n; if (request == 1) served++; }
static const char *const capsules[] = { "v4:centre.4th", "v4:hera.4th", "v4:physics.4th" };
static const char *const capsules[] = { "v4:starshipos.4th", "v4:centre.4th", "v4:hera.4th", "v4:physics.4th" };
static unsigned char ram[(size_t)BLK_RAM_BLOCKS * BLK_FORTH_SIZE];
extern void sf_time_init(void);
@@ -117,7 +117,7 @@ int main(void)
ms.reg = reg; ms.blocks = blocks; ms.nucleus = &nucleus; ms.hera = &hera; ms.kernel = kernel;
ms.room = room; ms.unroom = unroom; ms.born = born; ms.gone = gone; ms.parity = parity;
ms.out = out; ms.key = key; ms.words = words; ms.word_count = 1; ms.serve = serve;
ms.capsules = capsules; ms.capsule_count = 3; ms.im = &im; ms.self = 0;
ms.capsules = capsules; ms.capsule_count = 4; ms.im = &im; ms.self = 0;
ms.accounts = accounts; ms.is_word = is_word; ms.forgot = forgot;
ms.physics = physics; ms.alloc = alloc; ms.release = release; ms.clock = clock_now;
@@ -130,6 +130,7 @@ int main(void)
CHECK(strstr(said, "PARITY:V4_ROM ") != 0, "the ROM assembled the nucleus, and said so");
CHECK(strstr(said, "PARITY:V4_CAPSULE name=v4:forth79.4th ") && strstr(said, "PARITY:V4_CAPSULE name=v4:centre.4th ")
&& strstr(said, "PARITY:V4_CAPSULE name=v4:hera.4th "), "FORTH-79 and the kernel's capsules, each with its parity line");
CHECK(strstr(said, "PARITY:V4_CAPSULE name=v4:starshipos.4th ") != 0, "starshipos.4th, with its parity line");
{ /* every case, the kernel's too: Hera has its words (#189 Phase 7) */
char want[64];
const unsigned runs = v4_post_runs(v4_post_cases, v4_post_case_count, 1);
@@ -142,6 +143,9 @@ int main(void)
/* ---- lines, as messages ---- */
r = line(V4_MESH_HERA, "3 4 + .", &how);
CHECK(how == V4_TEXT_COMPLETED && strcmp(r, "7 ") == 0, "a line to Hera: \"%s\" (%d)", r, how);
/* starshipos.4th, a system capsule loaded before POST (MACHINE.md 3, step 3; ruled 2026-11-18) */
r = line(V4_MESH_HERA, "STARSHIPOS S\" ok\" DOE", &how); /* COLD leaves FORTH alone in the search; init.4th will set it */
CHECK(how == V4_TEXT_COMPLETED && strcmp(r, "ok") == 0, "starshipos.4th is loaded: in STARSHIPOS, DOE types its name: \"%s\" (%d)", r, how);
r = line(V4_MESH_HERA, "NODE-ME .", &how);
CHECK(how == V4_TEXT_COMPLETED && strcmp(r, "0 ") == 0, "NODE-ME: Hera is at place 0: \"%s\"", r);
r = line(V4_MESH_HERA, "NOSUCH", &how);