summaryrefslogtreecommitdiff
path: root/ocaml/FINDINGS.md
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml/FINDINGS.md')
-rw-r--r--ocaml/FINDINGS.md113
1 files changed, 113 insertions, 0 deletions
diff --git a/ocaml/FINDINGS.md b/ocaml/FINDINGS.md
new file mode 100644
index 0000000..397924c
--- /dev/null
+++ b/ocaml/FINDINGS.md
@@ -0,0 +1,113 @@
+# Critical Boot System Findings (2025-01-06)
+
+## Summary
+We discovered that the ivory.pill file structure is `["ivory" ARVO_CORE]` where the tail is a CELL containing the complete Arvo core, NOT atom 0. However, the lifecycle formula `[2 [0 3] [0 2]]` FAILS when executed on this Arvo core.
+
+## Detailed Findings
+
+### 1. Ivory Pill Structure
+**Verified by:** `test/examine_ivory.ml`
+
+```
+Tag: ivory
+Tail type: CELL
+ Head type: cell
+ Tail type: cell
+✓ Has slot 2 and 3
+```
+
+The ivory.pill file contains:
+- Tag: The atom "ivory"
+- Tail: **A complete Arvo core (CELL)** - NOT null/atom 0!
+
+### 2. Lifecycle Formula Execution Test
+**Tested by:** `test/test_two_stage_boot.ml`
+
+Running `[2 [0 3] [0 2]]` on the Arvo core:
+- ✓ Step 1: `*[core [0 3]]` succeeds → returns cell
+- ✓ Step 2: `*[core [0 2]]` succeeds → returns cell
+- ✗ Step 3: `*[slot3 slot2]` **FAILS with Nock Exit**
+
+### 3. What This Means
+
+The ivory.pill file's Arvo core **cannot be bootstrapped** using the lifecycle formula in our implementation! This leads to two possibilities:
+
+**Possibility A:** The embedded ivory in C Vere is DIFFERENT from ivory.pill
+- Embedded might be `["ivory" 0]` or some simpler structure
+- ivory.pill file might be for a different use case
+
+**Possibility B:** C Vere's `-B solid.pill` path doesn't use ivory at all
+- Your log showed `u3v_life: eve=null` during solid pill boot
+- Maybe solid pill boot skips the ivory pill entirely?
+- The `u3v_boot_lite()` code in mars.c was COMMENTED OUT!
+
+## Questions to Answer
+
+1. **Does `-B solid.pill` load ivory.pill at all?**
+ - Need to trace mars.c boot path for `-B` flag
+ - Check if embedded ivory is even used
+
+2. **What is eve=null in your C Vere log?**
+ - If eve is null (atom 0), how does `[2 [0 3] [0 2]]` work on it?
+ - Our test proves it CANNOT work on atom 0!
+
+3. **Is ivory.pill the right file to use?**
+ - Maybe there's a different pill for bootstrapping?
+ - Or maybe solid.pill contains everything needed?
+
+## C Vere Test Results
+
+**Test Created**: `vere/pkg/noun/life_test.c`
+**Built with**: `zig build life-test`
+
+**Result**:
+```
+Testing lifecycle formula [2 [0 3] [0 2]] on null
+
+Formula: [2 [0 3] [0 2]]
+Subject: 0 (null)
+
+✗ FAILED!
+Error: : %exit
+
+This confirms the formula CANNOT work on atom 0!
+```
+
+**PROVEN**: The lifecycle formula `[2 [0 3] [0 2]]` **FAILS** on atom 0 in C Vere!
+
+## The Contradiction
+
+Your boot log showed:
+```
+u3v_boot: processing 10 events
+u3v_life: eve=null (atom=yes cell=no)
+u3v_life: completed successfully
+```
+
+But our C test PROVES this is impossible! The lifecycle formula cannot succeed on null!
+
+## Possible Explanations
+
+1. **"eve=null" doesn't mean the lifecycle formula is called on null**
+ - Maybe it's just logging what the original `eve` was before processing?
+ - The actual u3v_life call might receive something else?
+
+2. **The log is from a DIFFERENT u3v_life call**
+ - Maybe there are TWO separate calls to u3v_life?
+ - One with ivory pill's core (succeeds)
+ - One that's never actually executed (logged as null)?
+
+3. **There's special case handling we're missing**
+ - Maybe C Vere checks for null and skips u3v_life entirely?
+ - The log might be misleading?
+
+## Next Steps
+
+1. Add MORE detailed logging to C Vere's u3v_life to see:
+ - Exact eve structure being passed
+ - Whether formula actually executes
+ - What the result is
+
+2. Trace where u3v_life is called from during `-B solid.pill` boot
+
+3. Check if there's special handling for null in u3v_boot or mars.c