[PR #1094] [MERGED] fix(analysis): bind overview document identity to the active target #2642

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

📋 Pull Request Information

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

Base: main ← Head: fix/binary-overview-document-identity


📝 Commits (3)

  • 55dd90f fix(analysis): bind overview document identity to the active target
  • 31f3238 fix(analysis): refresh legacy overview snapshot results
  • da45853 Merge remote-tracking branch 'origin/main' into fix/binary-overview-document-identity

📊 Changes

10 files changed (+292 additions, -129 deletions)

View changed files

📝 scripts/verify-real-hopper.mjs (+14 -0)
📝 src/application/AnalysisContextQueries.ts (+7 -62)
➕ src/application/AnalysisDocument.ts (+72 -0)
📝 src/application/DirectAnalysis.ts (+2 -1)
📝 src/application/EnhancedTools.ts (+12 -9)
📝 src/application/InvestigationProviders.ts (+4 -1)
📝 src/application/WorkflowEvidence.ts (+6 -1)
📝 tests/boundary/mcp/enhancedTools.01-lists-the-complete-target-open.test.ts (+2 -0)
📝 tests/boundary/mcp/enhancedTools.04-uses-complete-inventories-inline.test.ts (+96 -1)
📝 tests/composition/directAnalysisSnapshotReplay.test.ts (+77 -54)

📄 Description

When Hopper lists ["New Document", "c"], binary_overview currently labels the target’s real segments and procedures as New Document. The shared CLI/MCP workflow now resolves the provider-selected document using the same resolver as address context queries. Headless providers may fall back to a single listed identity; ambiguous/missing identities and malformed or failed current-document responses remain typed errors.

The real-Hopper verifier now compares overview identity to current_document before and after switching targets. Its Linux document-count assertion matches isolated process replacement (also reviewed in #1044).

Follow-up: an independently reproduced legacy snapshot replay returned the old wrong document without starting the provider. Overview Evidence and replay now include semantic revision 2 in their workflow profile; other workflows keep their existing binding. Snapshot tests compare the actual calls without prescribing incidental ordering.

Validation:

  • Seven MCP regressions reproduced before the fix; 25 focused MCP/context/lease tests pass afterward, including headless fallback and malformed/error paths.
  • 31 focused snapshot/cache/MCP tests passed after the follow-up; the legacy replay regression failed before it. npm run check:fast passed.
  • Real verification at 31f32384: packed REA, installed it into an isolated prefix, and exercised its installed CLI/MCP against pinned Hopper 6.4.2 demo, Ubuntu 24, 1 CPU / 1536 MiB container: complete MCP semantic verifier passed, with document names c then version-v2, 1205 procedures and 1205 strings, unrelated-process survival, and clean shutdown.
  • The installed rea inspect ... --provider hopper --json returned the correct c document. Package SHA-256: 860dffcfa69e95ea7efe722dca405b6366ee4659f0e81f22955e9e1ed1096278.

No Ghidra provider code changed; its headless resolution path has deterministic coverage, not new real-Ghidra verification. Native macOS GUI verification was not performed.


🔄 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/1094 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/binary-overview-document-identity` --- ### 📝 Commits (3) - [`55dd90f`](https://github.com/morluto/rea/commit/55dd90f2ca055598004d2cc3eff1d7ebe2af2386) fix(analysis): bind overview document identity to the active target - [`31f3238`](https://github.com/morluto/rea/commit/31f323841cc89204cbfe557fd1654c3f5c699dda) fix(analysis): refresh legacy overview snapshot results - [`da45853`](https://github.com/morluto/rea/commit/da45853484a99173af8555658a34dc49ae0572aa) Merge remote-tracking branch 'origin/main' into fix/binary-overview-document-identity ### 📊 Changes **10 files changed** (+292 additions, -129 deletions) <details> <summary>View changed files</summary> 📝 `scripts/verify-real-hopper.mjs` (+14 -0) 📝 `src/application/AnalysisContextQueries.ts` (+7 -62) ➕ `src/application/AnalysisDocument.ts` (+72 -0) 📝 `src/application/DirectAnalysis.ts` (+2 -1) 📝 `src/application/EnhancedTools.ts` (+12 -9) 📝 `src/application/InvestigationProviders.ts` (+4 -1) 📝 `src/application/WorkflowEvidence.ts` (+6 -1) 📝 `tests/boundary/mcp/enhancedTools.01-lists-the-complete-target-open.test.ts` (+2 -0) 📝 `tests/boundary/mcp/enhancedTools.04-uses-complete-inventories-inline.test.ts` (+96 -1) 📝 `tests/composition/directAnalysisSnapshotReplay.test.ts` (+77 -54) </details> ### 📄 Description When Hopper lists `["New Document", "c"]`, `binary_overview` currently labels the target’s real segments and procedures as `New Document`. The shared CLI/MCP workflow now resolves the provider-selected document using the same resolver as address context queries. Headless providers may fall back to a single listed identity; ambiguous/missing identities and malformed or failed current-document responses remain typed errors. The real-Hopper verifier now compares overview identity to `current_document` before and after switching targets. Its Linux document-count assertion matches isolated process replacement (also reviewed in #1044). Follow-up: an independently reproduced legacy snapshot replay returned the old wrong document without starting the provider. Overview Evidence and replay now include semantic revision 2 in their workflow profile; other workflows keep their existing binding. Snapshot tests compare the actual calls without prescribing incidental ordering. Validation: - Seven MCP regressions reproduced before the fix; 25 focused MCP/context/lease tests pass afterward, including headless fallback and malformed/error paths. - 31 focused snapshot/cache/MCP tests passed after the follow-up; the legacy replay regression failed before it. `npm run check:fast` passed. - Real verification at `31f32384`: packed REA, installed it into an isolated prefix, and exercised its installed CLI/MCP against pinned Hopper 6.4.2 demo, Ubuntu 24, 1 CPU / 1536 MiB container: complete MCP semantic verifier passed, with document names `c` then `version-v2`, 1205 procedures and 1205 strings, unrelated-process survival, and clean shutdown. - The installed `rea inspect ... --provider hopper --json` returned the correct `c` document. Package SHA-256: `860dffcfa69e95ea7efe722dca405b6366ee4659f0e81f22955e9e1ed1096278`. No Ghidra provider code changed; its headless resolution path has deterministic coverage, not new real-Ghidra verification. Native macOS GUI verification was not performed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:08:32 +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#2642
No description provided.