Repository navigation
fix(verification): compare retained Ghidra function evidence - #8258
ShuaixinHuang wants to merge 1 commit into
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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Low impact] The reviewed changes appear safe to merge. SummaryBoth Ghidra verifier controls now compare exact retained Evidence IDs through one shared helper instead of sending duplicate complete records.
Reviews (1) · Last reviewed commit: "fix(verification): compare retained Ghid..." · Reviewed by Greptile |
Supersedes #8179 at the author's request. This replacement reuses verified head 2bf92eb and preserves the original discussion and validation record at #8179. Historical validation and its limitations below remain at their stated execution points. This new PR must pass its own hosted CI.
Summary
Fixes #8172. The real-Ghidra verifier sends two inline copies of complete function Evidence to
compare_functions, exceeding the default MCP input allowance for sufficiently detailed functions. Use exact references to the records already retained by the same MCP session.Problem and expected behavior
The comparison should run within the default transport budget and keep its original result and provenance assertions. A local compiled stdio MCP probe with explicitly synthetic, artifact-bound function Evidence containing 1200 assembly rows rejects the inline request with
resource_constraint, reportingmax_input_elements: 1024. The same record compared through retained references returnsunchangedand links the original Evidence.Change and scope
Both the complete-function and unresolved-call verifier controls now use one request producer,
compareRetainedFunctionEvidence, with{ kind: "retained-evidence", evidence_id }for each operand. Existing response/error parsing, complete-functionunchanged, unresolved-callunknown, profile checks, source Evidence links, full bundle-record equality, and session cleanup assertions remain. Fullanalyze_functionreplies are still retrieved and checked inline; only the redundant comparison input changes.No input-limit increase, environment forwarding, provider behavior, schema, authority, timeout, resource setting, or comparison semantics change. The separate JDK-selection report #8171 is outside this PR.
Contract and boundary impact
scripts/lib/native-value-e2e.mjs; both verifier comparison controls use the same producer.compare_functionsretained-Evidence input, no new command/tool/schema.evidence_id; full source and comparison records remain in the bundle.Expected effects of the existing real-provider verifier remain:
The retained-reference change adds no target interaction; existing verifier bridge-script execution and owned temporary-file/project responsibilities remain with their current owners. Executable target bytes are not modified.
Evidence and regression coverage
d48e472fa6a664cacbb400560e673533005795cecontains both duplicated inline request sites. The original public-MCP input shape reproduces the reported default transport refusal using explicit synthetic Evidence; this does not establish a real Ghidra run on this host.unchangedorunknown, retains the exact source link and full source/comparison records, and refuses a missing retained ID.resource_constraint; patched source is restored byte-for-byte infinally. This is a controlled reversion after mechanical extraction, not a claim that the newly exported helper existed on main.For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/process/nativeValueVerifierComparison.test.ts src/domain/functionComparison.test.ts src/config/mcpInputBudget.test.ts tests/boundary/mcp/functionComparisonReferenceFactsMcp.test.ts— 3 prerequisite build tasks passed; 4 complete files, 103 tests passed.npm run check:fast— typecheck and lint passed, 2/2 tasks, 26.46s.npm run verify:test-discovery— all 2884 files discovered exactly once.Compatibility, safety, and release
verify:ghidra, real Ghidra/JDK, macOS/Linux or full repository suite result is claimed. The report's real-provider gate must still be rerun on an equipped host.Author readiness
Human owner: @ShuaixinHuang
Before merge
type(scope): outcome.