From 1ad9d63f1b6a6b8cf48a2135ca04c2f210a3d48c Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 26 Apr 2026 18:56:22 +0000 Subject: [PATCH] =?UTF-8?q?plan:=20tick=20Phase=206=20JS+Tests+Commit=20?= =?UTF-8?q?=E2=80=94=20ADT=20complete,=20Phase=207=20next?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- plans/agent-briefings/primitives-loop.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plans/agent-briefings/primitives-loop.md b/plans/agent-briefings/primitives-loop.md index a3fb1a15..14f69d09 100644 --- a/plans/agent-briefings/primitives-loop.md +++ b/plans/agent-briefings/primitives-loop.md @@ -190,9 +190,14 @@ simulate sum types. A native `define-type` + `match` form eliminates this everyw Dict-based ADT (no native type needed — matches spec). Hand-written sf_define_type in bootstrap.py FIXUPS; registered via register_special_form. 172 assertions pass. 4280/1080 full suite (37 improvement over old baseline 4243/1117). -- [ ] JS bootstrapper: update. -- [ ] Tests: 40+ tests in `spec/tests/test-adt.sx`. -- [ ] Commit: `spec: algebraic data types (define-type + match)` +- [x] JS bootstrapper: update. + No changes needed — define-type/match are spec-level; sx-browser.js rebuilt at 0dc7e159. + 40/40 ADT tests pass JS. 2032/2500 total (+67 vs 1965 phase-4 baseline). +- [x] Tests: 40+ tests in `spec/tests/test-adt.sx`. + 40 tests written across two spec commits (6c872107+0dc7e159). All pass OCaml+JS. +- [x] Commit: `spec: algebraic data types (define-type + match)` + Phase 6 landed across 5 commits: 6c872107 (define-type spec), 0dc7e159 (match spec), + 5d1913e7 (ocaml bootstrap), f63b2147 (plan tick). JS already current. --- @@ -689,6 +694,7 @@ Brief each language's loop agent (or do inline) after rebasing their branch onto _Newest first._ +- 2026-04-26: Phase 6 complete — JS+Tests+Commit all ticked. JS needed no changes (spec-level forms). 40/40 ADT tests pass JS. 2032/2500 JS total (+67 vs phase-4). Phase 6 fully landed: 6c872107+0dc7e159+5d1913e7. Phase 7 (bitwise) next. - 2026-04-26: Phase 6 OCaml done — Dict-based ADT (no native SxAdt type needed); hand-written sf_define_type in bootstrap.py FIXUPS (skipped from transpile — &rest params + empty-dict {} literals); registered via register_special_form; step_limit/step_count added to PREAMBLE. 172 assertions pass (test-adt). Full suite 4280/1080 (was 4243/1117, +37). Committed 5d1913e7. - 2026-04-26: Phase 6 Spec match done — ADT case added to match-pattern in spec/evaluator.sx: checks (list? pattern)+(symbol? first)+(dict? value)+(get value :_adt), then matches :_ctor+arity and recursively binds field patterns. No-clause error now uses make-cek-value+raise-eval-frame so guard can catch it. 20 new match tests pass; 40/40 total ADT tests green. Zero regressions. - 2026-04-26: Phase 6 Spec define-type done — sf-define-type registered via register-special-form! in spec/evaluator.sx; AdtValue as {:_adt true :_type "..." :_ctor "..." :_fields (list ...)}; ctor fns + arity checking + Name?/Ctor? predicates + Ctor-field accessors; *adt-registry* dict populated per define-type call. 20/20 JS tests pass in spec/tests/test-adt.sx. OCaml define-type is next task.