Repository navigation
fix(ghidra): omit duplicate load-image result - #7777
Merged
Merged
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. |
Contributor
[Low impact] The PR appears safe to merge; no actionable defect was found. SummaryThis PR removes duplicate bridge output from new
Review was source-based. No tests or live Ghidra workflows were run. GitHub status could not be checked without authentication. Reviews (1) · Last reviewed commit: "docs(mcp): describe load-image evidence ..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inspect_native_load_imagenow keeps its normalized observations without repeating the bridge response inraw_result.Related to #7679
Problem and expected behavior
inspect_native_load_imagereply currently returns the same observation as both the parsed value andrawResult, so clients receive the load-image facts twice even when projection removes no fact.registersarray carry no register context and should be omitted.raw_resultis useful when it preserves a distinct bridge representation. Here it duplicates the normalized payload, while the attestation path can keep using its local bridge reply.Change and scope
inspect_native_load_image, removing only entry-context rows with emptyregistersarrays.raw_result: nullwhile keeping observations undernormalized_result.Contract and boundary impact
parseGhidraInventoryResultowns schema parsing and this normalization at the inventory result-projection boundary. It removes the duplicaterawResultpath forinspect_native_load_image; the provider continues to pass the bridge reply to local attestation before projecting Evidence.normalized_result.observations; because Evidenceraw_resultis nullable, absent provider raw data serializes asraw_result: null. No tool catalog or generated contract changes are included.entry_contextrows with no registers;raw_resultno longer duplicates that observation. Evidence identity, artifact/source provenance, historical retained Evidence and failure handling are outside the changed code path.docs/public/product-catalog.json), package, or installation impact: None; no package, installation, or generated catalog files changed.Evidence and regression coverage
src/ghidra/GhidraInventoryValues.test.tsadds a parser regression for retaining all reported observation facts while omitting raw output and another for removing empty-register rows.src/ghidra/GhidraProvider.behavior.test.tsupdates three provider expectations to the Evidenceraw_result: nullcontract.raw_result: null; provider seam tests cover the serialization expectation.Validation performed
node scripts/run-exact-tests.mjs --reporter=verbose --testNamePattern '^native load-image result projection \x3e omits raw bridge output when the observation keeps every reported fact$' src/ghidra/GhidraInventoryValues.test.ts— 1 passed, 41 skipped.npx --yes [email protected] [email protected] -- npm ci— passed.npx --yes [email protected] [email protected] -- npm run test:focused -- src/ghidra/GhidraInstallation.test.ts— 113 passed.npx --yes [email protected] [email protected] -- npm run check:fast— passed.Compatibility, safety, and release
normalized_result.observations; no schema migration is needed.Author readiness
Human owner: @Ha1baraA11
Before merge
type(scope): outcome.