Skip to content

fix(mcp): declare Frida status session mutation - #3902

Merged
morluto merged 2 commits into
morluto:mainfrom
z2Ace0107:fix/3326-frida-status-effects
Oct 16, 2026
Merged

morluto merged 2 commits into
morluto:mainfrom
z2Ace0107:fix/3326-frida-status-effects

Conversation

@z2Ace0107

Copy link
Copy Markdown
Contributor

Summary

Fixes #3326. Match Frida status effect metadata to its existing Evidence recording.

 frida_session_status
- readOnlyHint: true,  mutatesSession: false
+ readOnlyHint: false, mutatesSession: true
  destructiveHint: false

Problem and expected behavior

Successful status queries retain Evidence, but the catalog advertised them as
read-only. REA's read-only definition includes session state. Ordinary additive
Evidence recording should remain non-destructive.

Change and scope

Reuse the existing evidence effect declaration in toolEffects.ts. Extend the
existing MCP lifecycle regression; no handler, Frida engine, target behavior,
runtime permission, or lifecycle change. Advance maintainer scope decision is not
applicable to this ordinary metadata correction.

Contract and boundary impact

  • Semantic owner: canonical tool effects, before annotation/inventory projection.
  • CLI/MCP: correct tools/list and binary_session metadata; input/output shapes
    and the one-shot CLI are unchanged.
  • Provider/platform: unchanged; no new native Frida compatibility claim.
  • Evidence: status output and retained Evidence remain unchanged.
  • Target selection, execution/mutation authority and cleanup: unchanged.
  • Generated metadata: catalog projections regenerated/checked locally; ignored
    generated outputs are not included. No version, package or installation edit.

Expected effect of the corrected status operation: additive in-memory session
Evidence recording. It does not introduce target execution, instrumentation,
target/file/configuration mutation, network access, or protection recovery.

Evidence and regression coverage

  • Before: on baseline 788964d52, the new MCP regression failed at
    readOnlyHint: true versus expected false (1 failed / 25 passed).
  • After: the status response is schema-valid and retained unchanged;
    tools/list advertises non-read-only/non-destructive behavior and binary_session
    declares mutatesSession. An unknown session adds no Evidence.
  • Production manager/server/ledger, with a simulated external Frida device on
    Windows. This proves the metadata/retention boundary, not real-engine behavior.

Validation performed

Windows x64; pinned Node 24.18.0 / npm 11.16.0:

  • npm ci — passed; 0 vulnerabilities reported.
  • npm run test:focused -- src/contracts/toolEffects.test.ts src/contracts/fridaToolContracts.test.ts tests/boundary/mcp/fridaMcp.test.ts tests/boundary/mcp/fridaLifecycleMcp.test.ts
    — 40 passed, 0 skipped.
  • npm run check — passed, including build dependencies, typecheck, lint,
    format, knip, metadata, module boundaries and architecture guards. Warnings remain.
  • npm run docs:check — passed, including catalog generation/checks and 5 README
    consistency tests.
  • git diff --check — passed.
  • Compiled production stdio MCP — tools/list reports readOnlyHint false and
    destructiveHint false; binary_session advertises mutatesSession, without an
    injected provider. No real Frida target was selected or executed.

Compatibility, safety, and release

No payload/schema-shape change or migration. MCP clients may now seek confirmation
for this correctly classified operation, depending on their own policies.
No real Frida/device lane or full-suite run; native implementation is unchanged.

Merge Danger

Door: two-way. Blast radius: narrow — one tool's effect classification and the
derived catalog identity; no persistent-data migration or native behavior change.

Author readiness

Human owner: @z2Ace0107

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

@kaoru0822-kitauji
kaoru0822-kitauji marked this pull request as ready for review October 15, 2026 07:22
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-15T07:22:55.848676Z 7d7e8fe Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Corrects frida_session_status metadata to match its existing Evidence recording.

  • Frida status calls now show their retained Evidence as a session change.
  • The lifecycle test keeps its cancellation cases with a clearer call layout.

Tests were not run during this review. Checking whether another PR replaces this one was blocked because GitHub credentials were unavailable.

Reviews (1) · Last reviewed commit: "style(test): format hook-normalized canc..." · Reviewed by Greptile

@morluto
morluto merged commit 13d04a0 into morluto:main Oct 16, 2026
36 checks passed
@morluto

morluto commented Oct 20, 2026

Copy link
Copy Markdown
Owner

The frida_session_status metadata now matches its Evidence behavior, @z2Ace0107: recording session Evidence means the query is not read-only, while it remains non-destructive. Thanks for covering the annotations and session inventory in the lifecycle regression; welcome to REA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Frida session status advertises read-only while retaining Evidence

2 participants