feat(web-api-discovery): name each post-processing stage and heartbeat the AI pass (#492) - #506
Conversation
…ng (#492) Stages must be announced BEFORE they run and in pipeline order; the AI catalogue child must run under a heartbeat wrapper that names its elapsed time and pid, stops when the child does, passes the exit status through, and reports a child that cannot start instead of waiting on it. Refs #492 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUt6s3N3iqMMEtvd9AoAnU
…t the AI pass (#492) After a recording stops, post-processing ran for minutes printing nothing, ~95% of it the spawned `claude -p` catalogue pass -- indistinguishable from a hang. Each stage (scrub, with its size; verify; digest; catalogue) is now named as it starts, and the catalogue child runs under run-with-heartbeat.js, which prints an elapsed-time line every 30 s naming the child's pid and a closing line when it ends. postProcess stays synchronous: the wrapper is the process that can keep a timer while spawnSync blocks. Closes #492 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUt6s3N3iqMMEtvd9AoAnU
Evidence -- #492: post-processing says what it is doingChange type: CLI behaviour (bug fix: silence indistinguishable from a hang). 1. Stage labels -- same fixture, before and afterSynthetic 400-entry capture (166.5 KB), run through the real Before (origin/main): Nothing at all is printed while the stages run. After (this branch): Each stage is named as it starts. The catalogue label is not shown here 2. The heartbeat, at its real 30-second intervalThe wrapper the AI catalogue child now runs under, driving a stand-in child The child's own output still reaches the terminal directly, the heartbeat Review
|
- The claude-cli branch now takes an injectable launcher and runner context, so a test proves post-processing really launches the AI child through the heartbeat wrapper -- previously only the argv helper was tested, and reverting the launch line left the suite green. - A child killed by a signal reports 128 + the signal number instead of a plain 1, so "catalogue: claude exited N" still distinguishes a killed pass from the CLI failing. - A late error event after a real exit no longer prints "could not start". Reviewer: Claude Sonnet 5 (different model from the author). Refs #492 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUt6s3N3iqMMEtvd9AoAnU
What
After a recording stops, HAR post-processing ran for minutes and printed nothing -- ~95% of that time in the spawned
claude -pcatalogue pass. The operator could not tell a working run from a hang.Heartbeat rather than streaming, as the issue recommends; streaming stays a separate question. Post-processing stays synchronous -- the wrapper is the process that can keep a timer while the recorder blocks on the child.
Evidence
Same fixture, before -> after: nothing printed -> three stage lines. Heartbeat at its real interval against a 65 s silent child:
Tests
Independent review
Reviewer model: Claude Sonnet 5 (author: Opus 5), two rounds.
Closes #492
Refs #491
🤖 Generated with Claude Code
https://claude.ai/code/session_01CUt6s3N3iqMMEtvd9AoAnU