[PR #241] [MERGED] feat(session): add explicit provider registry and target binding #1892

Closed
opened 2026-10-16 21:12:14 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: agent/add-provider-registry-target-binding


📝 Commits (2)

  • 8987a44 feat(session): add explicit provider registry and target binding
  • 1e69bdc docs(api): refresh provider source anchors

📊 Changes

174 files changed (+5371 additions, -649 deletions)

View changed files

📝 AGENTS.md (+2 -1)
📝 README.md (+42 -9)
📝 docs/adr/0001-provider-selection-and-analysis-profiles.md (+16 -15)
📝 docs/api/assets/hierarchy.js (+1 -1)
📝 docs/api/assets/navigation.js (+1 -1)
📝 docs/api/assets/search.js (+1 -1)
➕ docs/api/classes/application_AnalysisProviderRegistry.AnalysisProviderRegistry.html (+162 -0)
📝 docs/api/classes/application_BinarySession.BinarySession.html (+33 -33)
📝 docs/api/classes/application_CompositeProvider.CompositeProvider.html (+10 -9)
📝 docs/api/classes/application_PermissionAuthority.PermissionPathError.html (+1 -1)
📝 docs/api/classes/application_ProcessCaptureError.ProcessCaptureError.html (+1 -1)
📝 docs/api/classes/application_ProjectPermissionStore.ProjectPermissionStoreError.html (+1 -1)
➕ docs/api/classes/application_SessionProviderRouter.SessionProviderRouter.html (+176 -0)
📝 docs/api/classes/browser_CdpBrowserProvider.CdpBrowserProvider.html (+6 -6)
📝 docs/api/classes/browser_CdpCaptureEvents.CdpCaptureEvents.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisCancelledError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisCapabilityUnavailableError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisInputError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisOutputError.html (+1 -1)

...and 80 more files

📄 Description

Summary

  • add a deterministic AnalysisProviderRegistry for overlapping deep-analysis backends and keep disjoint artifact/native capability families in SessionProviderRouter
  • bind exactly one concrete provider/profile per target, preserve it across ordinary reopen and runtime failures, and restore the exact previous route after failed or cancelled switches
  • expose the same selector through MCP open_binary.provider_id, CLI --provider, and REA_ANALYSIS_PROVIDER, with request > environment > deterministic auto precedence
  • publish sorted candidate availability, target support, stable rejection codes, local diagnostics, binding source, and concrete analysis profile in session status
  • keep Evidence and snapshot provenance tied to the provider that actually executed the operation; no racing, transparent failover, or provider-prefixed tools
  • update product catalog, generated TypeDoc, architecture/ADR/contract docs, package verification, and real-Hopper verification

Why

Hopper and the planned Ghidra backend implement the same deep operation family, so the disjoint-only CompositeProvider cannot safely route both. Array order, request racing, or fallback would make results and Evidence provenance non-reproducible. Selection now happens before client startup and remains immutable for the target.

Contract example

{
  "name": "open_binary",
  "arguments": {
    "path": "/absolute/path/to/program",
    "provider_id": "hopper"
  }
}

binary_session now returns authoritative analysis_provider_candidates and analysis_provider_binding fields. Unknown, unavailable, unsupported, ambiguous, and invalid selections return typed structured diagnostics.

Validation

  • npm run check — 112 files / 752 tests passed; coverage 82.96% statements, 71.82% branches, 85.13% functions, 85.29% lines
  • npm run knip
  • npm run jscpd
  • npm run scan:todos
  • npm run verify:package on Node 22.19.0 — isolated install, CLI selection, 78-tool MCP, explicit Hopper binding, and lifecycle passed
  • npm run verify:hopper with real Hopper at /opt/hopper/bin/Hopper and two distinct ELF targets — concrete binding/profile, direct and workflow Evidence provenance, target switch, and clean shutdown passed
  • focused registry, provider-binding, MCP, Hopper selection/profile, and legacy cancellation tests
  • real browser verification was not run; browser behavior is unchanged

🔄 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/241 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 7/15/2026 **Status:** ✅ Merged **Merged:** 7/15/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `agent/add-provider-registry-target-binding` --- ### 📝 Commits (2) - [`8987a44`](https://github.com/morluto/rea/commit/8987a447c3ce95db4fed91fcb2231ec33a6acdd1) feat(session): add explicit provider registry and target binding - [`1e69bdc`](https://github.com/morluto/rea/commit/1e69bdca8002a15ba851b756f8c2283fe3561c8b) docs(api): refresh provider source anchors ### 📊 Changes **174 files changed** (+5371 additions, -649 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+2 -1) 📝 `README.md` (+42 -9) 📝 `docs/adr/0001-provider-selection-and-analysis-profiles.md` (+16 -15) 📝 `docs/api/assets/hierarchy.js` (+1 -1) 📝 `docs/api/assets/navigation.js` (+1 -1) 📝 `docs/api/assets/search.js` (+1 -1) ➕ `docs/api/classes/application_AnalysisProviderRegistry.AnalysisProviderRegistry.html` (+162 -0) 📝 `docs/api/classes/application_BinarySession.BinarySession.html` (+33 -33) 📝 `docs/api/classes/application_CompositeProvider.CompositeProvider.html` (+10 -9) 📝 `docs/api/classes/application_PermissionAuthority.PermissionPathError.html` (+1 -1) 📝 `docs/api/classes/application_ProcessCaptureError.ProcessCaptureError.html` (+1 -1) 📝 `docs/api/classes/application_ProjectPermissionStore.ProjectPermissionStoreError.html` (+1 -1) ➕ `docs/api/classes/application_SessionProviderRouter.SessionProviderRouter.html` (+176 -0) 📝 `docs/api/classes/browser_CdpBrowserProvider.CdpBrowserProvider.html` (+6 -6) 📝 `docs/api/classes/browser_CdpCaptureEvents.CdpCaptureEvents.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisCancelledError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisCapabilityUnavailableError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisInputError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisOutputError.html` (+1 -1) _...and 80 more files_ </details> ### 📄 Description ## Summary - add a deterministic `AnalysisProviderRegistry` for overlapping deep-analysis backends and keep disjoint artifact/native capability families in `SessionProviderRouter` - bind exactly one concrete provider/profile per target, preserve it across ordinary reopen and runtime failures, and restore the exact previous route after failed or cancelled switches - expose the same selector through MCP `open_binary.provider_id`, CLI `--provider`, and `REA_ANALYSIS_PROVIDER`, with request > environment > deterministic auto precedence - publish sorted candidate availability, target support, stable rejection codes, local diagnostics, binding source, and concrete analysis profile in session status - keep Evidence and snapshot provenance tied to the provider that actually executed the operation; no racing, transparent failover, or provider-prefixed tools - update product catalog, generated TypeDoc, architecture/ADR/contract docs, package verification, and real-Hopper verification ## Why Hopper and the planned Ghidra backend implement the same deep operation family, so the disjoint-only `CompositeProvider` cannot safely route both. Array order, request racing, or fallback would make results and Evidence provenance non-reproducible. Selection now happens before client startup and remains immutable for the target. ## Contract example ```json { "name": "open_binary", "arguments": { "path": "/absolute/path/to/program", "provider_id": "hopper" } } ``` `binary_session` now returns authoritative `analysis_provider_candidates` and `analysis_provider_binding` fields. Unknown, unavailable, unsupported, ambiguous, and invalid selections return typed structured diagnostics. ## Validation - `npm run check` — 112 files / 752 tests passed; coverage 82.96% statements, 71.82% branches, 85.13% functions, 85.29% lines - `npm run knip` - `npm run jscpd` - `npm run scan:todos` - `npm run verify:package` on Node 22.19.0 — isolated install, CLI selection, 78-tool MCP, explicit Hopper binding, and lifecycle passed - `npm run verify:hopper` with real Hopper at `/opt/hopper/bin/Hopper` and two distinct ELF targets — concrete binding/profile, direct and workflow Evidence provenance, target switch, and clean shutdown passed - focused registry, provider-binding, MCP, Hopper selection/profile, and legacy cancellation tests - real browser verification was not run; browser behavior is unchanged --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:12:14 +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#1892
No description provided.