[PR #1265] [MERGED] fix(snapshot): report query workflow and Evidence counts separately #2751

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

📋 Pull Request Information

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

Base: main ← Head: fix/snapshot-receipt-counts


📝 Commits (1)

  • 0e77953 fix(snapshot): report query workflow and Evidence counts separately

📊 Changes

6 files changed (+60 additions, -3 deletions)

View changed files

📝 docs/cli.md (+8 -0)
📝 src/application/binary/BinarySession.ts (+7 -1)
📝 src/application/binary/BinarySessionPort.ts (+6 -0)
📝 src/contracts/toolOutputSchemaGroups.ts (+22 -1)
📝 tests/boundary/mcp/sessionMcp.test.ts (+7 -1)
📝 tests/boundary/mcp/workflowSnapshotReplayMcp.test.ts (+10 -0)

📄 Description

A workflow-heavy investigation could save successfully with entries: 0, even though its snapshot retained workflow bindings and Evidence. Report primitive_entries, workflow_entries, and evidence_records separately in the close_binary save receipt. Preserve entries as the existing primitive count and describe replay eligibility separately from retained Evidence and provider database persistence.

Sanitized MCP result example: {"result":{"path":"/tmp/analysis.json","bytes":3829603,"entries":0,"primitive_entries":0,"workflow_entries":1,"evidence_records":19}}.

Validation:

  • SDK MCP lifecycle/workflow/schema and composed session/direct-replay suites: 5 files, 57 tests passed.
  • npm run check and npm run docs:check passed.
  • Real stdio MCP loaded the retained Ghidra 12.1.4 investigation, saved mixed and workflow-only snapshots, and verified every count against the written JSON. The workflow-only case returned 0 primitive, 1 workflow, and 19 Evidence records; target bytes stayed unchanged and subsequent ping succeeded.
  • Existing CLI persistence/replay is shared and remains covered by the composed direct-replay suite. The save receipt belongs to the long-lived MCP close operation; no new CLI command was added. Real Hopper was not rerun.

Closes #1248. Related to #1065 and #1211.


🔄 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/1265 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/snapshot-receipt-counts` --- ### 📝 Commits (1) - [`0e77953`](https://github.com/morluto/rea/commit/0e779533a9108a550b4d10dcb3920f91c7d48989) fix(snapshot): report query workflow and Evidence counts separately ### 📊 Changes **6 files changed** (+60 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/cli.md` (+8 -0) 📝 `src/application/binary/BinarySession.ts` (+7 -1) 📝 `src/application/binary/BinarySessionPort.ts` (+6 -0) 📝 `src/contracts/toolOutputSchemaGroups.ts` (+22 -1) 📝 `tests/boundary/mcp/sessionMcp.test.ts` (+7 -1) 📝 `tests/boundary/mcp/workflowSnapshotReplayMcp.test.ts` (+10 -0) </details> ### 📄 Description A workflow-heavy investigation could save successfully with `entries: 0`, even though its snapshot retained workflow bindings and Evidence. Report `primitive_entries`, `workflow_entries`, and `evidence_records` separately in the `close_binary` save receipt. Preserve `entries` as the existing primitive count and describe replay eligibility separately from retained Evidence and provider database persistence. Sanitized MCP result example: `{"result":{"path":"/tmp/analysis.json","bytes":3829603,"entries":0,"primitive_entries":0,"workflow_entries":1,"evidence_records":19}}`. Validation: - SDK MCP lifecycle/workflow/schema and composed session/direct-replay suites: 5 files, 57 tests passed. - `npm run check` and `npm run docs:check` passed. - Real stdio MCP loaded the retained Ghidra 12.1.4 investigation, saved mixed and workflow-only snapshots, and verified every count against the written JSON. The workflow-only case returned 0 primitive, 1 workflow, and 19 Evidence records; target bytes stayed unchanged and subsequent ping succeeded. - Existing CLI persistence/replay is shared and remains covered by the composed direct-replay suite. The save receipt belongs to the long-lived MCP close operation; no new CLI command was added. Real Hopper was not rerun. Closes #1248. Related to #1065 and #1211. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:09:49 +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#2751
No description provided.