Repository navigation
fix(snapshot): retain one-shot Ghidra pseudocode results - #8089
Conversation
[Medium impact] This PR appears safe to merge; no actionable defects were found. SummaryThis PR lets explicit one-shot Ghidra pseudocode snapshots retain an exact replay entry through the existing snapshot owner.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["CLI decompile with snapshot"] --> B{"Exact replay allowed?"}
B -->|Yes| C["Return retained Evidence"]
B -->|No| D["Run isolated Ghidra query"]
D --> E["Apply shared retention checks"]
E --> F["Save Evidence and eligible replay entry"]
F --> C
Reviews (3) · Last reviewed commit: "fix(snapshot): preserve replay across ma..." · Reviewed by Greptile |
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. |
Summary
Fixes #8085. An explicit one-shot Ghidra decompilation snapshot retains an exact replay entry, so repeating the same target/profile/procedure can reuse the original Evidence.
Problem and expected behavior
The original main
317bf3fereturned identical pseudocode Evidence but launched Java on bothdecompile --snapshotcalls (10.39 s / 10.24 s). The snapshot retained Evidence without a matching replay entry;analyzewas a working replay control. The measured report preceded implementation. These original measurements are historical, not a general performance claim.Change and current main integration
The direct CLI supplies an internal one-shot target context only for an explicit pseudocode snapshot. The shared snapshot-admission owner accepts it only for Ghidra
procedure_pseudo_code; the existing exact source/profile/parameter, mutation, permission, live-result, source-closure, capacity and Windows-admission checks remain. Persistent documentless MCP, other providers anddecompile_allretain their existing policy.The normal merge now includes main
d48e472fa6a664cacbb400560e673533005795ce. Its three conflicts came from old incidental Knip prerequisites: main now owns the shared Node timer limit and a separate debugger-control reply budget. All eight prerequisite files match main exactly, including GDB; none remains an unrelated contribution delta. Main's shared snapshot replay limitation constant is preserved. The relative-main diff is eight snapshot production/test/documentation paths (243 insertions, 6 deletions).The permanent legacy Evidence-only regression preserves its original complete
evidence_bundle, clears replay entries, confirms one refresh restores the entry, then replays without another provider query. The earlier migration review was already delivered and resolved; this integration preserves it.Contract and boundary impact
AnalysisSnapshotCacheadmission, called through DirectAnalysis/BinarySession. No parallel cache, guessed document identity, parser, dependency or public schema change.Expected effects of the existing decompile workflow:
The code-run effect is the existing Ghidra bridge script, not target execution or target injection. Writes are the selected snapshot and existing private analysis workspace; target bytes remain unchanged.
Current integration evidence
Representative observed output, with local paths omitted:
Validation performed
npm run check,npm run docs:check,npm run verify:test-discovery— PASS; 2,883 test files discovered once.npm run verify:package— PASS: actual installed CLI/MCP, 233 tools / 6 prompts, exact 6.8.0 update, verified process lineage and awaited cleanup. This is package workflow acceptance, separate from the compiled Ghidra feature calls above.npm pack --dry-run— PASS. This comparison does not claim a separate complete installed-file hash audit.1e8a45cc13bc036fa923adde11728bda5169e5d7. Its CI41155603444 attempt1 is SUCCESS: 45 jobs, 25 executed successes and 20 conditional skips. All 25 execution jobs checked out synthetic mergea73c2d87067b7099c12421f0fdfe54348fb2cbdd, whose parents are maind48e472fand this feature head. Source tests: 22,236 passed / 16 skipped; source plus eight built shards aggregate 39,038 passed / 262 skipped. Portable is that summary, not another execution. The changed cache owner file executed all 39 tests, and the replay file executed 28 tests / 2 skips on Linux and 27 tests / 3 skips in the actual Windows lane. Generic native package baselines ran on Linux x64, Linux arm64 and macOS arm64; Windows capability/package acceptance also ran on Windows. These platform baselines are separate from the dedicated Ghidra snapshot feature workflow. Complete logs and every job's first source checkout were checked. Current-head Codex completion is NOT ESTABLISHED; the older3fb0b151usage notice is historical. CI, local validation and independent review do not establish Codex, security, human review or maintainer approval.Compatibility, safety, and release
Dedicated installed-package Ghidra feature calls, the Ghidra snapshot feature workflow on Windows/Linux, full native engines / real applications, agent/model and general performance are NOT RUN. The Windows CI lane and its partial replay regressions above are separate evidence; the test named
realGhidraWindowsWorkflowchecks a workflow definition and does not execute that provider. Existing Windows focused cases remain skipped on the local macOS host. No breaking migration, dependency, permission or serialized-format change.Author readiness
Human owner: @xu91102
Before merge
type(scope): outcome.