[PR #1483] [MERGED] feat(process): report bounded live capture progress #2921

Closed
opened 2026-10-17 21:11:52 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1483
Author: @sathariels
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @N0zoM1z0

Base: main ← Head: feat/process-capture-progress


📝 Commits (8)

  • 3006514 feat(process): report live capture progress through CLI and MCP
  • 2fc4797 chore: integrate main for process progress verification
  • 9a4fdbe fix(process): coalesce delayed capture progress
  • 48c507a chore(review): include current main progress regression fixes
  • 05c72e9 chore: integrate main after receiver regression test repair
  • 9fe9622 Merge remote-tracking branch 'origin/pr-1483' into review/process-progress-coalescing-1483
  • 7d77f18 Merge remote-tracking branch 'origin/main' into review/process-progress-coalescing-1483
  • 97639b5 test(process): prepare SDK validation before cancellation timing

📊 Changes

10 files changed (+973 additions, -18 deletions)

View changed files

📝 docs/mcp-contracts.md (+6 -0)
📝 docs/process-capture.md (+28 -0)
➕ src/application/ProgressReporter.test.ts (+33 -0)
📝 src/application/process/ProcessCli.ts (+10 -0)
📝 src/process/capture/ProcessCaptureLifecycle.ts (+7 -0)
➕ src/process/capture/ProcessCaptureProgress.test.ts (+113 -0)
➕ src/process/capture/ProcessCaptureProgress.ts (+121 -0)
📝 src/process/capture/ProcessHarness.ts (+87 -4)
📝 src/server/registerSessionTools.ts (+10 -14)
➕ tests/boundary/process/processCaptureProgress.test.ts (+558 -0)

📄 Description

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

  • On 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.
  • Integrated main 3059d8a4 with the contributor history preserved; current maintenance head 97639b5f502646ad3fa31870df224d74e9969642. 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.
  • 135 relevant tests pass across capture, normalization, lifecycle, cancellation, cleanup, CLI/MCP adapters, blocked observers and the shared reporter. The initial client-arrival-gap failure is retained; exact 100 ms send spacing is now tested with the reporter clock, while public boundaries test notification density over observed lifecycle time. The cancellation helper also clears its owned deadline timer.
  • Full serial compile/typecheck, lint/module boundaries, unchanged duplication gate, generated-document checks, architecture guards, test discovery and changed-file formatting pass with the pinned toolchain and two-CPU/process-family guard.
  • Actual compiled public CLI plus production SDK stdio MCP on a source-owned 84-byte sparse child: notifications arrive during the run, no-token requests emit none, complete Evidence/text-structured parity/raw child output/unchanged input digest/owned cleanup and subsequent ping pass. Main reproduced zero CLI progress and only two MCP 0/1 bookends.
  • Actual production-boundary PTY capture of a 900 ms child with a deliberately lagging 200 ms observer: queued updates fell from 53 to eight and return time from 11.9 s to 2.2 s in this control. Two blocked-observer regressions fail on the original implementation and pass after the follow-up. This is an observer-delay control, not a general throughput or model-token claim.

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1483 **Author:** [@sathariels](https://github.com/sathariels) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `feat/process-capture-progress` --- ### 📝 Commits (8) - [`3006514`](https://github.com/morluto/rea/commit/3006514c4cb5bcdbedbae6f1c857818fd96d6f5f) feat(process): report live capture progress through CLI and MCP - [`2fc4797`](https://github.com/morluto/rea/commit/2fc47976a056be2c2740457947dd0dc4766ea41e) chore: integrate main for process progress verification - [`9a4fdbe`](https://github.com/morluto/rea/commit/9a4fdbeb52df0eb5d16dd5dda6465fbf9a5c7049) fix(process): coalesce delayed capture progress - [`48c507a`](https://github.com/morluto/rea/commit/48c507aeb994e6543cefee92689443bfe6ec6f43) chore(review): include current main progress regression fixes - [`05c72e9`](https://github.com/morluto/rea/commit/05c72e93059b0f7d1daea74dde5a2aa464cbea37) chore: integrate main after receiver regression test repair - [`9fe9622`](https://github.com/morluto/rea/commit/9fe9622327bec62289c888a495642618acc833ef) Merge remote-tracking branch 'origin/pr-1483' into review/process-progress-coalescing-1483 - [`7d77f18`](https://github.com/morluto/rea/commit/7d77f18fc9511a54d12731c6393a582664f3285f) Merge remote-tracking branch 'origin/main' into review/process-progress-coalescing-1483 - [`97639b5`](https://github.com/morluto/rea/commit/97639b5f502646ad3fa31870df224d74e9969642) test(process): prepare SDK validation before cancellation timing ### 📊 Changes **10 files changed** (+973 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `docs/mcp-contracts.md` (+6 -0) 📝 `docs/process-capture.md` (+28 -0) ➕ `src/application/ProgressReporter.test.ts` (+33 -0) 📝 `src/application/process/ProcessCli.ts` (+10 -0) 📝 `src/process/capture/ProcessCaptureLifecycle.ts` (+7 -0) ➕ `src/process/capture/ProcessCaptureProgress.test.ts` (+113 -0) ➕ `src/process/capture/ProcessCaptureProgress.ts` (+121 -0) 📝 `src/process/capture/ProcessHarness.ts` (+87 -4) 📝 `src/server/registerSessionTools.ts` (+10 -14) ➕ `tests/boundary/process/processCaptureProgress.test.ts` (+558 -0) </details> ### 📄 Description 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 - On `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. - Integrated main `3059d8a4` with the contributor history preserved; current maintenance head `97639b5f502646ad3fa31870df224d74e9969642`. 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. - 135 relevant tests pass across capture, normalization, lifecycle, cancellation, cleanup, CLI/MCP adapters, blocked observers and the shared reporter. The initial client-arrival-gap failure is retained; exact 100 ms send spacing is now tested with the reporter clock, while public boundaries test notification density over observed lifecycle time. The cancellation helper also clears its owned deadline timer. - Full serial compile/typecheck, lint/module boundaries, unchanged duplication gate, generated-document checks, architecture guards, test discovery and changed-file formatting pass with the pinned toolchain and two-CPU/process-family guard. - Actual compiled public CLI plus production SDK stdio MCP on a source-owned 84-byte sparse child: notifications arrive during the run, no-token requests emit none, complete Evidence/text-structured parity/raw child output/unchanged input digest/owned cleanup and subsequent ping pass. Main reproduced zero CLI progress and only two MCP 0/1 bookends. - Actual production-boundary PTY capture of a 900 ms child with a deliberately lagging 200 ms observer: queued updates fell from 53 to eight and return time from 11.9 s to 2.2 s in this control. Two blocked-observer regressions fail on the original implementation and pass after the follow-up. This is an observer-delay control, not a general throughput or model-token claim. ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:11:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2921
No description provided.