Browse Source

G-076 achieved flip edits: kill-procedure verification record, status achieved 2026-07-20

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 2 weeks ago
parent
commit
cef6cd8f00
  1. 53
      goals/G-076-tcl9-deadconsole-fix-adoption.md

53
goals/G-076-tcl9-deadconsole-fix-adoption.md

@ -1,6 +1,6 @@
# G-076 Adopt upstream tcl9 dead-console fix: shared version gate for watchdog and help tcl warning
Status: active
Status: achieved 2026-07-20
Scope: src/modules/punk/lib-999999.0a1.0.tm (punk::lib::check), src/modules/punk/repl-999999.0a1.0.tm (repl::start watchdog arming), src/modules/punk/AGENTS.md, src/tests/modules/punk/lib/testsuites/lib/checkbugs.test
Goal: the tcl9 dead-console defect (upstream ticket f10d91c2d3, root-caused in G-039) is surfaced by 'help tcl' via a has_tclbug_* check, and that check and the repl dead-console watchdog arming share a single version gate, so that runtimes at or past the first Tcl version carrying the verified upstream fix neither warn nor arm the watchdog, while all earlier Tcl 9 windows runtimes keep both.
Acceptance: 'help tcl' on an affected runtime shows the warning with the f10d91c2d3 link and mitigation note; the applicability decision is a pure facts-in/verdict-out classifier proc with tests (libbug_udp_threadexit_applies precedent); repl::start arms the watchdog only when the same classifier reports the runtime affected, with live-console/piped/8.6 behaviour unchanged; the fixed-in constant is set only after the G-039 kill procedure, re-run with the watchdog disabled on a runtime containing the upstream fix (an official release is not required - a runtime built from upstream sources at or past the fix merge qualifies), shows the repl exiting cleanly via the script-visible eof path - until then every Tcl 9 windows runtime is treated as affected.
@ -217,10 +217,49 @@ Verification (2026-07-13, native tclsh 9.0.3 runtests + punk902z kit 9.0.2 in sr
tclZipfs.patch + tclCmdIL.patch (unexamined). All exist only in the two on-disk
copies (c:/buildtcl + git-ignored TEMP_REFERENCE snapshot) - no VCS durability.
Remaining for acceptance:
### 2026-07-20 G-039 kill procedure passed on the 9.0.5 runtime; fixed_in set; goal achieved
- Re-run the G-039 kill procedure on the 9.0.5 runtime
(c:/buildtcl/2024zig/build_tcl90/zig-out905/bin, Thread via direct load or pkgIndex
shim) with the watchdog disabled, confirm clean script-visible eof exit, then set
`punk::lib::check::tclbug_console_deadspin_fixed_in` to 9.0.5 (one edit flips both
consumers) and update the AGENTS.md note.
Verification (all runs use the G-039 procedure: payload under a dedicated hidden classic
conhost, `Stop-Process -Force` on the conhost pid; runtime under test =
zig-out905 tclsh90s.exe 9.0.5 static from the 2026-07-20 build; repl loaded from src
modules via a plain-tclsh launcher replicating kit src-mode paths):
- Control (defect present): the ticket repro (stdin fileevent + heartbeat) on native
tclsh 9.0.3 - orphan SURVIVED the conhost kill at 1.57 cores over 10s, one thread
permanently Running, readable handler never fired. Harness topology reproduces the
defect faithfully.
- Core fix (plain script, no punkshell code): same repro on 9.0.5 - the readable handler
FIRED and the read surfaced 'broken pipe' as an error (the ticket's expected "EOF or
an error" contract); no spin (0.00 cores, all threads waiting). Both upstream defects
verified fixed at script level.
- Repl adoption gap found and fixed: with the watchdog disarmed, repl_handler received
the delivered event but errored at its unguarded full 'chan configure' probe
("couldn't read console mode: broken pipe"), backgrounding the error and leaving the
repl idle with its reader inactive - the handler predated script-visible dead
consoles. punk::repl 0.5.2: probe guarded; terminal input loss routes through new
repl::console_input_lost (the watchdog's teardown, now shared by both paths).
- Acceptance run (shipping config - fixed_in=9.0.5 from source, no overrides):
app-punkshell interactive repl on the 9.0.5 runtime reported deadspin-check bug=0 and
did NOT arm the watchdog; conhost kill -> "|repl> repl_handler: input channel
unusable ... finishing repl (eof)" -> app-punkshell "no console available ...
(CONIN$: couldn't open \"CONIN$\": broken pipe)" -> process EXITED 0.2s after the
kill. Clean script-visible eof path: no traceback, no watchdog involvement (exit far
below the 5s probe interval, no watchdog message in the trail).
- Gate regression (affected side): same launcher on native tclsh 9.0.3 - bug=1 with
fixed_in=9.0.5, watchdog armed and rescued at 1.9s via the shared
console_input_lost teardown (probe and message unchanged). Pre-fix runtimes keep the
mitigation; 'help tcl' continues to warn there (same buginfo dict drives it).
- Suites (native tclsh 9.0.3 runtests): checkbugs/consolebackends/nscurrent 12/12,
then the full console+repl+lib families 115/115 (-jobs 8). `make.tcl modules` builds
clean (provenance warnings = expected dirty tree).
Landed:
- punk::lib (pending 0.5.0 entry): check::tclbug_console_deadspin_fixed_in = 9.0.5 -
the single edit that flips both consumers ('help tcl' warning and watchdog arming).
- punk::repl (pending 0.5.2 entry): repl_handler dead-channel guard +
repl::console_input_lost shared teardown.
- src/modules/punk/AGENTS.md watchdog note updated (gate set, delivered-event path).
Remaining manual items: none. The 9.0.5 verification runtime is the ad-hoc zig build
recorded in the earlier 2026-07-20 entries; reproducing it as a tracked suite is G-096
(proposed).

Loading…
Cancel
Save