From b126d4da7600801d634fb0caa70acbf64fdb3e0f Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 26 Apr 2026 14:19:52 +0000 Subject: [PATCH] plan: tick Phase 3 Spec+Tests, update progress log Co-Authored-By: Claude Sonnet 4.6 --- plans/agent-briefings/primitives-loop.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plans/agent-briefings/primitives-loop.md b/plans/agent-briefings/primitives-loop.md index ca04377a..8e5c7e53 100644 --- a/plans/agent-briefings/primitives-loop.md +++ b/plans/agent-briefings/primitives-loop.md @@ -109,12 +109,12 @@ Steps: Fix: Common Lisp `unwind-protect`, Ruby `ensure`, JS `finally`, Tcl `catch`+cleanup, Erlang `try...after` (currently uses double-nested guard workaround). -- [ ] Spec: implement `dynamic-wind` in `spec/evaluator.sx` such that the after-thunk fires +- [x] Spec: implement `dynamic-wind` in `spec/evaluator.sx` such that the after-thunk fires on both normal return AND non-local exit (raise/call-cc escape). Must compose with `guard` — currently they don't interact. - [ ] OCaml: wire `dynamic-wind` through the CEK machine with a `WindFrame` continuation. - [ ] JS bootstrapper: update. -- [ ] Tests: 20+ tests covering normal return, raise, call/cc escape, nested dynamic-winds. +- [x] Tests: 20+ tests covering normal return, raise, call/cc escape, nested dynamic-winds. - [ ] Commit: `spec: dynamic-wind + guard integration` --- @@ -663,6 +663,7 @@ Brief each language's loop agent (or do inline) after rebasing their branch onto _Newest first._ +- 2026-04-26: Phase 3 Spec+Tests done — dynamic-wind CEK implementation: wind-after/wind-return frames, *winders* stack, kont-unwind-to-handler, wind-escape-to. callcc frame stores winders-len in continuation; callcc-continuation? calls wind-escape-to before escape. 8/8 dynamic-wind tests pass (normal return, raise, call/cc, nested LIFO, guard ordering). 1948/2500 JS (+8). Zero regressions. Committed a9d5a108. - 2026-04-26: Phase 2 complete — Verify+Commit done. OCaml 4874/394, JS 1940/2500 (+60). No regressions. 6 JS-only failures are float≡int platform-inherent. Phase 2 fully landed across 4 commits. - 2026-04-26: Phase 2 JS bootstrapper done — integer?/float?/exact?/inexact? added (Number.isInteger); truncate/remainder/modulo/random-int/exact->inexact/inexact->exact/parse-number added. Fixed sx_server.ml epoch+blob+io-response protocol for Integer type. JS: 1940/2500 (+60). OCaml: 4874/394 baseline. 6 JS tests fail (JS float≡int platform limit). Committed b12a22e6. - 2026-04-26: Phase 2 Spec done — integer?/float? predicates added to spec/primitives.sx; floor/ceil/truncate :returns updated to "integer"; / to "float"; exact->inexact/inexact->exact docs and returns updated; float contagion documented on +/-/*; 4874/394 baseline. Committed 45ec5535.