Skip to content

fix(test): load real Frida verifier address dependency - #8596

Merged
morluto merged 2 commits into
mainfrom
codex/fix-verifier-fixture-module
Nov 4, 2026
Merged

morluto merged 2 commits into
mainfrom
codex/fix-verifier-fixture-module

Conversation

@morluto

@morluto morluto commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #8595. The Frida verifier cleanup fixture installed an address-validator stub at the obsolete dist/contracts path, while the verifier imports dist/domain. The test failed at module loading before reaching the cleanup assertions.

Copy the actual built domain module into the fixture and remove the unused stub. Provider-facing manager and service boundaries remain controlled; the real validator is no longer mocked.

Contract and boundary impact

Test-only fixture correction. No CLI/MCP, provider, target, Evidence, package, or installation behavior changes. The test launches a controlled Node subprocess and writes temporary test files; it does not run real Frida or establish real-provider behavior. No new contribution-scope decision is applicable.

Evidence and regression coverage

On base d3ab0faf5, npm run test:focused -- tests/boundary/process/providerVerifierCleanup.test.ts failed four Frida cases with ERR_MODULE_NOT_FOUND and passed four JEB cases. With this change all eight pass, including undefined/null primary failures and cleanup denial. The same missing module caused Linux CI failures on #8591. The fixture copies the built module consumed by the actual verifier and continues testing the same cleanup outcomes.

Validation performed

  • npm run test:focused -- tests/boundary/process/providerVerifierCleanup.test.ts — 8 passed on macOS arm64, Node 24.22.1.
  • npm run check:fast, formatter check for the changed file, and git diff --check — passed.
  • Linux rerun and real Frida were not exercised locally.
  • CI static checks failed formatting on the same 16 baseline files as feat(mcp): page retained incoming reference addresses #8591, all outside this diff; contributor fix(test): restore the two checks #8573 left red on main #8592 addresses them. A test shard also failed javascriptRuntimeObservationMcp.test.ts at the direct inspector assertion (direct.ok was false); the same assertion failed independently on the other PR. The log does not show the underlying direct error, and baseline causality remains unverified.

Compatibility, safety, and release

No production change. The baseline's unrelated repository-wide formatting failures are tracked separately in #8592.

Author readiness

Human owner:

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

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only change appears safe to merge.

Summary

Replaces the Frida fixture’s validator stub with the actual built domain module.

  • The Frida verifier test uses the built address validator.

Reviews (2) · Last reviewed commit: "merge: integrate main into the Frida ver..." · Reviewed by Greptile

@XiaoBinGan

Copy link
Copy Markdown
Contributor

Cross-PR note: #8596 and my #8592 are currently mutually blocking, because each PR's merge ref inherits the other regression from 7bcefead6.

So whichever lands first needs one failing check accepted; the second then goes green against a fixed main. Either order works for me — no preference, and no rebase needed since the file sets are disjoint.

If you'd rather have a single green PR instead, I have the fixture-path fix tested locally (8/8 passing on Node 24.22.1) and can fold that one line into #8592 in a minute — just say which you prefer. I left #8592 as formatting-only for now so it stays out of your way.

@XiaoBinGan

Copy link
Copy Markdown
Contributor

I dug into the javascriptRuntimeObservationMcp.test.ts failure you flagged at the end of the description ("the log does not show the underlying direct error, and baseline causality remains unverified"). I have both now, fully reproducible on pristine d3ab0faf5.

The underlying direct error

direct.ok === false with

BrowserObservationError {
  operation: "observe_javascript_runtime",
  reason: "endpoint_unreachable",
  cause: Error: read ECONNRESET
}

So it is not an observation-semantics failure — the second (direct) CDP WebSocket connection is reset before it opens. The inspector.commands assertion above it still passes.

Baseline causality (verified)

checkout runs result
pristine d3ab0faf5 (main) 4 4 failed
ce9095d72 (parent of 7bcefead6) 3 3 passed
parent + the same get_evidence_bundle block inserted 1 failed
main, get_evidence_bundle block removed 3 3 passed
main, block moved after the direct observation 1 passed

So the trigger is specifically the get_evidence_bundle call that 7bcefead6 added at javascriptRuntimeObservationMcp.test.ts:275-282, in that position — not a general property of the commit or of main.

Mechanism

The first get_evidence_bundle call in a process spends ~8.4s synchronously compiling the tool's output schema in the MCP client. Measured on the row:

BUNDLE-CALL 1 ms= 8490
BUNDLE-CALL 2 ms= 1
BUNDLE-CALL 3 ms= 1
setInterval(100ms) ticks during that call: 0

node --cpu-prof attributes it to @modelcontextprotocol/client ajvProvider (addNames 2.3s, compileSchema 1.0s, plus codegen) — i.e. event-loop blocking, not I/O.

That block is what breaks the later direct observation: the fake Inspector's in-process HTTP server has Node's default keepAliveTimeout (5s), so the pooled keep-alive socket is torn down while the loop is blocked, and the provider's next CDP upgrade reuses it and gets ECONNRESET.

Evidence for that link:

  • replacing the block with a synchronous 8s spin reproduces: 2/2 failed;
  • replacing it with async delays of 6s / 10s / 15s does not: 5/5 passed (the loop keeps turning, the close is handled cleanly);
  • setting http.keepAliveTimeout = 120_000 on the fake Inspector makes the whole file pass: 4/4.

Where that leaves the fix

The assertion itself looks right; the fragility is the fixture sharing one keep-alive pool with a call that blocks for ~8s. Three options, your call:

  1. move the get_evidence_bundle assertions after the direct observation (1-line reorder, passes as-is);
  2. raise http.keepAliveTimeout in tests/fixtures/inspector/fakeV8Inspector.ts;
  3. leave the order and treat the 8.4s client-side Ajv compile as the thing to fix — that one is outside the test, and it blocks the loop for any process's first get_evidence_bundle.

I have not touched tests/boundary/process/providerVerifierCleanup.test.ts or this file, so none of this overlaps #8592 or #8596. If you want, I can send option 1 or 2 as a separate one-line PR instead of describing it — say which.

@XiaoBinGan

Copy link
Copy Markdown
Contributor

CI confirmation on the combined branch (#8592, head 17e287ca):

So: #8592 + #8596 → main green. Nothing else is outstanding on my side.

jaelliot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Cross-PR integration proof, without changing either maintainer/contributor branch:

I assembled an isolated fork-only tree from upstream main d3ab0fa, taking the exact changed file blobs from #8592 at 17e287c and this PR (#8596) at a7dc107. The 18 changed file paths are disjoint. I then overlaid the unmodified PSP-specific source files of #8614 and #8615 into separate validation trees, again with no path overlap.

Both exact-source validation jobs passed: combined GitHub Actions run (VFPU job fb349595, symbol-correlation job bc40599c). Each job completed repository-wide format:check, the focused javascriptRuntimeObservationMcp.test.ts and providerVerifierCleanup.test.ts tests that fail on unmodified main, build/type/lint/docs, and real pinned Ghidra 12.1.3 + ghidra-allegrex v21.4 + PSPDEV CLI/MCP verification.

This is integration evidence, not an upstream merge, full sharded CI qualification, a replacement for either PR, or a human-readiness declaration. I made no changes to #8592, #8596, or the two PSP PR source branches. The two original baseline fixes can be integrated in whichever order the maintainers choose (or consolidated by their authors as already offered); this combined test demonstrates that they work together without the previously observed baseline errors.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

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-11-04T19:14:48.178059Z
We couldn’t complete this review. Comment @codex review to try again.
8c354ed New commits
ℹ️ 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.

Keep main's dist/domain path and the branch's copy of the real address
module, so the cleanup fixture no longer substitutes a constant stub.
@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.

@morluto
morluto merged commit f1819f5 into main Nov 4, 2026
49 checks passed
@morluto
morluto deleted the codex/fix-verifier-fixture-module branch November 4, 2026 20:02
@morluto morluto added area: tests Test suite and verification bug Something isn't working provider: frida Analysis provider / engine: frida labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification bug Something isn't working provider: frida Analysis provider / engine: frida

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Frida verifier cleanup fixture copies its dependency to the wrong path

4 participants