● M4 is complete — full builtin parity with v1, just ci green. The headline numbers: #2

Merged
navicore merged 1 commit from M4 into main 2026-06-04 21:29:59 +00:00
Owner

M4 summary

The corpus verdict: v1's integration suite, ported to run against compiled binaries — 89 grouped tests covering
~200 of v1's 248 assertions — passes with zero ignores. Plus a permanent 57-goal differential corpus that runs
both implementations side by side (just diff-test, auto-skips in CI).

What landed:

  • Structured errors — relocatable ISO error balls that survive heap rewinding, byte-identical rendering to v1
  • catch/throw — catch frames as flagged choice points; the shared driver unwinds balls to the matching catcher;
    cut stops at catch frames; step limit stays uncatchable
  • findall/3 (bounded sub-search, nests, propagates errors), call/N + variable-goal metacall, between/3 (the one
    nondet builtin, dispatched like a compiled predicate)
  • All 25 v1 det builtins, oracle-verified — including quirks like compound([1]) being true and atom_concat being
    deterministic-only
  • Boxed i64 (TAG_BIG) — the i61 immediate limit is gone
  • v1's stdlib compiled into every binary — member, nondeterministic append, length, etc.

The triage story (your ISO-over-bug rule in action, but inverted): the corpus port surfaced 6 divergences, and
checking each against the live oracle showed all six were plgc bugs, not v1 bugs — so all six got fixed rather
than whitelisted:

  1. Query-walker cut had no barrier mechanics (+ (foo(X), !, ...) mis-pruned) → added qbarrier, snapshotted in
    every walker continuation frame, mirroring the compiled side's cut slots
  2. X = f(X) segfaulted the renderer → cycle-safe rendering with v1's exact cut-to-var behavior (f(_0))
  3. between(MAX, MAX, X) returned -1 → missing i64 boxing
  4. & 5. Prefix +/, standalone operator atoms (-), and the : operator missing from the runtime query parser →
    added
  5. One ported expectation was actually the porting agent's guess, contradicted by the live oracle — corrected to
    oracle truth

The oracle is now optional: semantics are pinned by the ported corpus itself, exactly as planned.

M4 summary The corpus verdict: v1's integration suite, ported to run against compiled binaries — 89 grouped tests covering ~200 of v1's 248 assertions — passes with zero ignores. Plus a permanent 57-goal differential corpus that runs both implementations side by side (just diff-test, auto-skips in CI). What landed: - Structured errors — relocatable ISO error balls that survive heap rewinding, byte-identical rendering to v1 - catch/throw — catch frames as flagged choice points; the shared driver unwinds balls to the matching catcher; cut stops at catch frames; step limit stays uncatchable - findall/3 (bounded sub-search, nests, propagates errors), call/N + variable-goal metacall, between/3 (the one nondet builtin, dispatched like a compiled predicate) - All 25 v1 det builtins, oracle-verified — including quirks like compound([1]) being true and atom_concat being deterministic-only - Boxed i64 (TAG_BIG) — the i61 immediate limit is gone - v1's stdlib compiled into every binary — member, nondeterministic append, length, etc. The triage story (your ISO-over-bug rule in action, but inverted): the corpus port surfaced 6 divergences, and checking each against the live oracle showed all six were plgc bugs, not v1 bugs — so all six got fixed rather than whitelisted: 1. Query-walker cut had no barrier mechanics (\+ (foo(X), !, ...) mis-pruned) → added qbarrier, snapshotted in every walker continuation frame, mirroring the compiled side's cut slots 2. X = f(X) segfaulted the renderer → cycle-safe rendering with v1's exact cut-to-var behavior (f(_0)) 3. between(MAX, MAX, X) returned -1 → missing i64 boxing 4. & 5. Prefix +/\, standalone operator atoms (-), and the : operator missing from the runtime query parser → added 5. One ported expectation was actually the porting agent's guess, contradicted by the live oracle — corrected to oracle truth The oracle is now optional: semantics are pinned by the ported corpus itself, exactly as planned.
● M4 is complete — full builtin parity with v1, just ci green. The headline numbers:
All checks were successful
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 44s
641bbf1204
M4 summary

  The corpus verdict: v1's integration suite, ported to run against compiled binaries — 89 grouped tests covering
  ~200 of v1's 248 assertions — passes with zero ignores. Plus a permanent 57-goal differential corpus that runs
  both implementations side by side (just diff-test, auto-skips in CI).

  What landed:
  - Structured errors — relocatable ISO error balls that survive heap rewinding, byte-identical rendering to v1
  - catch/throw — catch frames as flagged choice points; the shared driver unwinds balls to the matching catcher;
  cut stops at catch frames; step limit stays uncatchable
  - findall/3 (bounded sub-search, nests, propagates errors), call/N + variable-goal metacall, between/3 (the one
  nondet builtin, dispatched like a compiled predicate)
  - All 25 v1 det builtins, oracle-verified — including quirks like compound([1]) being true and atom_concat being
  deterministic-only
  - Boxed i64 (TAG_BIG) — the i61 immediate limit is gone
  - v1's stdlib compiled into every binary — member, nondeterministic append, length, etc.

  The triage story (your ISO-over-bug rule in action, but inverted): the corpus port surfaced 6 divergences, and
  checking each against the live oracle showed all six were plgc bugs, not v1 bugs — so all six got fixed rather
  than whitelisted:
  1. Query-walker cut had no barrier mechanics (\+ (foo(X), !, ...) mis-pruned) → added qbarrier, snapshotted in
  every walker continuation frame, mirroring the compiled side's cut slots
  2. X = f(X) segfaulted the renderer → cycle-safe rendering with v1's exact cut-to-var behavior (f(_0))
  3. between(MAX, MAX, X) returned -1 → missing i64 boxing
  4. & 5. Prefix +/\, standalone operator atoms (-), and the : operator missing from the runtime query parser →
  added
  5. One ported expectation was actually the porting agent's guess, contradicted by the live oracle — corrected to
  oracle truth

  The oracle is now optional: semantics are pinned by the ported corpus itself, exactly as planned.
navicore referenced this pull request from a commit 2026-06-20 22:03:21 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
navicore/patch-prolog!2
No description provided.