Skip to content

test(snapshots): expect a snapshot binding mismatch to name targets by their persisted identity - #11639

Merged
morluto merged 1 commit into
mainfrom
test/provider-selection-snapshot-identity
Nov 16, 2026
Merged

morluto merged 1 commit into
mainfrom
test/provider-selection-snapshot-identity

Conversation

@morluto

@morluto morluto commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Summary

Two tests fail on main since #11551 (feat(snapshots)!: persist the target identity as the snapshot target): they still expect a snapshot binding mismatch to name each target by a flat sha256 / entry_point. The product output is the intended #11551 shape; only the expectations are stale.

Problem and expected behavior

open_binary with a non-matching snapshot_path (MCP) and direct analysis with --snapshot (CLI) report details.binding_mismatch.target.{snapshot,selected} as { identity: { sha256, selection, ... }, kind }. tests/boundary/mcp/providerSelectionMcp.test.ts ("reports confirmed snapshot binding differences and keeps the active session") and tests/composition/directAnalysisFactories.test.ts ("direct analysis snapshot target mismatch retains actionable snapshot recovery") assert the old flat target and fail on main (093e41a).

Change and scope

Test-only: the three binding_mismatch.target expectations read identity.sha256 and identity.selection.entry_point. No source change. Sibling sweep: the other binding_mismatch tests (directAnalysisSnapshotReplay.test.ts, binarySession.test.ts) already pass; no other test asserts a flat snapshot target.

Contract and boundary impact

  • Semantic owner and earliest changed stage: none (tests follow the feat(snapshots)!: persist the target identity as the snapshot target #11551 owner, src/domain/analysisSnapshot.ts).
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details: not applicable.
  • Generated metadata, package, or installation impact: none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests updated: the two named above.
  • Base reproduction: on main 093e41a, npm run test:focused -- tests/boundary/mcp/providerSelectionMcp.test.ts — 1 failed (received target.snapshot = { identity: { sha256 … }, kind: "database" }); tests/composition/directAnalysisFactories.test.ts — 1 failed, same shape.
  • Remaining proof gaps: none known.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- tests/composition/directAnalysisFactories.test.ts tests/boundary/mcp/providerSelectionMcp.test.ts — 37 passed
  • npm run test:focused -- tests/boundary/filesystem/directAnalysisSnapshotReplay.test.ts tests/composition/directAnalysisFactories.test.ts tests/composition/analysis-sessions/binarySession.test.ts — before the fix: only the directAnalysisFactories case failed
  • pre-push hook (check:fast, architecture guards) — passed

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: not applicable.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

…y their persisted identity

Since #11551 a snapshot persists its target as { identity, kind }, so binding_mismatch.target reports the identity's sha256 and selection there. Two tests still expected the flat target and fail on main.
@morluto morluto added the main-fix Fixes a failure on main; may merge while main CI is red label Nov 16, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T01:20:28.712878Z
We couldn’t complete this review. Comment @codex review to try again.
9deb856 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only change appears safe to merge.

Summary

Updates stale snapshot mismatch expectations in the MCP and direct-analysis tests.

  • Snapshot mismatch tests now follow the persisted target identity shape.

No actionable code or security issues found. Tests were not run during this review. The check for a superseding PR was blocked because GitHub authentication was unavailable.

Reviews (1) · Last reviewed commit: "test(snapshots): expect a snapshot bindi..." · Reviewed by Greptile

@morluto
morluto merged commit 653a6d0 into main Nov 16, 2026
8 checks passed
@morluto
morluto deleted the test/provider-selection-snapshot-identity branch November 16, 2026 01:27
@morluto morluto added the area: tests Test suite and verification label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification main-fix Fixes a failure on main; may merge while main CI is red

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant