v4 init.4th, steps 1 and 2: the ACL policy loaded after POST, then the search order

Captain Bob ruled "ACL at boot", loaded "From init.4th", the include
"Compose[d] in FORTH".
- capsules/v4/init.4th, at block 3980: S" v4:ACL.4th" CAPSULE-INCLUDE,
  then STARSHIPOS.
- capsules/v4/ACL.4th is the policy, git mv'ed from v4/capsule/ACL.fth
  and reflowed into chained 64x16 blocks, its text unchanged.
- CAPSULE-INCLUDE in centre.4th places a capsule and LOADs its lowest
  block. It is composed from CAPSULE-OPEN and CAPSULE-LINE, with no new
  C word.
- The mesh loads v4:init.4th after POST and COLD, its one fixed step
  there.

Test first in test_mesh_boot: the parity line, DOE without naming
STARSHIPOS, and ACL-BOOT pinned. The before-run failed.

After: 113 checks pass and POST is 990/990. All 52 tests, test-32 and
ASan/UBSan pass. The dictionary has 405 words. One amd64 session passes
18/18 with "ACL: active".

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-19 11:57:42 +00:00
parent fdf9c1946c
commit b13d452e66
17 changed files with 975 additions and 59 deletions
+7
View File
@@ -131,6 +131,7 @@ int main(void)
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");
CHECK(strstr(said, "PARITY:V4_CAPSULE name=v4:init.4th ") != 0, "init.4th, after POST and COLD, with its parity line (MACHINE.md 3, step 5)");
{ /* 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);
@@ -145,6 +146,12 @@ int main(void)
CHECK(how == V4_TEXT_COMPLETED && strcmp(r, "7 ") == 0, "a line to Hera: \"%s\" (%d)", r, how);
/* the capsules were placed in RAM, block n at n - R, and loaded from there (capsule blocks plan, step 4):
* forth79.4th's lowest block, 3948, is RAM block 1900 */
/* init.4th (docs/v4.0.0/plans/2026-11-18-v4-init.md, steps 1 and 2): security on, then the search order --
* checked first, before any line below changes the system (the COLD further down takes it all away) */
r = line(V4_MESH_HERA, "S\" ok\" DOE", &how);
CHECK(how == V4_TEXT_COMPLETED && strcmp(r, "ok") == 0, "init.4th set the search order: DOE is found without naming STARSHIPOS: \"%s\" (%d)", r, how);
r = line(V4_MESH_HERA, "' ACL-BOOT ACL-PINNED? . ' ACL-RECHECK ACL-PINNED? .", &how);
CHECK(how == V4_TEXT_COMPLETED && strcmp(r, "-1 -1 ") == 0, "init.4th turned security on: the ACL policy is loaded, its words pinned: \"%s\" (%d)", r, how);
r = line(V4_MESH_HERA, "1900 BLOCK 16 TYPE", &how);
CHECK(how == V4_TEXT_COMPLETED && strncmp(r, "( forth79.4th --", 16) == 0, "forth79.4th's lowest block is in RAM block 1900: \"%.20s\" (%d)", r, how);
/* starshipos.4th, a system capsule loaded before POST (MACHINE.md 3, step 3; ruled 2026-11-18) */