[PR #240] [MERGED] refactor(domain): remove provider-specific target and snapshot state #1891

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/240
Author: @N0zoM1z0
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/15/2026
Merged by: @N0zoM1z0

Base: main ← Head: agent/remove-provider-specific-target-snapshot-state


📝 Commits (2)

  • f43c507 refactor(domain): remove provider-specific target and snapshot state
  • e3aae92 docs(api): refresh profile source anchors

📊 Changes

261 files changed (+3030 additions, -1219 deletions)

View changed files

📝 README.md (+11 -9)
📝 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_AnalysisSnapshotCache.AnalysisSnapshotCache.html (+35 -35)
📝 docs/api/classes/application_BinarySession.BinarySession.html (+78 -48)
📝 docs/api/classes/application_CompositeProvider.CompositeProvider.html (+25 -9)
📝 docs/api/classes/application_EvidenceLedger.EvidenceLedger.html (+13 -13)
📝 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/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)
📝 docs/api/classes/domain_errors.AnalysisProtocolError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisTimeoutError.html (+1 -1)
📝 docs/api/classes/domain_errors.ArtifactOperationError.html (+1 -1)
📝 docs/api/classes/domain_errors.BinaryTargetError.html (+1 -1)

...and 80 more files

📄 Description

Problem

BinaryTarget and analysis snapshot v1 encoded Hopper loader arguments in provider-neutral layers. That made target identity understand one adapter, left custom loader overrides outside safe cache identity, and could not prove the exact provider build and analysis semantics behind a replay.

What changed

  • Removed loader arguments and Hopper database naming from BinaryTarget; .hop inputs are now classified as generic analysis-database targets and remain accepted by the Hopper adapter.
  • Added bounded RFC 8785 analysis-profile commitments with concrete provider identity, provider profile schema version, opaque semantic parameters, and a verified SHA-256 digest.
  • Moved complete non-interactive Hopper loader derivation and override handling into the Hopper adapter. The Hopper launcher digest supplies the concrete build identity.
  • Introduced analysis snapshot v2 with exact target plus provider/profile bindings. Query IDs, cache lookup, staged imports, CLI replay, and MCP session replay now require the same target, concrete provider version, and profile.
  • Added optional profile commitments to new deep-analysis Evidence v2 records while preserving legacy unprofiled Evidence v2 IDs and imports. Composed REA workflow Evidence derives its own profile from the upstream deep-analysis profile.
  • Propagated profiles through provider execution, session lifecycle, CLI/MCP Evidence creation, and snapshot persistence. Auxiliary providers without their own explicit profile remain uncached.
  • Preserved the deprecated open_binary.loaderArgs response as an opaque adapter compatibility projection; it no longer participates in target or snapshot identity.
  • Updated product documentation, provider evaluation status, canonical catalog facts, generated API documentation, and regression coverage. The public tool inventory remains 78.

Compatibility and migration

  • Snapshot v1 is intentionally rejected with explicit recapture-as-v2 and Evidence-import guidance; it is never silently promoted into a cache.
  • Existing Evidence v2 records without analysis_profile remain valid and retain their existing semantic IDs, but cannot establish profile-compatible replay.
  • Hopper loader overrides now create a distinct safe profile/cache partition instead of disabling snapshots.
  • Legacy .hop files still work through Hopper, but the domain now reports the generic analysis-database format.
  • Snapshot mismatches fail before provider startup with an actionable profile_mismatch; active-session imports are also atomic and profile-exact.

Verification

  • npm run check on Node 22.19.0: 108 test files and 734/734 tests passed; coverage thresholds passed (82.54% statements, 71.42% branches, 84.77% functions, 84.89% lines).
  • npm run knip
  • npm run jscpd: passed at the existing 72-clone / 1.44% duplicated-line baseline.
  • npm run scan:todos
  • npm run verify:package on Node 24.11.0 with GCC/G++ 13: packaged CLI, setup transaction, three client registrations, managed skill, six prompts, target lifecycle, and target-free 78-tool MCP server passed.
  • npm run verify:hopper with the digest-pinned Hopper 6.4.2 Linux demo and two distinct real ELF targets (/usr/bin/true and /usr/bin/echo): distinct hashes, 86/92 procedures, real segments, bounded pseudocode, references, dynamic target switching, bundled MCP disabled, and clean shutdown all passed. A one-shot private mount namespace was used only to satisfy the WSLg X11 socket mode requirement; the host mount and repository were unchanged.
  • Real browser verification was not run because this PR does not change browser transport or capture behavior.

Follow-up boundary

This PR establishes the profile-exact provider-neutral foundation only. Explicit provider registry, selector precedence, and target binding remain the next independently reviewable PR.


🔄 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/240 **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/remove-provider-specific-target-snapshot-state` --- ### 📝 Commits (2) - [`f43c507`](https://github.com/morluto/rea/commit/f43c507a26f4d5b864b217134299ee351a6bebce) refactor(domain): remove provider-specific target and snapshot state - [`e3aae92`](https://github.com/morluto/rea/commit/e3aae9271a91b9cd3ad06a152027d1b0301124d9) docs(api): refresh profile source anchors ### 📊 Changes **261 files changed** (+3030 additions, -1219 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+11 -9) 📝 `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_AnalysisSnapshotCache.AnalysisSnapshotCache.html` (+35 -35) 📝 `docs/api/classes/application_BinarySession.BinarySession.html` (+78 -48) 📝 `docs/api/classes/application_CompositeProvider.CompositeProvider.html` (+25 -9) 📝 `docs/api/classes/application_EvidenceLedger.EvidenceLedger.html` (+13 -13) 📝 `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/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) 📝 `docs/api/classes/domain_errors.AnalysisProtocolError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisTimeoutError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.ArtifactOperationError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.BinaryTargetError.html` (+1 -1) _...and 80 more files_ </details> ### 📄 Description ## Problem `BinaryTarget` and analysis snapshot v1 encoded Hopper loader arguments in provider-neutral layers. That made target identity understand one adapter, left custom loader overrides outside safe cache identity, and could not prove the exact provider build and analysis semantics behind a replay. ## What changed - Removed loader arguments and Hopper database naming from `BinaryTarget`; `.hop` inputs are now classified as generic `analysis-database` targets and remain accepted by the Hopper adapter. - Added bounded RFC 8785 analysis-profile commitments with concrete provider identity, provider profile schema version, opaque semantic parameters, and a verified SHA-256 digest. - Moved complete non-interactive Hopper loader derivation and override handling into the Hopper adapter. The Hopper launcher digest supplies the concrete build identity. - Introduced analysis snapshot v2 with exact target plus provider/profile bindings. Query IDs, cache lookup, staged imports, CLI replay, and MCP session replay now require the same target, concrete provider version, and profile. - Added optional profile commitments to new deep-analysis Evidence v2 records while preserving legacy unprofiled Evidence v2 IDs and imports. Composed REA workflow Evidence derives its own profile from the upstream deep-analysis profile. - Propagated profiles through provider execution, session lifecycle, CLI/MCP Evidence creation, and snapshot persistence. Auxiliary providers without their own explicit profile remain uncached. - Preserved the deprecated `open_binary.loaderArgs` response as an opaque adapter compatibility projection; it no longer participates in target or snapshot identity. - Updated product documentation, provider evaluation status, canonical catalog facts, generated API documentation, and regression coverage. The public tool inventory remains 78. ## Compatibility and migration - Snapshot v1 is intentionally rejected with explicit recapture-as-v2 and Evidence-import guidance; it is never silently promoted into a cache. - Existing Evidence v2 records without `analysis_profile` remain valid and retain their existing semantic IDs, but cannot establish profile-compatible replay. - Hopper loader overrides now create a distinct safe profile/cache partition instead of disabling snapshots. - Legacy `.hop` files still work through Hopper, but the domain now reports the generic `analysis-database` format. - Snapshot mismatches fail before provider startup with an actionable `profile_mismatch`; active-session imports are also atomic and profile-exact. ## Verification - `npm run check` on Node 22.19.0: 108 test files and 734/734 tests passed; coverage thresholds passed (82.54% statements, 71.42% branches, 84.77% functions, 84.89% lines). - `npm run knip` - `npm run jscpd`: passed at the existing 72-clone / 1.44% duplicated-line baseline. - `npm run scan:todos` - `npm run verify:package` on Node 24.11.0 with GCC/G++ 13: packaged CLI, setup transaction, three client registrations, managed skill, six prompts, target lifecycle, and target-free 78-tool MCP server passed. - `npm run verify:hopper` with the digest-pinned Hopper 6.4.2 Linux demo and two distinct real ELF targets (`/usr/bin/true` and `/usr/bin/echo`): distinct hashes, 86/92 procedures, real segments, bounded pseudocode, references, dynamic target switching, bundled MCP disabled, and clean shutdown all passed. A one-shot private mount namespace was used only to satisfy the WSLg X11 socket mode requirement; the host mount and repository were unchanged. - Real browser verification was not run because this PR does not change browser transport or capture behavior. ## Follow-up boundary This PR establishes the profile-exact provider-neutral foundation only. Explicit provider registry, selector precedence, and target binding remain the next independently reviewable PR. --- <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#1891
No description provided.