From da03400d5857aab4c809c34f0416d1c09c4fed12 Mon Sep 17 00:00:00 2001 From: polwex Date: Mon, 6 Oct 2025 22:16:33 +0700 Subject: pretty good pretty good --- ocaml/test/test_two_stage_boot.ml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'ocaml/test') diff --git a/ocaml/test/test_two_stage_boot.ml b/ocaml/test/test_two_stage_boot.ml index 7986b1d..da4f17b 100644 --- a/ocaml/test/test_two_stage_boot.ml +++ b/ocaml/test/test_two_stage_boot.ml @@ -57,15 +57,44 @@ let stage1_ivory_boot env = Printf.printf " ✓ SUCCESS! Kernel built in %.4fs\n\n" elapsed; (* Verify kernel has poke at slot 23 *) - Printf.printf "[5] Verifying kernel structure...\n%!"; + Printf.printf "[6] Verifying kernel structure...\n%!"; begin try - let _poke = Noun.slot (Z.of_int 23) kernel in - Printf.printf " ✓ Has poke gate at slot 23\n\n"; - + let poke = Noun.slot (Z.of_int 23) kernel in + Printf.printf " ✓ Has poke gate at slot 23\n"; + + (* Check structure at known slots to verify correctness *) + Printf.printf " Checking structural properties:\n"; + + (* Slot 2: should be battery (cell) *) + let slot2 = Noun.slot (Z.of_int 2) kernel in + Printf.printf " Slot 2 (battery): %s\n" + (if Noun.is_cell slot2 then "cell ✓" else "atom ✗"); + + (* Slot 3: should be payload (cell) *) + let slot3 = Noun.slot (Z.of_int 3) kernel in + Printf.printf " Slot 3 (payload): %s\n" + (if Noun.is_cell slot3 then "cell ✓" else "atom ✗"); + + (* Poke should be a cell (it's a gate) *) + Printf.printf " Slot 23 (poke): %s\n" + (if Noun.is_cell poke then "cell (gate) ✓" else "atom ✗"); + + (* Check head of poke (should be battery) *) + if Noun.is_cell poke then begin + let poke_battery = Noun.head poke in + Printf.printf " Poke battery: %s\n" + (if Noun.is_cell poke_battery then "cell ✓" else "atom ✗") + end; + + Printf.printf "\n"; Printf.printf "╔═══════════════════════════════════════╗\n"; Printf.printf "║ ✓ STAGE 1 COMPLETE! ║\n"; Printf.printf "╚═══════════════════════════════════════╝\n\n"; + Printf.printf "⚠️ NOTE: Structural checks passed, but cannot verify\n"; + Printf.printf " kernels are identical without mug comparison.\n"; + Printf.printf " Need to implement mug caching first!\n\n"; + Some kernel with _ -> -- cgit v1.2.3