[PR #6431] [MERGED] test(cli): repair analysis-view finalization cancellation seams #7355

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6431
Author: @gensokyo-dev
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @gensokyo-dev

Base: main ← Head: fix/analysis-view-cancellation-test-boundaries


📝 Commits (1)

  • a5f94a6 test(cli): repair analysis-view finalization cancellation seams

📊 Changes

1 file changed (+28 additions, -9 deletions)

View changed files

📝 tests/process-global/commandFinalizationCancellation.test.ts (+28 -9)

📄 Description

Summary

Repair three consistently failing analysis-view cancellation tests on main. The tests spied on inspectAnalysisViewValidated, but the service calls that function lexically inside its own module, bypassing the spy and never scheduling the intended interrupt.

Observe the imported domain projector and Evidence resolver instead, while executing their real implementations. Assert that projection is reached exactly once when expected, and authenticate the retained partial Evidence, its complete normalized result, subject and parent link. Rename the missing-parent scenario to source-resolution failure, its actual stage. All 20 existing lifecycle scenarios remain.

Contract and boundary impact

Test-only correction at the injection boundary; no CLI/MCP, provider, Evidence, package or generated-metadata changes. Ordinary maintenance within existing authority; a maintainer scope decision is not applicable. The separate Ghidra marker failure already has #6400 and is outside this PR.

Evidence and validation

  • Base 9eb829aca34be36ff112826337996f6139f82eff: main CI shard fails the same three scenarios as a local exact run (17 pass, 3 fail).
  • Fixed exact run: all 20 pass with one worker. A controlled removal of queued-interrupt dispatch makes six scenarios fail, including projection and error-preserving signal exit codes. The temporary mutation was restored before validation and is absent from the diff.
  • Executed npm run test:focused -- tests/process-global/commandFinalizationCancellation.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/acceptance/analysisViewCallerPath.test.ts src/application/analysisView/AnalysisViewService.test.ts: 117 pass across five files. This includes built CLI subprocesses, real OS SIGINT/SIGTERM, HAR/Grafana-shaped capture inputs, Evidence bundles, caller-path preservation and an in-memory MCP SDK transport. Controlled injection establishes the finalization interleavings; it does not establish real-provider behavior.
  • Executed npm run check:fast, targeted oxfmt --check, targeted oxlint, and git diff --check: pass.
  • Node 24.18.0 / npm 11.16.0, Linux x64. The focused workflow used one CPU and one worker: 261.865 s elapsed including a cold runtime build, 261.177 s user+system CPU, peak sampled process-family RSS 2229.7 MiB. RSS was sampled every 100 ms; shared pages may be double-counted and short-lived/reparented children missed. Static checking ran concurrently on one other CPU. These are resource measurements, not an equivalent-work speedup comparison. Agent token costs were not measured.

No new real-engine compatibility claim is made. No lifecycle scenarios, timeouts or retries were removed or relaxed. No separate issue was opened because the current main CI run above is the direct report.

Hosted validation for a5f94a635: complete CI run passed, including all eight built shards, source tests (15,389 passed; 12 platform/prerequisite skips), report merging and CI required. The repaired lifecycle file passed all 20 tests on the runner. Greptile review passed; Codex review is still running.

Author readiness

Human owner: @gensokyo-dev

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Human readiness was explicitly declared by the owner in the maintenance session after reviewing this final diff and the validation above.


🔄 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/6431 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `fix/analysis-view-cancellation-test-boundaries` --- ### 📝 Commits (1) - [`a5f94a6`](https://github.com/morluto/rea/commit/a5f94a635cee74095d6582853230905012ae44e8) test(cli): repair analysis-view finalization cancellation seams ### 📊 Changes **1 file changed** (+28 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `tests/process-global/commandFinalizationCancellation.test.ts` (+28 -9) </details> ### 📄 Description ## Summary Repair three consistently failing analysis-view cancellation tests on main. The tests spied on `inspectAnalysisViewValidated`, but the service calls that function lexically inside its own module, bypassing the spy and never scheduling the intended interrupt. Observe the imported domain projector and Evidence resolver instead, while executing their real implementations. Assert that projection is reached exactly once when expected, and authenticate the retained partial Evidence, its complete normalized result, subject and parent link. Rename the missing-parent scenario to source-resolution failure, its actual stage. All 20 existing lifecycle scenarios remain. ## Contract and boundary impact Test-only correction at the injection boundary; no CLI/MCP, provider, Evidence, package or generated-metadata changes. Ordinary maintenance within existing authority; a maintainer scope decision is not applicable. The separate Ghidra marker failure already has #6400 and is outside this PR. ## Evidence and validation - Base `9eb829aca34be36ff112826337996f6139f82eff`: [main CI shard](https://github.com/morluto/rea/actions/runs/39891053512/job/120211104701) fails the same three scenarios as a local exact run (17 pass, 3 fail). - Fixed exact run: all 20 pass with one worker. A controlled removal of queued-interrupt dispatch makes six scenarios fail, including projection and error-preserving signal exit codes. The temporary mutation was restored before validation and is absent from the diff. - Executed `npm run test:focused -- tests/process-global/commandFinalizationCancellation.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/acceptance/analysisViewCallerPath.test.ts src/application/analysisView/AnalysisViewService.test.ts`: **117 pass across five files**. This includes built CLI subprocesses, real OS SIGINT/SIGTERM, HAR/Grafana-shaped capture inputs, Evidence bundles, caller-path preservation and an in-memory MCP SDK transport. Controlled injection establishes the finalization interleavings; it does not establish real-provider behavior. - Executed `npm run check:fast`, targeted `oxfmt --check`, targeted `oxlint`, and `git diff --check`: pass. - Node 24.18.0 / npm 11.16.0, Linux x64. The focused workflow used one CPU and one worker: 261.865 s elapsed including a cold runtime build, 261.177 s user+system CPU, peak sampled process-family RSS 2229.7 MiB. RSS was sampled every 100 ms; shared pages may be double-counted and short-lived/reparented children missed. Static checking ran concurrently on one other CPU. These are resource measurements, not an equivalent-work speedup comparison. Agent token costs were not measured. No new real-engine compatibility claim is made. No lifecycle scenarios, timeouts or retries were removed or relaxed. No separate issue was opened because the current main CI run above is the direct report. Hosted validation for `a5f94a635`: [complete CI run](https://github.com/morluto/rea/actions/runs/39893416656) passed, including all eight built shards, source tests (15,389 passed; 12 platform/prerequisite skips), report merging and `CI required`. The repaired lifecycle file passed all 20 tests on the runner. Greptile review passed; Codex review is still running. ## Author readiness Human owner: @gensokyo-dev - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. Human readiness was explicitly declared by the owner in the maintenance session after reviewing this final diff and the validation above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:47:17 +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#7355
No description provided.