[PR #7447] [CLOSED] test(process): bind retained-root assertions to the captured path #7843

Closed
opened 2026-11-05 01:48:04 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7447
Author: @akshad-exe
Created: 10/27/2026
Status: ❌ Closed

Base: main ← Head: fix/process-retained-root-assertions


📝 Commits (1)

  • e83b2cc test(process): bind retained-root assertions to the captured path

📊 Changes

2 files changed (+14 additions, -6 deletions)

View changed files

📝 tests/boundary/process/processCaptureLifecycle.test.ts (+12 -4)
📝 tests/boundary/process/processCleanupRetryOwnership.test.ts (+2 -2)

📄 Description

Summary

17da88f11 changed process-capture cleanup to report the retained temporary
root by path so an operator can inspect it, but two boundary test files still
expect the removed temporary_root label. Both tests fail deterministically on
current main, which also blocks #7349.

Problem and expected behavior

On clean main at 0eff039d0, these tests fail:

  • tests/boundary/process/processCaptureLifecycle.test.ts > retains collected observations when completion and cleanup both fail
  • tests/boundary/process/processCleanupRetryOwnership.test.ts > keeps mixed root errors and retry aggregates bound to only unresolved roots
  • tests/boundary/process/processCleanupRetryOwnership.test.ts > blocks scope admission on owner-bound retry failure and resumes after release

The first receives resources: ["owned_process_group", "/tmp/rea-process-…"]
and expects "temporary_root". The retry cases receive the actual root path and
expect the label. The producing contract intentionally identifies the retained
root by path, and the MCP retry coverage was already aligned by 7cc33fcf7.

Change and scope

  • processCaptureLifecycle.test.ts asserts owned_process_group plus the
    reported root path, verifies the path is an existing directory, and removes it
    after the assertion.
  • processCleanupRetryOwnership.test.ts asserts [roots[1]] for the mixed case
    (only the second root stays unresolved) and [root] for the owner-bound case.

Not included: no producer change. 17da88f11 deliberately reports the retained
root path, and changing that back would lose the operator-visible location.
Scope decision: not applicable, test-only change within existing boundaries.

Contract and boundary impact

  • Semantic owner and earliest changed stage: ProcessCaptureResourceOwner.cleanupResources already owns the mapping; this PR only aligns its consumers' assertions. No superseded production path.
  • Contribution scope fit and linked maintainer decision: test-only repair, not applicable.
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: assertions now verify the retained root is a real directory; no evidence shape changes.
  • Target selection, authority, upstream behavior, and cleanup details: tests exercise the existing owned-process fixture; no cleanup behavior changes.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

The tests spawn the repository's process-capture fixture; this PR changes only
their assertions and removes the retained directory after checking it.

Evidence and regression coverage

  • Tests added or updated: the three assertions above.
  • Base reproduction or other evidence: on 0eff039d0, npm run test:focused -- tests/boundary/process/processCaptureLifecycle.test.ts tests/boundary/process/processCleanupRetryOwnership.test.ts reports 3 failed | 27 passed.
  • User-visible CLI/MCP output (if applicable): none; the MCP retry coverage was fixed separately in 7cc33fcf7.
  • Remaining proof gaps: full CI has not completed for this head; no real provider or platform behavior is involved.

For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.

This is assertion alignment for the cleanup lifecycle: the retained-root and
retry-resource outcomes keep their existing lifecycle coverage. No lifecycle
behavior changed.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- tests/boundary/process/processCaptureLifecycle.test.ts tests/boundary/process/processCleanupRetryOwnership.test.ts — 30 passed (Node 24.22.1).
  • npm run format:check — all matched files use the correct format (6,221 files).
  • npm run check:fast — typecheck and lint pass.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none required; tests use the local process fixture.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: reporting an absolute temporary path is the established local-only cleanup contract; the test removes the directory after verifying it.

Author readiness

Human owner: @akshad-exe

  • 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.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/7447 **Author:** [@akshad-exe](https://github.com/akshad-exe) **Created:** 10/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/process-retained-root-assertions` --- ### 📝 Commits (1) - [`e83b2cc`](https://github.com/morluto/rea/commit/e83b2ccd903ff2ab30502b20d67c9edc54bea5d4) test(process): bind retained-root assertions to the captured path ### 📊 Changes **2 files changed** (+14 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/process/processCaptureLifecycle.test.ts` (+12 -4) 📝 `tests/boundary/process/processCleanupRetryOwnership.test.ts` (+2 -2) </details> ### 📄 Description ## Summary `17da88f11` changed process-capture cleanup to report the retained temporary root by path so an operator can inspect it, but two boundary test files still expect the removed `temporary_root` label. Both tests fail deterministically on current `main`, which also blocks #7349. ## Problem and expected behavior On clean `main` at `0eff039d0`, these tests fail: - `tests/boundary/process/processCaptureLifecycle.test.ts > retains collected observations when completion and cleanup both fail` - `tests/boundary/process/processCleanupRetryOwnership.test.ts > keeps mixed root errors and retry aggregates bound to only unresolved roots` - `tests/boundary/process/processCleanupRetryOwnership.test.ts > blocks scope admission on owner-bound retry failure and resumes after release` The first receives `resources: ["owned_process_group", "/tmp/rea-process-…"]` and expects `"temporary_root"`. The retry cases receive the actual root path and expect the label. The producing contract intentionally identifies the retained root by path, and the MCP retry coverage was already aligned by `7cc33fcf7`. ## Change and scope - `processCaptureLifecycle.test.ts` asserts `owned_process_group` plus the reported root path, verifies the path is an existing directory, and removes it after the assertion. - `processCleanupRetryOwnership.test.ts` asserts `[roots[1]]` for the mixed case (only the second root stays unresolved) and `[root]` for the owner-bound case. Not included: no producer change. `17da88f11` deliberately reports the retained root path, and changing that back would lose the operator-visible location. Scope decision: not applicable, test-only change within existing boundaries. ## Contract and boundary impact - Semantic owner and earliest changed stage: `ProcessCaptureResourceOwner.cleanupResources` already owns the mapping; this PR only aligns its consumers' assertions. No superseded production path. - Contribution scope fit and linked maintainer decision: test-only repair, not applicable. - CLI and MCP/tool-catalog contract: none. - Provider, bridge, target-format, or platform compatibility: none. - Evidence, artifact, provenance, or reconstruction contract: assertions now verify the retained root is a real directory; no evidence shape changes. - Target selection, authority, upstream behavior, and cleanup details: tests exercise the existing owned-process fixture; no cleanup behavior changes. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: none. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. The tests spawn the repository's process-capture fixture; this PR changes only their assertions and removes the retained directory after checking it. ## Evidence and regression coverage - Tests added or updated: the three assertions above. - Base reproduction or other evidence: on `0eff039d0`, `npm run test:focused -- tests/boundary/process/processCaptureLifecycle.test.ts tests/boundary/process/processCleanupRetryOwnership.test.ts` reports `3 failed | 27 passed`. - User-visible CLI/MCP output (if applicable): none; the MCP retry coverage was fixed separately in `7cc33fcf7`. - Remaining proof gaps: full CI has not completed for this head; no real provider or platform behavior is involved. For boundary fixes, identify the applicable [boundary regressions](https://github.com/morluto/rea/blob/main/docs/testing.md#boundary-regressions) and [lifecycle regressions](https://github.com/morluto/rea/blob/main/docs/testing.md#lifecycle-regressions) covered by the evidence above, and explain relevant gaps. This is assertion alignment for the cleanup lifecycle: the retained-root and retry-resource outcomes keep their existing lifecycle coverage. No lifecycle behavior changed. For evidence-bearing changes: - [ ] Observed, derived, and inferred claims remain distinguishable. - [ ] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run test:focused -- tests/boundary/process/processCaptureLifecycle.test.ts tests/boundary/process/processCleanupRetryOwnership.test.ts` — `30 passed` (Node 24.22.1). - `npm run format:check` — all matched files use the correct format (6,221 files). - `npm run check:fast` — typecheck and lint pass. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: none required; tests use the local process fixture. - Package or release metadata impact: none. - Security, privacy, process, or containment review: reporting an absolute temporary path is the established local-only cleanup contract; the test removes the directory after verifying it. ## Author readiness Human owner: @akshad-exe - [ ] 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. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-05 01:48:04 +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#7843
No description provided.