[PR #5209] [CLOSED] fix(frida): describe close cleanup order accurately #6815

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5209
Author: @Ha1baraA11
Created: 10/19/2026
Status: ❌ Closed

Base: main ← Head: pr/rea-5101


📝 Commits (1)

  • c76bc83 fix(frida): describe close cleanup order accurately

📊 Changes

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

View changed files

📝 src/contracts/fridaToolContracts.test.ts (+13 -0)
📝 src/contracts/fridaToolContracts.ts (+1 -1)

📄 Description

Summary

MCP clients can see that a paused spawn resumes only after Frida instrumentation cleanup is confirmed.
Related to #5101

Problem and expected behavior

The existing description tells MCP callers to expect a resume-before-detach sequence that the close path does not implement, so it should describe the established cleanup order.

Change and scope

  • Update the close_frida_session description to put script cleanup or session detach before resuming a paused spawn, and explain that the target remains paused if instrumentation cannot be released.
  • Add a contract regression test for the corrected sequence and the removed resume-before-detach claim.

Contract and boundary impact

  • Semantic owner and earliest changed stage: The canonical close_frida_session contract in src/contracts/fridaToolContracts.ts; only the MCP-visible description changes.
  • Contribution scope fit and linked maintainer decision: A wording correction within the existing Frida capability; an additional maintainer scope decision is not applicable.
  • CLI and MCP/tool-catalog contract: The MCP description changes. Tool name, input schema, output schema, and CLI behavior are unchanged.
  • Provider, bridge, target-format, or platform compatibility: No provider, bridge, target-format, or platform implementation changes.
  • Evidence, artifact, provenance, or reconstruction contract: No evidence or artifact formats, provenance fields, or reconstruction behavior change.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): No target selection, authority, or cleanup implementation changes; the description now states the existing cleanup boundary.
  • 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.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): No generated metadata, package, or installation files changed.

Evidence and regression coverage

  • Tests added or updated: src/contracts/fridaToolContracts.test.ts; Frida close ordering contract > requires instrumentation release before resuming a paused spawn selects the close_frida_session descriptor and checks the corrected wording and removal of the reversed claim.
  • Base reproduction or other evidence: On the exact base revision, the named regression test fails its expected-description assertion and receives the old resume-before-detach sentence; the same test passes on the patch. Source inspection also confirms detach precedes resume in src/frida/FridaInstrumentationManager.ts and the guide describes the same order.
  • User-visible CLI/MCP output (if applicable): No CLI output changes. MCP clients receive the corrected close_frida_session description.
  • Remaining proof gaps: No native Frida provider or target process was run; runtime lifecycle behavior is unchanged and the evidence covers contract text and its source relationship to the existing implementation.
  • 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 ci — passed.
  • npm run test:focused -- src/ghidra/GhidraInstallation.test.ts — 92 passed.
  • npm run check:fast — passed.
  • node scripts/run-exact-tests.mjs --reporter=verbose --testNamePattern "^Frida close ordering contract > requires instrumentation release before resuming a paused spawn$" src/contracts/fridaToolContracts.test.ts — 1 passed, 5 skipped.

Compatibility, safety, and release

  • No runtime lifecycle behavior or tool schema changes; native Frida target coverage was not run.

Author readiness

  • 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 owner:

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/5209 **Author:** [@Ha1baraA11](https://github.com/Ha1baraA11) **Created:** 10/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/rea-5101` --- ### 📝 Commits (1) - [`c76bc83`](https://github.com/morluto/rea/commit/c76bc83271f2d60a65d4315b02c355bd855421b7) fix(frida): describe close cleanup order accurately ### 📊 Changes **2 files changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/contracts/fridaToolContracts.test.ts` (+13 -0) 📝 `src/contracts/fridaToolContracts.ts` (+1 -1) </details> ### 📄 Description ## Summary MCP clients can see that a paused spawn resumes only after Frida instrumentation cleanup is confirmed. Related to #5101 ## Problem and expected behavior The existing description tells MCP callers to expect a resume-before-detach sequence that the close path does not implement, so it should describe the established cleanup order. ## Change and scope - Update the `close_frida_session` description to put script cleanup or session detach before resuming a paused spawn, and explain that the target remains paused if instrumentation cannot be released. - Add a contract regression test for the corrected sequence and the removed resume-before-detach claim. ## Contract and boundary impact - Semantic owner and earliest changed stage: The canonical `close_frida_session` contract in `src/contracts/fridaToolContracts.ts`; only the MCP-visible description changes. - Contribution scope fit and linked maintainer decision: A wording correction within the existing Frida capability; an additional maintainer scope decision is not applicable. - CLI and MCP/tool-catalog contract: The MCP description changes. Tool name, input schema, output schema, and CLI behavior are unchanged. - Provider, bridge, target-format, or platform compatibility: No provider, bridge, target-format, or platform implementation changes. - Evidence, artifact, provenance, or reconstruction contract: No evidence or artifact formats, provenance fields, or reconstruction behavior change. - Target selection, authority, upstream behavior, and cleanup details (if applicable): No target selection, authority, or cleanup implementation changes; the description now states the existing cleanup boundary. - [ ] 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. - [x] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): No generated metadata, package, or installation files changed. ## Evidence and regression coverage - Tests added or updated: `src/contracts/fridaToolContracts.test.ts`; `Frida close ordering contract > requires instrumentation release before resuming a paused spawn` selects the `close_frida_session` descriptor and checks the corrected wording and removal of the reversed claim. - Base reproduction or other evidence: On the exact base revision, the named regression test fails its expected-description assertion and receives the old resume-before-detach sentence; the same test passes on the patch. Source inspection also confirms detach precedes resume in `src/frida/FridaInstrumentationManager.ts` and the guide describes the same order. - User-visible CLI/MCP output (if applicable): No CLI output changes. MCP clients receive the corrected `close_frida_session` description. - Remaining proof gaps: No native Frida provider or target process was run; runtime lifecycle behavior is unchanged and the evidence covers contract text and its source relationship to the existing implementation. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm ci` — passed. - `npm run test:focused -- src/ghidra/GhidraInstallation.test.ts` — 92 passed. - `npm run check:fast` — passed. - `node scripts/run-exact-tests.mjs --reporter=verbose --testNamePattern "^Frida close ordering contract > requires instrumentation release before resuming a paused spawn$" src/contracts/fridaToolContracts.test.ts` — 1 passed, 5 skipped. ## Compatibility, safety, and release - No runtime lifecycle behavior or tool schema changes; native Frida target coverage was not run. ## Author readiness - [ ] 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 owner: ## 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-01 21:43:14 +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#6815
No description provided.