Repository navigation
fix(snapshot): report binding mismatches - #8432
Merged
Merged
Conversation
2 tasks done
Contributor
[Medium impact] The reviewed changes appear safe to merge; no new actionable issues were found. SummaryThe PR reports saved and selected binding differences through
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Read and validate snapshot"] --> B["Compare selected target"]
B --> C{"Target differs?"}
C -->|Yes| D["CLI reports target difference and profile not compared"]
C -->|No| E["Resolve selected provider and profile"]
E --> F["Compare complete binding"]
F --> G{"Binding differs or profile unavailable?"}
G -->|Yes| H["Return error before retiring current session"]
G -->|No| I{"Profileless route?"}
I -->|Yes| J["Check permitted workflow contents"]
J -->|Incompatible| H
J -->|Compatible| K["Continue open or replay"]
I -->|No| K
Reviews (4) · Last reviewed commit: "refactor(snapshot): derive admission fro..." · Reviewed by Greptile |
morluto
marked this pull request as ready for review
November 1, 2026 03:55
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. |
Entrpi
added a commit
to Entrpi/rea
that referenced
this pull request
Nov 1, 2026
Take main 7c755f2 (morluto#8432, morluto#8417). There were no text conflicts, but morluto#8432 replaced snapshotMatchesBinding with snapshotBindingMismatch, which returns undefined when a snapshot matches and otherwise names what differs. rawLoadCompatibility.test.ts now asserts the mismatch: a pre-morluto#7823 Ghidra snapshot differs only in its profile digest, and a snapshot of a different target names the target.
9 of 22 tasks
This was referenced Nov 1, 2026
coyoteXujie
pushed a commit
to coyoteXujie/rea
that referenced
this pull request
Nov 2, 2026
* fix(snapshot): report binding mismatches * test(snapshot): assert structured mismatch recovery * docs(snapshot): explain profile comparison recovery * fix(snapshot): include profile in recovery advice * docs(snapshot): explain fresh-session profile discovery * refactor(snapshot): derive admission from binding comparison
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
Fixes #8430. Snapshot binding failures previously reported the same
profile_mismatchmessage for a changed target, provider or profile. Return the confirmed differing identities and profile digests so an agent can select the intended inputs or explicitly start without the snapshot.Change and scope
One shared binding comparison now owns both admission and the structured mismatch facts. Explicit opens, staged and active imports, and CLI target preflight use that result; an unexamined profile remains
not_compared, and incompatible profileless workflow contents remain separate. The older duplicate boolean binding and profileless checks are removed. The existing fail-closed error code, validation-before-retirement order, snapshot format and provider authority remain unchanged.The error reports both sides for confirmed target/provider/profile differences and includes a concrete recovery. A changed raw entry point is part of target identity even when bytes match. CLI target preflight does not claim to have compared a provider profile. Diagnostic wording changes; use the error code and structured details rather than matching prose.
Validation
5d1346091, seven focused domain, filesystem, composition and MCP suites passed: 239 tests passed, 2 Windows-only skipped. They cover target, provider, profile and combined mismatch, profileless scope, staged imports, CLI preflight and active-session preservation.check:fast, changed-file formatting andgit diff --checkpassed.not_compared. Both tests passed.0x1000versus0x2000reported the differing entry points, preserved an active rename after refusal, and recovered without the snapshot. Actual CLI and MCP errors were exercised. Test-owned targets and snapshots were unchanged and not executed.5d1346091, a real Ghidra selected-project control exercised a matching target/provider and project path after a synthetic history edit to a disposable copy. MCP and actual CLI reported the profile-digest mismatch, the existing MCP session remained usable, and restoring the test-owned project allowed snapshot replay. The target, snapshot and project were unchanged by REA; no target was executed. This is one selected project and host; the synthetic history edit does not establish an actual analyzer configuration.docs:checkand schema-validation controls passed; this follow-up did not change documentation or error schemas. Windows, Hopper, actual analyzer-setting edits and autonomous-agent behavior remain unverified.Compatibility and safety
No snapshot migration, target mutation, provider integration, or new authority. The error payload and wording provide more detail; the persisted format and stable error code do not change. Real-provider controls used owned fixtures and disposable project copies.
Author readiness
Human owner:
Before merge
type(scope): outcome.