[PR #984] [MERGED] fix(snapshot): replay validated workflow evidence #2554

Closed
opened 2026-10-17 21:07:29 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/984
Author: @morluto
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @morluto

Base: main ← Head: codex/snapshot-replay-binding-pr


📝 Commits (10+)

  • a98bde7 fix(snapshot): bind replay to validated cache entry
  • ad856fb fix(snapshot): persist composed workflow results
  • ef0f928 fix(snapshot): enforce workflow replay identity
  • 4b5f699 fix(snapshot): honor cancellation after route resolution
  • 48f0e13 test(snapshot): make cancellation race deterministic
  • 0001acc Merge remote-tracking branch 'origin/main' into codex/snapshot-replay-binding-pr
  • 8016707 fix(snapshot): replay all composed workflow evidence
  • 519a44d Merge remote-tracking branch 'origin/main' into codex/snapshot-replay-binding-pr
  • bb9e30e fix(snapshot): index workflow evidence once per snapshot
  • 14850a3 Merge remote-tracking branch 'origin/main' into codex/snapshot-replay-binding-pr

📊 Changes

11 files changed (+1462 additions, -80 deletions)

View changed files

📝 src/application/DirectAnalysis.ts (+130 -35)
📝 src/application/binary/AnalysisSnapshotCache.test.ts (+122 -0)
📝 src/application/binary/AnalysisSnapshotCache.ts (+78 -4)
📝 src/application/binary/BinarySession.ts (+63 -8)
📝 src/application/binary/BinarySessionOpen.ts (+36 -3)
📝 src/application/binary/BinarySessionRecords.ts (+37 -0)
📝 src/domain/analysisSnapshot.test.ts (+51 -26)
📝 src/domain/analysisSnapshot.ts (+250 -2)
📝 tests/boundary/filesystem/directAnalysisPermissions.test.ts (+2 -2)
📝 tests/composition/analysis-sessions/binarySession.test.ts (+60 -0)
➕ tests/composition/directAnalysisSnapshotReplay.test.ts (+633 -0)

📄 Description

Snapshot replay now binds results to validated cache entries instead of selecting the first Evidence record with matching query identity. It preserves historical Evidence while replaying only the exact entry-bound result and provenance, and declines replay when the required validated entry is absent.

Snapshots record composed results for replayable workflow calls, including binary_overview, inspect_native_api, inspect_native_dispatch_metadata, trace_feature, and trace_native_values. The live trace_native_ui_action workflow remains excluded. Replay applies the requested target, operation, provider, profile, and parameter checks to workflow entries as well as direct entries, so a valid entry from a different workflow profile is not reused.

When the selected provider capability omits its version, snapshot identity uses the resolved route profile's concrete provider identity, matching the identity attached to execution evidence. This allows exact replay for versioned Hopper/Ghidra routes without weakening provider/profile matching. Cancellation during route resolution is checked before cached evidence can be returned.

Verification:

  • Focused DirectAnalysis replay, filesystem snapshot, and BinarySession tests: 34 passed.
  • Contract and schema tests: 19 passed; workflow results are local snapshot persistence and do not change MCP contracts or the generated catalog.
  • npm run check:fast, npm run docs:check, and npm run format:check: passed.

Tests use fixture providers; no real Hopper or Ghidra execution is claimed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/984 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/snapshot-replay-binding-pr` --- ### 📝 Commits (10+) - [`a98bde7`](https://github.com/morluto/rea/commit/a98bde76d94a36e6a9744ad98217dd20c835f635) fix(snapshot): bind replay to validated cache entry - [`ad856fb`](https://github.com/morluto/rea/commit/ad856fba8b43e69455ae073ac3749026e1376cfd) fix(snapshot): persist composed workflow results - [`ef0f928`](https://github.com/morluto/rea/commit/ef0f928ffce30b52f7f2026793fac2303d51485c) fix(snapshot): enforce workflow replay identity - [`4b5f699`](https://github.com/morluto/rea/commit/4b5f6992ba9305f915c85fa1d2de75b0da87e835) fix(snapshot): honor cancellation after route resolution - [`48f0e13`](https://github.com/morluto/rea/commit/48f0e130e1e17e195bff9c811151079a665e1df2) test(snapshot): make cancellation race deterministic - [`0001acc`](https://github.com/morluto/rea/commit/0001acc299de88eba9d362c2a586cbc08f5be371) Merge remote-tracking branch 'origin/main' into codex/snapshot-replay-binding-pr - [`8016707`](https://github.com/morluto/rea/commit/80167076a33d4531973142a28d062cc33ea6d368) fix(snapshot): replay all composed workflow evidence - [`519a44d`](https://github.com/morluto/rea/commit/519a44d6ed22aa6518670e7c59a2a439f91b70ff) Merge remote-tracking branch 'origin/main' into codex/snapshot-replay-binding-pr - [`bb9e30e`](https://github.com/morluto/rea/commit/bb9e30e06af1b8a5887d7aa138441ab4adee6c40) fix(snapshot): index workflow evidence once per snapshot - [`14850a3`](https://github.com/morluto/rea/commit/14850a3575a2365f9bc8b01a7627ed6dbadd86a6) Merge remote-tracking branch 'origin/main' into codex/snapshot-replay-binding-pr ### 📊 Changes **11 files changed** (+1462 additions, -80 deletions) <details> <summary>View changed files</summary> 📝 `src/application/DirectAnalysis.ts` (+130 -35) 📝 `src/application/binary/AnalysisSnapshotCache.test.ts` (+122 -0) 📝 `src/application/binary/AnalysisSnapshotCache.ts` (+78 -4) 📝 `src/application/binary/BinarySession.ts` (+63 -8) 📝 `src/application/binary/BinarySessionOpen.ts` (+36 -3) 📝 `src/application/binary/BinarySessionRecords.ts` (+37 -0) 📝 `src/domain/analysisSnapshot.test.ts` (+51 -26) 📝 `src/domain/analysisSnapshot.ts` (+250 -2) 📝 `tests/boundary/filesystem/directAnalysisPermissions.test.ts` (+2 -2) 📝 `tests/composition/analysis-sessions/binarySession.test.ts` (+60 -0) ➕ `tests/composition/directAnalysisSnapshotReplay.test.ts` (+633 -0) </details> ### 📄 Description Snapshot replay now binds results to validated cache entries instead of selecting the first Evidence record with matching query identity. It preserves historical Evidence while replaying only the exact entry-bound result and provenance, and declines replay when the required validated entry is absent. Snapshots record composed results for replayable workflow calls, including `binary_overview`, `inspect_native_api`, `inspect_native_dispatch_metadata`, `trace_feature`, and `trace_native_values`. The live `trace_native_ui_action` workflow remains excluded. Replay applies the requested target, operation, provider, profile, and parameter checks to workflow entries as well as direct entries, so a valid entry from a different workflow profile is not reused. When the selected provider capability omits its version, snapshot identity uses the resolved route profile's concrete provider identity, matching the identity attached to execution evidence. This allows exact replay for versioned Hopper/Ghidra routes without weakening provider/profile matching. Cancellation during route resolution is checked before cached evidence can be returned. Verification: - Focused DirectAnalysis replay, filesystem snapshot, and BinarySession tests: 34 passed. - Contract and schema tests: 19 passed; workflow results are local snapshot persistence and do not change MCP contracts or the generated catalog. - `npm run check:fast`, `npm run docs:check`, and `npm run format:check`: passed. Tests use fixture providers; no real Hopper or Ghidra execution is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2554
No description provided.