Capsule blocks step 2: mkcapsule makes no claims -- a later write overwrites

Captain Bob ruled "Overwrite. That's it. Deterministic and final", within
a capsule and across capsules, "consistent with VOCABULARY FORGET & FENCE
philosophy, not implementation". Of what only prevented collisions:
"All of it goes".
- The cross-capsule collision gate is gone.
- tools/capsule-reserved.txt and its check are gone.
- The interactive resolver and its claim registry are gone.
- BLOCK_MAP.md says "Blocks used", and marks a shared number "the later
  write overwrites". It is a convenience, not a gate.
- An unknown option is refused with the usage. A removed mode was
  otherwise taken for the capsules directory, with its next argument as
  the output file.

Test first: scripts/test_mkcapsule_overwrite.sh, 9 checks.
- The before-run failed 7. A repeat within one capsule already built,
  since there was never a check for it.
- After: all 9 pass.

step 1's test still passes, the amd64 build is clean, all 40 capsules
lint, and the mesh boot passes 109 checks with POST 990/990.

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 19:44:32 +00:00
parent 6f9900f805
commit f30005e1f6
9 changed files with 461 additions and 626 deletions
+1 -5
View File
@@ -6,7 +6,7 @@
## Capsule Summary
| Capsule | Blocks claimed | xxHash64 | Signed |
| Capsule | Blocks used | xxHash64 | Signed |
|---------|----------------|----------|--------|
| `ACL.4th` | 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4015 | `0xf8890c05c0d8f921` | n/a |
| `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` | n/a |
@@ -386,9 +386,5 @@
| 8203 | `v4:physics.4th` | `0x747d89ca8d57e29c` | ok |
| 8204 | `v4:physics.4th` | `0x747d89ca8d57e29c` | ok |
## Conflicts
None.
---
*40 capsule(s) scanned. Re-run `mkcapsule --manifest <dir>` to refresh.*
+14 -1
View File
@@ -88,7 +88,20 @@ Each step is test first, then POST and the protocol:
The plan as written: `block_subsystem.h` and the kernel read
it, and `mkcapsule` is given it at build time in place of its literal 2048.
2. **`mkcapsule`.**
2. **`mkcapsule`. Built 2026-11-18** (rulings: overwrite within a capsule too, "consistent with
VOCABULARY FORGET & FENCE philosophy, not implementation"; of what only prevents collisions, "All of
it goes"):
- the cross-capsule collision gate is gone;
- so are `tools/capsule-reserved.txt` with its check, and the interactive resolver with its claim
registry;
- the map says "Blocks used", and marks a shared number "the later write overwrites";
- an unknown option is refused with the usage, so a removed mode is never taken for the capsules
directory.
A repeat within one capsule had no check to remove. Tested by `scripts/test_mkcapsule_overwrite.sh`,
9 checks, in `logs/20261118-mkcapsule-overwrite/`.
The plan as written:
- Its floor comes from the knob.
- Its cross-capsule collision check goes, since a later write overwrites.
- `BLOCK_MAP.md` says "Blocks used".
@@ -0,0 +1,262 @@
HOSTCC tools/mkcapsule.c tools/pkcs8_ed25519.c kernel/src/crypto/ed25519.c kernel/src/crypto/fe25519.c kernel/src/crypto/scalar25519.c kernel/src/crypto/sha512.c kernel/src/crypto/x509_ed25519.c
V4ROM capsules/v4/rom -> build/amd64/kernel/v4_rom_64.c build/amd64/kernel/v4_map_64.c build/amd64/kernel/v4_mesh_rom_64.c
CC (kernel) v3/src/blkio_ram.c
CC (kernel) v3/src/block_subsystem.c
CC (kernel) v3/src/compudynamics.c
CC (kernel) v3/src/dictionary_heat_optimization.c
CC (kernel) v3/src/dictionary_management.c
CC (kernel) v3/src/heartbeat_export.c
CC (kernel) v3/src/inference_engine.c
CC (kernel) v3/src/io.c
CC (kernel) v3/src/math_portable.c
CC (kernel) v3/src/memory_management.c
CC (kernel) v3/src/physics_execution_hooks.c
CC (kernel) v3/src/physics_hotwords_cache.c
CC (kernel) v3/src/physics_metadata.c
CC (kernel) v3/src/physics_pipelining_metrics.c
CC (kernel) v3/src/physics_runtime.c
CC (kernel) v3/src/profiler.c
CC (kernel) v3/src/rolling_window_of_truth.c
CC (kernel) v3/src/ssm_jacquard.c
CC (kernel) v3/src/stack_management.c
CC (kernel) v3/src/vm_api.c
CC (kernel) v3/src/vm_debug.c
CC (kernel) v3/src/word_registry.c
CC (kernel) v3/src/word_source/acl_words.c
CC (kernel) v3/src/word_source/arithmetic_words.c
CC (kernel) v3/src/word_source/block_words.c
CC (kernel) v3/src/word_source/control_words.c
CC (kernel) v3/src/word_source/defer_words.c
CC (kernel) v3/src/word_source/defining_words.c
CC (kernel) v3/src/word_source/dictionary_heat_diagnostic_words.c
CC (kernel) v3/src/word_source/dictionary_manipulation_words.c
CC (kernel) v3/src/word_source/dictionary_words.c
CC (kernel) v3/src/word_source/double_words.c
CC (kernel) v3/src/word_source/editor_words.c
CC (kernel) v3/src/word_source/format_words.c
CC (kernel) v3/src/word_source/framebuffer_words.c
CC (kernel) v3/src/word_source/inference_words.c
CC (kernel) v3/src/word_source/io_words.c
CC (kernel) v3/src/word_source/keyboard_words.c
CC (kernel) v3/src/word_source/lifecycle_words_hosted.c
CC (kernel) v3/src/word_source/log_words.c
CC (kernel) v3/src/word_source/logical_words.c
CC (kernel) v3/src/word_source/memory_words.c
CC (kernel) v3/src/word_source/mixed_arithmetic_words.c
CC (kernel) v3/src/word_source/physics_benchmark_words.c
CC (kernel) v3/src/word_source/physics_diagnostic_words.c
CC (kernel) v3/src/word_source/physics_freeze_words.c
CC (kernel) v3/src/word_source/physics_pipelining_diagnostic_words.c
CC (kernel) v3/src/word_source/q48_words.c
CC (kernel) v3/src/word_source/return_stack_words.c
CC (kernel) v3/src/word_source/scroll_words.c
CC (kernel) v3/src/word_source/stack_words.c
CC (kernel) v3/src/word_source/starforth_words.c
CC (kernel) v3/src/word_source/string_words.c
CC (kernel) v3/src/word_source/system_words.c
CC (kernel) v3/src/word_source/ttf_words.c
CC (kernel) v3/src/word_source/vocabulary_words.c
CC (kernel) v3/src/test_runner/test_common.c
CC (kernel) v3/src/test_runner/test_contracts.c
CC (kernel) v3/src/test_runner/test_runner.c
CC (kernel) v3/src/test_runner/modules/acl_words_test.c
CC (kernel) v3/src/test_runner/modules/arithmetic_words_test.c
CC (kernel) v3/src/test_runner/modules/block_words_test.c
CC (kernel) v3/src/test_runner/modules/control_words_test.c
CC (kernel) v3/src/test_runner/modules/defining_words_tests.c
CC (kernel) v3/src/test_runner/modules/dictionary_manipulation_words_test.c
CC (kernel) v3/src/test_runner/modules/dictionary_words_test.c
CC (kernel) v3/src/test_runner/modules/double_words_test.c
CC (kernel) v3/src/test_runner/modules/format_words_test.c
CC (kernel) v3/src/test_runner/modules/inference_words_test.c
CC (kernel) v3/src/test_runner/modules/integration_tests.c
CC (kernel) v3/src/test_runner/modules/io_words_test.c
CC (kernel) v3/src/test_runner/modules/logical_words_test.c
CC (kernel) v3/src/test_runner/modules/mama_forth_words_test.c
CC (kernel) v3/src/test_runner/modules/memory_words_test.c
CC (kernel) v3/src/test_runner/modules/mixed_arithmetic_words_test.c
CC (kernel) v3/src/test_runner/modules/physics_freeze_words_test.c
CC (kernel) v3/src/test_runner/modules/q48_words_test.c
CC (kernel) v3/src/test_runner/modules/return_stack_words_test.c
CC (kernel) v3/src/test_runner/modules/stack_words_test.c
CC (kernel) v3/src/test_runner/modules/starforth_words_test.c
CC (kernel) v3/src/test_runner/modules/stress_tests.c
CC (kernel) v3/src/test_runner/modules/string_words_test.c
CC (kernel) v3/src/test_runner/modules/system_words_test.c
CC (kernel) v3/src/test_runner/modules/vocabulary_words_test.c
MKCAP capsules -> build/amd64/kernel/capsule_generated.c
mkcapsule: scanning capsules
[p] zuse.4th (1684 bytes, hash=0x490ded9be257a90b)
[p] font.4th (17688 bytes, hash=0x3f305911500c78f6)
[p] MANIFEST_AUTO.md (11687 bytes, hash=0xe022545a0755960f)
[p] multiuser-doe.4th (3942 bytes, hash=0x22140588ee7c39e6)
[p] hestia:init.4th (891 bytes, hash=0x64e111990fbc45ff)
[p] contrib:README.md (1855 bytes, hash=0x4212e52b927793e7)
[p] ACL.4th (4318 bytes, hash=0xf8890c05c0d8f921)
[p] workload-3.4th (2189 bytes, hash=0x62b7a71576ad1041)
[p] init-l8-diverse.4th (430 bytes, hash=0xaa293201a6c91838)
[p] user-font-demo.4th (1674 bytes, hash=0xce1fd7d1b581a56d)
[p] workload-9.4th (1321 bytes, hash=0x3f2bec73142aa424)
[p] lib.4th (619 bytes, hash=0x4b216635c359ef73)
[p] workload-calib1.4th (304 bytes, hash=0x3b9f2d17b554fabc)
[m] init.4th (669 bytes, hash=0xd09db9461b336431)
[p] workload-1-lite.4th (540 bytes, hash=0x44a7a7e3176dcc8d)
[p] init-l8-stable.4th (278 bytes, hash=0xdc3830f189063a9a)
[p] v4:physics.4th (2937 bytes, hash=0x747d89ca8d57e29c)
[p] v4:forth79.4th (1208 bytes, hash=0x4055641ee17d176b)
[p] v4:sys:log.f18 (4535 bytes, hash=0x544cd004233dff62)
[p] v4:sys:qmath.f18 (8607 bytes, hash=0xa93783c2c8f9b7db)
[p] v4:sys:map-32.f18 (3162 bytes, hash=0x5bdf8cbbebdd3c8f)
[p] v4:sys:blocks.f18 (6112 bytes, hash=0x09d361dbe6174236)
[p] v4:sys:input.f18 (10692 bytes, hash=0x0f13c3f9d5fd07fc)
[p] v4:sys:dict.f18 (13816 bytes, hash=0xe3453808afd5a0af)
[p] v4:sys:forth.f18 (12617 bytes, hash=0xc4c0ad315c95eda4)
[p] v4:sys:quit.f18 (32141 bytes, hash=0x7fa7a7668b6bf1ed)
[p] v4:sys:map-64.f18 (3201 bytes, hash=0x06cb44832df2b8fd)
[p] v4:sys:codegen.f18 (4999 bytes, hash=0x36d2ae84d2911b90)
[p] v4:sys:acl.f18 (4100 bytes, hash=0x76e7e746befa2733)
[p] v4:sys:core.f18 (24370 bytes, hash=0x0f415502fccc3fba)
[p] v4:sys:system.f18 (10189 bytes, hash=0xfe257eb084c43a5d)
[p] v4:sys:numout.f18 (6641 bytes, hash=0xca0fb0f9c1589e20)
[p] v4:sys:words.f18 (9642 bytes, hash=0x2f4e5f7f3e7f736f)
[p] v4:sys:compile.f18 (23099 bytes, hash=0xb46bf77ceee7245a)
[p] v4:sys:end.f18 (1452 bytes, hash=0x98fd33b1c431cfe7)
[p] v4:starshipos.4th (702 bytes, hash=0x5658ee1b771b5963)
[p] v4:hera.4th (1372 bytes, hash=0x85300ad4e6e8b86b)
[p] v4:rom:sym.f18 (5610 bytes, hash=0xbbad5748f5bbf863)
[p] v4:rom:main.f18 (2284 bytes, hash=0x6994f1f1d567e163)
[p] v4:rom:math.f18 (5108 bytes, hash=0x9be63ad87934622f)
[p] v4:rom:dir.f18 (5112 bytes, hash=0x51b069f0623ded16)
[p] v4:rom:num.f18 (2634 bytes, hash=0x08b76f1b058cac17)
[p] v4:rom:pack.f18 (4583 bytes, hash=0x65a944d8eb7de7f2)
[p] v4:rom:word.f18 (12966 bytes, hash=0x9210d6c2ac424d11)
[p] v4:rom:in.f18 (4230 bytes, hash=0x65798bed38a09f0f)
[p] v4:rom:mesh.f18 (449 bytes, hash=0x83723d76b9620c2c)
[p] v4:centre.4th (3899 bytes, hash=0xccd1b28a101c78b2)
[p] README.md (2305 bytes, hash=0x09a684ebdfbeb01c)
[p] block-acl.4th (980 bytes, hash=0xf6cc2a59e3a6734e)
[p] sdk.4th (2295 bytes, hash=0x008fdbbb62c94a3a)
[p] pki:starshipos-intermediate.der (408 bytes, hash=0xb40aab540c19f877)
[p] init-l8-omni.4th (1986 bytes, hash=0x5979e314d6452045)
[p] acl-std79.4th (5040 bytes, hash=0x773bf9209df191d1)
[p] doe-campaign.4th (2369 bytes, hash=0x26fb485e5c9dc6ff)
[p] init-l8-volatile.4th (718 bytes, hash=0x98caabbbd92abac4)
[p] doe.4th (3244 bytes, hash=0xf154616d248e861f)
[p] fabric.4th (10359 bytes, hash=0x9d9489cbeca4099b)
[p] workload-4.4th (469 bytes, hash=0x099619264e650b1c)
[p] init-l8-temporal.4th (363 bytes, hash=0x51abd4c138246651)
[p] workload-5.4th (480 bytes, hash=0x526964c7c9506a11)
[p] fonts:README.md (1846 bytes, hash=0xf628c2b7a49f4d46)
[p] fonts:JetBrainsMono-Regular.ttf (270224 bytes, hash=0xf4b7077dab274e6b)
[p] init-l8-transition.4th (529 bytes, hash=0xbcc1a81976f0a4c9)
[p] workload-2.4th (1321 bytes, hash=0xf113b3d0bcccae47)
[p] workload-1.4th (1041 bytes, hash=0x63e251adb0a03613)
[p] workload-5-lite.4th (468 bytes, hash=0xea0303f38824f254)
[p] workload-0.4th (290 bytes, hash=0x93f86f60aeba8feb)
[p] artemis:init.4th (16782 bytes, hash=0x7ba120e2a6aab239)
[p] MANIFEST.md (35813 bytes, hash=0x9d3a6fdb7415d224)
[p] workload-7.4th (206 bytes, hash=0x02862291387eb7ac)
[p] BLOCK_MAP.md (22886 bytes, hash=0x04227af00df2126e)
[p] turtle.4th (3254 bytes, hash=0x4d470418ca543365)
[p] workload-8.4th (172 bytes, hash=0x56b7f2f0efa000df)
[p] workload-6.4th (1986 bytes, hash=0x06fc0ce1e369ef5a)
mkcapsule: 74 capsule(s) collected
CC (loader) v3/src/blkio_ram.c
CC (loader) v3/src/block_subsystem.c
CC (loader) v3/src/compudynamics.c
mkcapsule: wrote build/amd64/kernel/capsule_generated.c
MKCAP capsules -> capsules/BLOCK_MAP.md
mkcapsule: manifest written to capsules/BLOCK_MAP.md (40 capsule(s))
CC (loader) v3/src/dictionary_heat_optimization.c
CC (loader) v3/src/dictionary_management.c
CC (loader) v3/src/heartbeat_export.c
CC (loader) v3/src/inference_engine.c
CC (loader) v3/src/io.c
CC (loader) v3/src/math_portable.c
CC (loader) v3/src/memory_management.c
CC (loader) v3/src/physics_hotwords_cache.c
CC (loader) v3/src/physics_execution_hooks.c
CC (loader) v3/src/physics_metadata.c
CC (loader) v3/src/physics_pipelining_metrics.c
CC (loader) v3/src/physics_runtime.c
CC (loader) v3/src/profiler.c
CC (loader) v3/src/rolling_window_of_truth.c
CC (loader) v3/src/ssm_jacquard.c
CC (loader) v3/src/stack_management.c
CC (loader) v3/src/vm_api.c
CC (loader) v3/src/vm_debug.c
CC (loader) v3/src/word_registry.c
CC (loader) v3/src/word_source/acl_words.c
CC (loader) v3/src/word_source/arithmetic_words.c
CC (loader) v3/src/word_source/block_words.c
CC (loader) v3/src/word_source/control_words.c
CC (loader) v3/src/word_source/defer_words.c
CC (loader) v3/src/word_source/defining_words.c
CC (loader) v3/src/word_source/dictionary_heat_diagnostic_words.c
CC (loader) v3/src/word_source/dictionary_manipulation_words.c
CC (loader) v3/src/word_source/dictionary_words.c
CC (loader) v3/src/word_source/double_words.c
CC (loader) v3/src/word_source/editor_words.c
CC (loader) v3/src/word_source/format_words.c
CC (loader) v3/src/word_source/framebuffer_words.c
CC (loader) v3/src/word_source/inference_words.c
CC (loader) v3/src/word_source/io_words.c
CC (loader) v3/src/word_source/keyboard_words.c
CC (loader) v3/src/word_source/lifecycle_words_hosted.c
CC (loader) v3/src/word_source/log_words.c
CC (loader) v3/src/word_source/logical_words.c
CC (loader) v3/src/word_source/memory_words.c
CC (loader) v3/src/word_source/mixed_arithmetic_words.c
CC (loader) v3/src/word_source/physics_benchmark_words.c
CC (loader) v3/src/word_source/physics_diagnostic_words.c
CC (loader) v3/src/word_source/physics_freeze_words.c
CC (loader) v3/src/word_source/physics_pipelining_diagnostic_words.c
CC (loader) v3/src/word_source/q48_words.c
CC (loader) v3/src/word_source/return_stack_words.c
CC (loader) v3/src/word_source/scroll_words.c
CC (loader) v3/src/word_source/stack_words.c
CC (loader) v3/src/word_source/starforth_words.c
CC (loader) v3/src/word_source/string_words.c
CC (loader) v3/src/word_source/system_words.c
CC (loader) v3/src/word_source/ttf_words.c
CC (loader) v3/src/word_source/vocabulary_words.c
CC (loader) v3/src/test_runner/test_common.c
CC (loader) v3/src/test_runner/test_contracts.c
CC (loader) v3/src/test_runner/test_runner.c
CC (loader) v3/src/test_runner/modules/acl_words_test.c
CC (loader) v3/src/test_runner/modules/arithmetic_words_test.c
CC (loader) v3/src/test_runner/modules/block_words_test.c
CC (loader) v3/src/test_runner/modules/control_words_test.c
CC (loader) v3/src/test_runner/modules/defining_words_tests.c
CC (loader) v3/src/test_runner/modules/dictionary_manipulation_words_test.c
CC (loader) v3/src/test_runner/modules/dictionary_words_test.c
CC (loader) v3/src/test_runner/modules/double_words_test.c
CC (loader) v3/src/test_runner/modules/format_words_test.c
CC (loader) v3/src/test_runner/modules/inference_words_test.c
CC (loader) v3/src/test_runner/modules/integration_tests.c
CC (loader) v3/src/test_runner/modules/io_words_test.c
CC (loader) v3/src/test_runner/modules/logical_words_test.c
CC (loader) v3/src/test_runner/modules/mama_forth_words_test.c
CC (loader) v3/src/test_runner/modules/memory_words_test.c
CC (loader) v3/src/test_runner/modules/mixed_arithmetic_words_test.c
CC (loader) v3/src/test_runner/modules/physics_freeze_words_test.c
CC (loader) v3/src/test_runner/modules/q48_words_test.c
CC (loader) v3/src/test_runner/modules/return_stack_words_test.c
CC (loader) v3/src/test_runner/modules/stack_words_test.c
CC (loader) v3/src/test_runner/modules/starforth_words_test.c
CC (loader) v3/src/test_runner/modules/stress_tests.c
CC (loader) v3/src/test_runner/modules/string_words_test.c
CC (loader) v3/src/test_runner/modules/system_words_test.c
CC build/amd64/kernel/capsule_generated.c
CC (loader) v3/src/test_runner/modules/vocabulary_words_test.c
CC (kernel) build/amd64/kernel/capsule_generated.c
LD (kernel) build/amd64/kernel/starkernel_kernel.elf
ld: warning: build/amd64/kernel/obj/kernel/arch/amd64/switch.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
Kernel built: build/amd64/kernel/starkernel_kernel.elf
LD (loader PE) build/amd64/kernel/starkernel_loader.efi
Loader built: build/amd64/kernel/starkernel_loader.efi
StarKernel built successfully for amd64
Loader: build/amd64/kernel/starkernel_loader.efi
Kernel: build/amd64/kernel/starkernel_kernel.elf
rc=0
@@ -0,0 +1,81 @@
mkcapsule: scanning /home/user/LithosAnanke/capsules
[p] zuse.4th (1684 bytes, hash=0x490ded9be257a90b)
[p] font.4th (17688 bytes, hash=0x3f305911500c78f6)
[p] MANIFEST_AUTO.md (11687 bytes, hash=0xe022545a0755960f)
[p] multiuser-doe.4th (3942 bytes, hash=0x22140588ee7c39e6)
[p] hestia:init.4th (891 bytes, hash=0x64e111990fbc45ff)
[p] contrib:README.md (1855 bytes, hash=0x4212e52b927793e7)
[p] ACL.4th (4318 bytes, hash=0xf8890c05c0d8f921)
[p] workload-3.4th (2189 bytes, hash=0x62b7a71576ad1041)
[p] init-l8-diverse.4th (430 bytes, hash=0xaa293201a6c91838)
[p] user-font-demo.4th (1674 bytes, hash=0xce1fd7d1b581a56d)
[p] workload-9.4th (1321 bytes, hash=0x3f2bec73142aa424)
[p] lib.4th (619 bytes, hash=0x4b216635c359ef73)
[p] workload-calib1.4th (304 bytes, hash=0x3b9f2d17b554fabc)
[m] init.4th (669 bytes, hash=0xd09db9461b336431)
[p] workload-1-lite.4th (540 bytes, hash=0x44a7a7e3176dcc8d)
[p] init-l8-stable.4th (278 bytes, hash=0xdc3830f189063a9a)
[p] v4:physics.4th (2937 bytes, hash=0x747d89ca8d57e29c)
[p] v4:forth79.4th (1208 bytes, hash=0x4055641ee17d176b)
[p] v4:sys:log.f18 (4535 bytes, hash=0x544cd004233dff62)
[p] v4:sys:qmath.f18 (8607 bytes, hash=0xa93783c2c8f9b7db)
[p] v4:sys:map-32.f18 (3162 bytes, hash=0x5bdf8cbbebdd3c8f)
[p] v4:sys:blocks.f18 (6112 bytes, hash=0x09d361dbe6174236)
[p] v4:sys:input.f18 (10692 bytes, hash=0x0f13c3f9d5fd07fc)
[p] v4:sys:dict.f18 (13816 bytes, hash=0xe3453808afd5a0af)
[p] v4:sys:forth.f18 (12617 bytes, hash=0xc4c0ad315c95eda4)
[p] v4:sys:quit.f18 (32141 bytes, hash=0x7fa7a7668b6bf1ed)
[p] v4:sys:map-64.f18 (3201 bytes, hash=0x06cb44832df2b8fd)
[p] v4:sys:codegen.f18 (4999 bytes, hash=0x36d2ae84d2911b90)
[p] v4:sys:acl.f18 (4100 bytes, hash=0x76e7e746befa2733)
[p] v4:sys:core.f18 (24370 bytes, hash=0x0f415502fccc3fba)
[p] v4:sys:system.f18 (10189 bytes, hash=0xfe257eb084c43a5d)
[p] v4:sys:numout.f18 (6641 bytes, hash=0xca0fb0f9c1589e20)
[p] v4:sys:words.f18 (9642 bytes, hash=0x2f4e5f7f3e7f736f)
[p] v4:sys:compile.f18 (23099 bytes, hash=0xb46bf77ceee7245a)
[p] v4:sys:end.f18 (1452 bytes, hash=0x98fd33b1c431cfe7)
[p] v4:starshipos.4th (702 bytes, hash=0x5658ee1b771b5963)
[p] v4:hera.4th (1372 bytes, hash=0x85300ad4e6e8b86b)
[p] v4:rom:sym.f18 (5610 bytes, hash=0xbbad5748f5bbf863)
[p] v4:rom:main.f18 (2284 bytes, hash=0x6994f1f1d567e163)
[p] v4:rom:math.f18 (5108 bytes, hash=0x9be63ad87934622f)
[p] v4:rom:dir.f18 (5112 bytes, hash=0x51b069f0623ded16)
[p] v4:rom:num.f18 (2634 bytes, hash=0x08b76f1b058cac17)
[p] v4:rom:pack.f18 (4583 bytes, hash=0x65a944d8eb7de7f2)
[p] v4:rom:word.f18 (12966 bytes, hash=0x9210d6c2ac424d11)
[p] v4:rom:in.f18 (4230 bytes, hash=0x65798bed38a09f0f)
[p] v4:rom:mesh.f18 (449 bytes, hash=0x83723d76b9620c2c)
[p] v4:centre.4th (3899 bytes, hash=0xccd1b28a101c78b2)
[p] README.md (2305 bytes, hash=0x09a684ebdfbeb01c)
[p] block-acl.4th (980 bytes, hash=0xf6cc2a59e3a6734e)
[p] sdk.4th (2295 bytes, hash=0x008fdbbb62c94a3a)
[p] pki:starshipos-intermediate.der (408 bytes, hash=0xb40aab540c19f877)
[p] init-l8-omni.4th (1986 bytes, hash=0x5979e314d6452045)
[p] acl-std79.4th (5040 bytes, hash=0x773bf9209df191d1)
[p] doe-campaign.4th (2369 bytes, hash=0x26fb485e5c9dc6ff)
[p] init-l8-volatile.4th (718 bytes, hash=0x98caabbbd92abac4)
[p] doe.4th (3244 bytes, hash=0xf154616d248e861f)
[p] fabric.4th (10359 bytes, hash=0x9d9489cbeca4099b)
[p] workload-4.4th (469 bytes, hash=0x099619264e650b1c)
[p] init-l8-temporal.4th (363 bytes, hash=0x51abd4c138246651)
[p] workload-5.4th (480 bytes, hash=0x526964c7c9506a11)
[p] fonts:README.md (1846 bytes, hash=0xf628c2b7a49f4d46)
[p] fonts:JetBrainsMono-Regular.ttf (270224 bytes, hash=0xf4b7077dab274e6b)
[p] init-l8-transition.4th (529 bytes, hash=0xbcc1a81976f0a4c9)
[p] workload-2.4th (1321 bytes, hash=0xf113b3d0bcccae47)
[p] workload-1.4th (1041 bytes, hash=0x63e251adb0a03613)
[p] workload-5-lite.4th (468 bytes, hash=0xea0303f38824f254)
[p] workload-0.4th (290 bytes, hash=0x93f86f60aeba8feb)
[p] artemis:init.4th (16782 bytes, hash=0x7ba120e2a6aab239)
[p] MANIFEST.md (35813 bytes, hash=0x9d3a6fdb7415d224)
[p] workload-7.4th (206 bytes, hash=0x02862291387eb7ac)
[p] BLOCK_MAP.md (22886 bytes, hash=0x04227af00df2126e)
[p] turtle.4th (3254 bytes, hash=0x4d470418ca543365)
[p] workload-8.4th (172 bytes, hash=0x56b7f2f0efa000df)
[p] workload-6.4th (1986 bytes, hash=0x06fc0ce1e369ef5a)
mkcapsule: 74 capsule(s) collected
mkcapsule: wrote /home/user/LithosAnanke/v4/build/capsule_generated.c
[mesh boot, V4_CELL_BITS=64]
v4 mesh boot: V4_CELL_BITS=64
PARITY:V4_POST tests=990 pass=990 fail=0
109 checks, 0 failures
@@ -0,0 +1,9 @@
PASS: two capsules sharing a block number build
PASS: one capsule repeating a block number builds
PASS: a page in a once-reserved range builds
PASS: and tools/capsule-reserved.txt is gone
PASS: --resolve is no longer a mode: it is answered with the usage
PASS: and the tool has no such mode
PASS: the map says Blocks used
PASS: and calls no number a conflict
RESULT: PASS
@@ -0,0 +1,9 @@
FAIL: two capsules sharing a block number build
PASS: one capsule repeating a block number builds
FAIL: a page in a once-reserved range builds
FAIL: and tools/capsule-reserved.txt is gone
FAIL: --resolve is no longer a mode: it is answered with the usage
FAIL: and the tool has no such mode
FAIL: the map says Blocks used
FAIL: and calls no number a conflict
RESULT: FAIL
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LicenseRef-Starship-1.0
# Copyright (c) 2023-2026 Robert A. James
# test_mkcapsule_overwrite.sh -- the tests of capsule blocks step 2
# (docs/v4.0.0/plans/2026-11-18-capsule-blocks.md). Captain Bob: "Overwrite. That's it.
# Deterministic and final." -- within a capsule and across capsules, "consistent with VOCABULARY
# FORGET & FENCE philosophy, not implementation"; and of what only prevents collisions: "All of it
# goes".
#
# What is checked, mkcapsule run from the repository root (where it reads tools/):
# - two capsules sharing a block number build;
# - one capsule repeating a block number builds;
# - a page in a range capsule-reserved.txt held builds, and that file is gone;
# - --resolve is no longer a mode;
# - the map says "Blocks used", and calls no number a conflict.
#
# No QEMU. Prints PASS:/FAIL: per check and RESULT:; exits 0 only if every check passes.
set -uo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
T=$(mktemp -d)
trap 'rm -rf "$T"' EXIT
ok=1
check() { if eval "$2"; then echo "PASS: $1"; else echo "FAIL: $1"; ok=0; fi; }
MK="$T/mkcapsule"
cc -std=c99 -O2 -I"$ROOT/v3/include" -I"$ROOT/kernel/include" -I"$ROOT/tools" -o "$MK" \
"$ROOT/tools/mkcapsule.c" "$ROOT/tools/pkcs8_ed25519.c" "$ROOT/kernel/src/crypto/ed25519.c" \
"$ROOT/kernel/src/crypto/fe25519.c" "$ROOT/kernel/src/crypto/scalar25519.c" \
"$ROOT/kernel/src/crypto/sha512.c" "$ROOT/kernel/src/crypto/x509_ed25519.c" 2> "$T/cc.log"
build() { (cd "$ROOT" && "$MK" "$1" "$T/out.c" > "$T/build.log" 2>&1); } # build <capsules dir>
mkdir -p "$T/shared"
printf 'Block 3000\n( first capsule )\n' > "$T/shared/a.4th"
printf 'Block 3000\n( second capsule, the same number )\n' > "$T/shared/b.4th"
check "two capsules sharing a block number build" 'build "$T/shared"'
mkdir -p "$T/repeat"
printf 'Block 3000\n( once )\nBlock 3000\n( again )\n' > "$T/repeat/r.4th"
check "one capsule repeating a block number builds" 'build "$T/repeat"'
mkdir -p "$T/reserved"
printf 'Block 4300\n( where process.4th was )\n' > "$T/reserved/p.4th"
check "a page in a once-reserved range builds" 'build "$T/reserved"'
check " and tools/capsule-reserved.txt is gone" '[ ! -e "$ROOT/tools/capsule-reserved.txt" ]'
(cd "$ROOT" && "$MK" --resolve "$T/shared" < /dev/null > "$T/resolve.log" 2>&1)
check "--resolve is no longer a mode: it is answered with the usage" 'grep -q "^Usage" "$T/resolve.log" && ! grep -q -i "conflict\|renumber" "$T/resolve.log"'
check " and the tool has no such mode" '! grep -q -- "--resolve" "$ROOT/tools/mkcapsule.c"'
(cd "$ROOT" && "$MK" --manifest "$T/shared" "$T/map.md" > /dev/null 2>&1)
check "the map says Blocks used" 'grep -q "Blocks used" "$T/map.md" 2>/dev/null'
check " and calls no number a conflict" '! grep -q -i "conflict\|claimed" "$T/map.md" 2>/dev/null'
if [ $ok = 1 ]; then echo "RESULT: PASS"; else echo "RESULT: FAIL"; fi
[ $ok = 1 ]
-37
View File
@@ -1,37 +0,0 @@
# capsule-reserved.txt — human-authored, git-tracked block ranges NOT
# owned by any capsule (FABRIC-3.md §XXIV, 2026-09-12).
#
# mkcapsule can already catch a capsule colliding with ANOTHER capsule --
# every capsule is a .4th file it scans. It has zero visibility into a
# block something else owns: Artemis's own non-capsule persistent data
# (identity records, home-blocks fence, etc.), or anything similar added
# later. This file is how a human tells it.
#
# Format, one range per line:
# START-END description
#
# START and END are inclusive logical block numbers (LBN). Lines starting
# with '#' and blank lines are ignored. Checked by both the plain build
# gate (check_reserved_conflicts(), hard-fails on collision) and
# `mkcapsule --resolve` (suggests renumbering around these too).
#
# Known device boundaries, for reference when adding entries (not
# reserved ranges themselves -- ramdrive is legitimately shared/reused by
# capsules; only entries below reserve anything):
# 2048-3071 volatile ramdrive (capsule_loader.c, KRD_MAX_BLOCKS=1024)
# 3072+ Artemis's real virtio-blk device (persistent, disk/artemis.img)
#
# No ranges reserved yet for non-capsule infrastructure (Artemis's own
# actual block usage becomes known from block_subsystem.c's BAM/
# home-blocks fence accounting, not guessed) -- but see below for a
# second, narrower use: recording a block range a capsule strip just
# freed, so mkcapsule's collision machinery won't let a future capsule
# silently reclaim it before a human decides to (FABRIC-3.5.md SXXII.4,
# SXVIII.4). These are lifted, not permanent, once someone deliberately
# wants the range back.
# Freed 2026-09-19 by the Tripod/kernel reshuffle's Category A surgical
# strip (FABRIC-3.6.md tasks 0.2/0.3; see capsules/MANIFEST.md's
# "Deleted capsules" section for the full account):
4055-4059 formerly common/msg.4th -- deleted, block content confirmed dead by all three FABRIC-3.5.md SXXII.2 routes
4300-4399 formerly process.4th -- deleted, block content confirmed dead by all three FABRIC-3.5.md SXXII.2 routes
+30 -583
View File
File diff suppressed because it is too large Load Diff