Repository navigation
fix!: guide snapshot inputs to the restore workflow - #8867
Conversation
BREAKING CHANGE: Snapshot-shaped bundle import failures use invalid_request rather than evidence_integrity_mismatch.
[Medium impact] The PR appears safe to merge; the new guidance does not change which bundles or snapshots are accepted. SummaryThe PR recognizes snapshot-shaped JSON after an Evidence bundle import fails and points callers to the restore workflow.
No actionable code or security issues were found. Checks were source-based; tests were not run during this review. Supersession could not be checked because GitHub access required authentication. Reviews (1) · Last reviewed commit: "fix!: guide snapshot inputs to the resto..." · 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. |
Problem and outcome
Passing an analysis snapshot to
import_evidence_bundleorevidence-importcurrently reports an Evidence integrity mismatch and recommends recreating observations, even when the file is a valid snapshot. Recognize the snapshot-shaped envelope after bundle validation fails and guide callers to the appropriate restore workflow. Related: #8590.The envelope check does not authenticate a snapshot: the error explicitly says so. Inputs with a top-level bundle
recordsmember retain bundle integrity diagnostics. MCP guidance namesopen_binaryandsnapshot_path; CLI guidance names--snapshotand states that the CLI loads and updates the selected file. Both require the original target identity and matching provider and analysis profile.Breaking: snapshot-shaped bundle import failures now return
invalid_requestrather thanevidence_integrity_mismatch. Refresh error handling that matches the old code.Validation
invalid_request, followed theopen_binaryroute and recovered the same historical source Evidence. The snapshot, unexecuted target and selected.gprdescriptor hashes were unchanged during those reads. An older snapshot from another analysis profile was correctly rejected as mismatched.evidence-importCLI returned the same guidance. A real Ghidradecompile --snapshotinvocation succeeded against a disposable copy, preserving its linked source record; the option can update the copy.check:fast,docs:checkandgit diff --checkpassed. Other providers, hosts, and arbitrary malformed snapshot contents were not exhaustively exercised.Author readiness
Human owner: