plans: Phase 6 verified 399/399 — vwait :: deadlock fixed via tcl-var-lookup-or-nil

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 09:33:48 +00:00
parent 0528a5cfa7
commit 0e30cf1af6

View File

@@ -314,6 +314,17 @@ updates made inside Tcl proc bodies — only `:commands` was forwarded.
Now forwards the full set. Surfaced when socket-async made
fileevent-from-inside-proc the canonical pattern.
**Bug fix landed alongside:** `vwait ::var` was infinite-looping because
`vwait` used `frame-lookup` directly, which doesn't honour `::` global
routing. So after `set ::done fired` (which routes the write to the root
frame), `vwait ::done` kept reading the local frame and never saw the
change. Added `tcl-var-lookup-or-nil` helper that mirrors `tcl-var-get`'s
`::` routing but returns nil instead of erroring on missing vars; vwait
and `info exists` both use it now.
**Total: 399/399 green** (parse 67, eval 169, error 39, namespace 22,
coro 20, idiom 82).
---
## Suggested order
@@ -332,6 +343,7 @@ becomes a lasting SX contribution used by every future hosted language.
_Newest first._
- 2026-05-08: Phase 6 verified — 399/399 (parse 67, eval 169, error 39, namespace 22, coro 20, idiom 82). Fixed vwait `::var` infinite loop via tcl-var-lookup-or-nil helper; info exists also uses it now.
- 2026-05-07: Phase 6e exec — exec-process SX primitive (Unix.create_process+waitpid, captures stdout, errors on non-zero exit with stderr) + Tcl `exec cmd arg...`; +3 idiom tests
- 2026-05-07: Phase 6d scan/format — printf-spec + scan-spec SX primitives wrapping OCaml Printf/Scanf via Scanf.format_from_string; Tcl format rewritten to dispatch via printf-spec; scan is real walker; supports d/i/u/x/X/o/c/s/f/e/E/g/G/% with width/precision/flags; +7 idiom tests
- 2026-05-07: Phase 6c dict additions — dict lappend / remove / filter -key (rest of dict was already implemented); +3 idiom tests