Repository navigation
feat(process): report bounded live capture progress - #1483
Conversation
Long captures emitted only a final result, so a quiet child looked idle. Pass the shared rate-limited progress reporter through the capture lifecycle and report the observed phase, elapsed time, and collected-unit counts. CLI writes those lines to stderr; MCP forwards them only when the client supplied a progress token. Final Evidence on stdout keeps its shape.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
I reviewed the lifecycle wiring at I reproduced this narrowly with this exact production tracker and the existing Please coalesce pending intermediate status before scheduling delivery, keeping at most one in-flight report and the latest pending status, with the terminal status ordered after the in-flight report. A slow-sink regression should show that pending work stays bounded and stale updates do not delay the terminal status. The existing CLI/MCP normal, no-token, timeout and cancellation workflows should continue to preserve Evidence and cleanup. |
|
Review reproduced #1252 on current main The existing implementation also revealed a progress backpressure problem. With a real 900 ms PTY child and a deliberately lagging production-boundary observer (200 ms per update), the original integrated implementation queued 53 updates and capture return took 11.9 s. I am preparing a narrow follow-up on this PR that coalesces pending intermediate observations and discards stale live updates before final cleanup, preserving monotonic counts and terminal delivery. The same small-child observer probe then returns in 2.2 s with eight updates; this is an observer-delay control, not a general throughput claim. Two blocked-observer controls fail on the original implementation and pass on the follow-up. The refreshed public CLI/stdio MCP small-target workflow now passes, including live notifications before completion, no notifications without a token, complete Evidence, text/structured parity, owned cleanup, unchanged source digest and subsequent ping. Finishing the relevant lifecycle/cancellation checks and serial static gates before publishing the integrated follow-up here; contributor history will be preserved. No reviewers requested. |
Retain one pending intermediate observation and drop stale live status before terminal cleanup. Preserve monotonic counts and final delivery while an observer is slow or rejects an update. Verify the send rate at its controlled-clock owner and lifecycle notification density at the CLI/MCP boundary, where receive timestamps include buffering and scheduling.
|
The integrated follow-up is now on this existing PR at 135 relevant tests pass after correcting the recorded 99 ms client-arrival assertion; the initial failure and the two original blocked-observer failures are retained as diagnosis. Full serial compile/typecheck, lint/module boundaries, unchanged duplication gate, generated docs, architecture guards, test discovery and formatting pass. The committed head was freshly compiled and the actual public CLI plus production SDK stdio MCP 84-byte sparse-target workflow passes again, including live notifications, no-token silence, raw output, complete Evidence/text-structured parity, owned cleanup, unchanged input digest and ping. Independent runtime scope is Linux PTY; no local macOS/Windows capture or binary engine claim. The PR description now describes the final behavior, compatibility and measured observer-delay control. Waiting for fresh CI and final review on this exact head before merge; earlier |
|
Current-head CI has one failed test: shard 3/4 checks out synthetic merge Existing contributor follow-up #1529 addresses the same main-CI failure by checking growth and retaining the semantic result. I am reviewing that guard and its pre-fix rejection control before integration here. #1526 also supplies additional actual CLI/MCP regression coverage; that coverage should be kept while avoiding a competing removal of the growth guard. Current-head CI/review still needs to be green before this PR merges. |
|
The refreshed integration is now Main #1526 has already repaired the #1517 hard wall-time test and retained additional actual CLI/MCP returned-reference regressions. The author withdrew #1529 as superseded; it remains closed. Its independently verified covered growth/negative-control results are retained as diagnosis, not a merged-main performance guarantee. No failed old check is being reused or rerun to hide its failure. On this refreshed source, fresh compile, the actual 84-byte sparse-child public CLI/production SDK stdio MCP workflow, 13 directly affected tests including the additional public returned-reference workflow, and full serial typecheck/lint/module-boundary/unchanged duplication/generated-document gates pass. Live status, no-token silence, complete Evidence/text-structured parity, raw child output, owned cleanup, unchanged input digest and subsequent ping remain verified. Waiting for this exact head’s complete CI and final review before merge; no reviewers requested. |
|
The revised tracker resolves the unbounded progress backlog: it keeps one in-flight notification and only the latest pending update. Its three controlled slow/rejecting observer tests pass locally, alongside seven reporter and real Linux CLI/MCP boundary cases (10 tests total across three files). The CLI checks use real child processes; MCP uses the pinned SDK over InMemoryTransport. macOS capture and Windows PTY were not independently exercised here. I also reproduced a cancellation-test timing failure on the constrained host: a fresh SDK client prepared all output validators while the test was waiting for capture progress, and the default polling timeout expired before capture began. Commit The contributor history is preserved, and current main |
|
Merged as All ten merged changed-file blobs match the reviewed head. The actual 84-byte sparse-child public CLI and production SDK stdio MCP workflow passed again on merged main: live progress, no-token silence, complete Evidence/text-structured parity, unchanged input digest, raw output, owned process/temporary-root cleanup and subsequent ping. Runtime scope remains Linux PTY. The completed owned worktree and its generated outputs were removed normally after verification. Branches, reproduction inputs/results and failed diagnosis receipts remain available; shared dependencies and other workspaces were preserved. |
Quiet process captures previously looked idle until their final result. This adds lifecycle status to CLI stderr and MCP progress notifications when a token is supplied. Fixes #1252.
Progress reports observed phases, elapsed time and collected-unit counts; unknown totals remain unknown. The existing 100 ms intermediate send policy and final cleanup notification are retained. A slow observer keeps one pending intermediate status instead of queuing every old observation; cleanup discards stale live status while preserving monotonic counts and terminal delivery. Child output remains in complete Evidence. Clients without a progress token remain silent.
Validation
97639b5, fresh compile and the actual 84-byte public CLI/production SDK stdio MCP workflow pass again, as do all 13 directly affected tests, including live timeout/cancellation cleanup and the current public returned-reference regression. The earlier 135-test/static/document results remain attributed to their recorded review heads; fresh current-head CI supplies the complete gate.3059d8a4with the contributor history preserved; current maintenance head97639b5f502646ad3fa31870df224d74e9969642. Maintenance commit identities use verified GitHub no-reply email. The latest cancellation-test follow-up prepares the SDK output-schema cache before timing capture control and always settles the owned pending call and deadline timer.Compatibility and scope
CLI progress is on stderr; stdout and tool-result Evidence contracts are unchanged. MCP progress now counts collected units and omits unknown
total; consumers must not assume the earlier 0/1 pair or invent a percentage. Launch, signals, process ownership and cleanup authority remain unchanged. Independent runtime proof is Linux x64 PTY; macOS was not run locally, and Windows PTY capture remains unavailable. No binary-analysis engine verification or large Notion/Obsidian matrix is claimed. The first maintenance CI failed only at the newly merged main #1517 fixed 2,000 ms assertion. Main #1526 has since repaired that test and added actual CLI/MCP regressions; the refreshed branch includes it, preserves its public workflow, and passes the 13 directly affected tests plus fresh small-process CLI/MCP and full serial static/document gates. Fresh current-head CI must pass before merge.