Repository navigation
test: strengthen and prune audited test coverage - #8573
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdc7ff280f
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Medium impact] The reviewed changes appear safe to merge, with no new actionable issue found. SummaryStrengthens test expectations, preserves cancellation reasons, and tightens verifier result and cleanup checks.
Reviews (3) · Last reviewed commit: "test: keep verifier setup target relativ..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31e3d65c52
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
7bcefea ("test: strengthen and prune audited test coverage", morluto#8573) moved the Frida remote-address import in `scripts/verify-frida.mjs` from `dist/contracts/fridaRemoteAddress.js` to `dist/domain/fridaRemoteAddress.js`, which matches the real build output (`src/domain/fridaRemoteAddress.ts` with `rootDir: src`). The fixture in `tests/boundary/process/providerVerifierCleanup.test.ts` still wrote the old `dist/contracts/` path, so the copied script tried to import a module that did not exist and the four `frida verifier preserves ...` cases died on ERR_MODULE_NOT_FOUND before reaching the assertions they exist to prove. The same commit also left 16 files unformatted, so `oxfmt --check` fails on main itself and on every PR whose merge ref includes it. This restores both gates: - the fixture writes `dist/domain/fridaRemoteAddress.js`, so the script resolves and the four cleanup/ownership assertions run again; - `oxfmt .` is applied to exactly the 16 files the check reports. `git diff upstream/main` outside those 17 files is empty. Nothing under `src/` outside the test file above is touched. Verified on this branch: - `node node_modules/vitest/vitest.mjs run tests/boundary/process/providerVerifierCleanup.test.ts` - 8 passed (4 failed before the fixture fix) - `npx oxfmt --check .` - `All matched files use the correct format.` - `node scripts/run-typescript.mjs --noEmit` - exit 0 - `node --check scripts/verify-adb.mjs`, `node --check scripts/verify-http3-network-captures.mjs` - exit 0
* test: strengthen and prune audited test coverage * test: require delivered DeepSeek skill instructions * test: keep schema fixture types private * test: verify Gemini receives skill instructions * test: bind Qwen skill evidence to its tool result * test: report NativeAOT verifier checks precisely * fix: verify Ghidra cleanup paths reliably * fix: verify Command Code skill activation * test: tighten cleanup and fixture checks * test: verify packet capture evidence is recorded * fix: report HTTP3 capture provenance accurately * test: preserve resource coverage through MCP * test: prune repeated assertions and retain cancellation identity * fix: validate client verifier fixture paths * test: skip Copilot verifier cases on Windows * test: keep verifier setup target relative
Summary
Several tests and verifier checks could pass while dropping cancellation reasons, partial Evidence, cleanup ownership, or expected results. This change strengthens those checks, removes redundant cases with retained boundary coverage, and repairs the concrete verifier and lifecycle defects found during the audit.
The PR contains the independently attributable subset transplanted onto current
main; the broader suite and support-fixture audit is still in progress. The original checkout and its pre-existing changes were left intact.Problem and expected behavior
A test should fail when the behavior it names is absent, and cleanup must retain ownership until the resources it depends on are released. For example, FIT enumeration could complete after its reader closed, and the ADB verifier could install a caller-selected APK while acting on a different hardcoded package.
Change and scope
--install-apklifecycle until exact APK identity and device cleanup ownership can be established. Follow-up: [Bug] ADB verifier cannot prove ownership of the APK lifecycle target #8552.Contract and boundary impact
verify:adb --install-apknow refuses before lifecycle work.Evidence and regression coverage
Targeted mutations showed previously green tests accepting missing Evidence, wrong reason or format bytes, and omitted verifier actions; the strengthened cases failed those controls. Lifecycle controls exercise late FIT closure, cancellation identity, failed descriptor cleanup and retry, mixed verifier outcomes, and fail-closed ADB admission. Fixtures and injected providers are synthetic unless stated otherwise.
Remaining gaps: the full current suite has not passed locally; Linux-only and Windows-only cases and real Hopper, Ghidra, Cutter, JEB, Frida, Flutter, ADB, and browser providers were not verified by these runs. Issues #8555, #8559, #8561, #8562 and #8564 track separately reproduced verifier ownership concerns. This PR does not contain every reviewed change from the ongoing audit.
Validation performed
On the extracted branch based on
44b638400, Node 24.22.1, macOS arm64:npm run check:fast— passed typecheck and lint.npm run verify:test-discovery— passed; all discovered files assigned exactly once.npm run docs:check— passed.npm run test:focused -- tests/boundary/process/ghidraVerifierAssertions.test.ts— 2 passed, including simulated access failures and a POSIX dangling symlink; no real Ghidra run.npm run test:focused -- tests/boundary/process/commandcodeVerifierSkillBody.test.ts— 6 passed with a simulated client; native Command Code and SDK wire conversion were not verified.npm run test:focusedfor regex matching, process exit ownership, and JEB failure envelopes — 71 passed, one skipped. JEB responses were simulated.npm run test:focused -- tests/boundary/process/clientVerifierSetupTargets.test.ts— 17 passed on macOS; Copilot verifier cases are excluded on Windows, which was not run.npm run test:focusedfor Claude/OpenCode setup targets and Gemini, DeepSeek, and Command Code skill-body controls — 32 passed across the two runs; simulated clients on macOS. Windows was not run.npm run test:focused -- src/server/BundleResourcesMcp.test.ts— 2 passed; the public MCP keeper preserves bundle root provenance and session closure. Windows junction behavior was not tested.npm run test:focusedfor the Swift classification and universal-slice MCP tests — 13 passed with synthetic providers and fixtures.node --check scripts/verify-http3-network-captures.mjs— passed; four report-mode/status combinations were simulated, with no network capture run.npm run test:focused -- tests/boundary/mcp/pcapMcp.test.ts— 1 passed with a synthetic capture provider; the public bundle retained the returned Evidence.npm run test:focused -- tests/process-global/shortFileReads.test.ts— 21 passed.npm run test:focused -- tests/boundary/filesystem/releaseNotes.test.ts— 12 passed.npm run test:focusedfor the two Android JNI fixture consumers — 49 passed using synthetic ELF data.node --check scripts/verify-real-ghidra-function.mjs— passed; a simulated reverse-completion control showed that the former receipt overstated serialization.node --check scripts/verify-real-ghidra-nativeaot.mjs— passed; output wording controls were simulated, and Ghidra was not run.npm run test:focused -- tests/boundary/process/deepseekVerifierSkillBody.test.ts— 10 passed using a simulated client; native DeepSeek Harness was not run.npm run test:focused -- tests/boundary/process/geminiVerifierSkillBody.test.ts— 8 passed using a simulated client; native Gemini CLI was not run.npm run test:focused -- tests/boundary/process/qwenVerifierSkillBody.test.ts— 7 passed using a simulated client; native Qwen was not run.npm run test:focusedfor 15 FIT, Kuna, verifier, cache and Cutter files — 154 passed.npm run test:focusedfor 12 GPU, model, PyInstaller, Flutter, MCP and discovery files — 451 passed, one skipped.npm run test:focusedfor the retained PE imports, Rust alignment and Go pointer-width keepers — 23 passed.git diff --check— passed before commit.A complete macOS Vitest run on the original pinned baseline was stopped under the repository's resource guidance; it is not reported as passing. No real-provider workflow was run for this PR.
Compatibility, safety, and release
--install-apkis intentionally unavailable in the ADB verifier pending #8552; this does not remove the ADB tool APIs. The runtime Evidence verifier rejects nonregular or changing files, and sequential input reads can alter elapsed time. The package verifier no longer emits an unsupportedboundedRegexBridgesuccess field; external consumers of that report are unknown. The Ghidra concurrency receipt now reports completion rather than unverified serialization; external consumers of that receipt are unknown. The HTTP/3 verifier receipt adds an input-mode field and a provenance limitation; external consumers are unknown. No performance measurement or real-device result is claimed.Author readiness
Human owner:
Before merge
type(scope): outcome.