(* Test Two-Phase Boot: Ivory → Solid * * This matches the C Vere boot flow: * 1. Boot ivory pill (lite boot, creates minimal kernel) * 2. Boot solid events (metamorphosis to full kernel) *) open Nock_lib let test_boot env = Printf.printf "šŸŽÆ Testing Two-Phase Boot (Ivory → Solid)\n\n"; Eio.Switch.run @@ fun _sw -> let fs = Eio.Stdenv.fs env in (* Create runtime state *) let state = State.create () in (* Boot with ivory + solid *) match Boot.boot_solid ~fs state "ivory.pill" "solid.pill" with | Error msg -> Printf.printf "āŒ Boot failed: %s\n" msg; exit 1 | Ok () -> Printf.printf "āœ… Boot succeeded!\n\n"; (* Check kernel state *) let arvo = State.get_arvo state in Printf.printf "Arvo kernel structure:\n"; Printf.printf " Type: %s\n" (if Noun.is_cell arvo then "Cell" else "Atom"); Printf.printf "\nšŸŽ‰ TWO-PHASE BOOT COMPLETE!\n" let () = Printf.printf "\n"; Printf.printf "═══════════════════════════════════════════════════════════\n"; Printf.printf " Testing Two-Phase Boot System\n"; Printf.printf "═══════════════════════════════════════════════════════════\n"; Printf.printf "\n"; Eio_main.run test_boot