Repository navigation
test(ghidra): match the checkpoint-aware health limitation - #9269
XiaoBinGan wants to merge 2 commits into
Conversation
`morluto#9246` rewrote the default `healthLimitations` entry to name the checkpoint mode: Ghidra Program checkpoint mode is disabled: closing discards metadata edits; original executable bytes are unchanged. For stock ELF/PE/Mach-O on Linux/macOS, set REA_GHIDRA_CHECKPOINT_DIR ... `ghidraEvidenceMcp.test.ts` still asserted the previous phrasing, "original executable bytes are never written", so it fails on `main` at `8eff65127` and `c5301e614` independently of any branch: FAIL tests/boundary/mcp/ghidraEvidenceMcp.test.ts > Ghidra MCP evidence parity AssertionError: expected { …(16) } to match object { operation: 'analyze_function', …(3) } The assertion now names the substring the source emits. The text at `GhidraProviderCapabilities.ts:48` — the `existing-project` branch — still says "are never written" and is untouched, so only the default limitation's expectation changed. `tests/boundary/mcp/ghidraEvidenceMcp.test.ts`: 11 passing. `tsc` 0; `npm run lint` 0 errors. This is what turned the shards red on every open PR against current `main`; the failures were inherited, not caused by those branches.
Codex Review Summary: ✅ CompletedThis 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. |
[Low impact] This test-only change appears safe to merge. SummaryReplaces frozen health-message phrases with
Reviews (5) · Last reviewed commit: "test(ghidra): compare delivered guidance..." · Reviewed by Greptile |
`docs/testing.md` asks tests to compare delivered guidance with the owning formatter
or constant instead of freezing explanatory sentences, and `AGENTS.md` points there.
The previous commit swapped one frozen phrase for another, which fixes today's failure
and leaves the next reword to break the same shard.
The assertion now requires the result to contain every string
`ghidraHealthLimitations("fresh-import")` returns, so the test follows the formatter
that owns that text.
Verified both directions: rewording the health limitation to "original executable
bytes stay byte-for-byte identical" keeps the test green, while the frozen-phrase
version fails on the same edit.
`tests/boundary/mcp/ghidraEvidenceMcp.test.ts`: 11 passing. `tsc` 0.
|
Closing as superseded by #9268, which fixes the same stale Ghidra MCP limitation assertion and checks the complete operation limitation set, including the fresh-import health limitations covered here. Thank you for identifying and fixing the failure. |
|
Understood, and thank you for the pointer. I checked One note for whoever merges My only open question is whether the same stale-literal shape appears in other Ghidra MCP limitation assertions that |
Summary
Current
mainfailstests/boundary/mcp/ghidraEvidenceMcp.test.tson its own.#9246rewrote the defaulthealthLimitationsentry to name the checkpoint mode, and this test still asserted the previous phrasing.Expected
limitationsto contain"original executable bytes are never written". The default limitation now says:Change
One assertion names the substring the source emits. Nothing else changes.
The text at
GhidraProviderCapabilities.ts:48— theexisting-projectbranch — still says "are never written" and is untouched. The default branch and theowned-checkpointbranch keep their own wording, so this only corrects the expectation for the default limitation.Why this is worth landing on its own
The failure is inherited by every open PR that rebases onto current
main: a PR's shards run against the merge of its head withmain, so this one assertion turns theTest shard (5/8)lane red regardless of what the branch changed. The redPortable testsandCI requiredlanes are that failure aggregated, not independent problems.Contract and boundary impact
Expected effects:
Validation performed
npx vitest run tests/boundary/mcp/ghidraEvidenceMcp.test.ts— 11 passednpx tsc --noEmit -p .— exit 0npm run lint— 0 errorsupstream/mainat8eff65127before changing anything, so the assertion mismatch is confirmed independent of this branch.Gap: the failure was reproduced locally on Windows. The CI lane that first showed it runs on Linux, and I did not run the Linux lane here; the assertion compares a fixed string the provider emits, so it is platform-independent.
Before merge
type(scope): outcome.Author readiness
Human owner: @XiaoBinGan