[PR #973] [MERGED] refactor(native): group analyst semantics workflows and contracts #2544

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

📋 Pull Request Information

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

Base: main ← Head: refactor/native-capability-owners


📝 Commits (1)

  • 4649625 refactor(native): group analyst semantics workflows and contracts

📊 Changes

69 files changed (+158 additions, -127 deletions)

View changed files

📝 .github/workflows/ci.yml (+2 -0)
📝 docs/capability-migration.md (+21 -0)
📝 docs/testing.md (+8 -0)
📝 scripts/lib/catalog-core.mjs (+1 -1)
📝 scripts/lib/native-value-e2e.mjs (+1 -1)
📝 scripts/verify-real-ghidra-nativeaot.mjs (+2 -2)
📝 src/application/AnalysisProvider.ts (+1 -1)
📝 src/application/DirectAnalysis.ts (+1 -1)
📝 src/application/EnhancedTools.ts (+4 -4)
📝 src/application/native/EnhancedNativeInvestigation.test.ts (+7 -7)
📝 src/application/native/NativeApiInspection.test.ts (+3 -3)
📝 src/application/native/NativeApiInspection.ts (+2 -2)
📝 src/application/native/NativeCallRoutes.test.ts (+5 -5)
📝 src/application/native/NativeCallRoutes.ts (+4 -4)
📝 src/application/native/NativeDispatchMetadataInspection.ts (+6 -6)
📝 src/application/native/NativeUiActionTrace.ts (+10 -10)
📝 src/application/native/NativeValueTrace.test.ts (+6 -6)
📝 src/application/native/NativeValueTrace.ts (+8 -8)
📝 src/cli/utilityCommands.ts (+1 -1)
📝 src/contracts/contractSnapshot.test.ts (+1 -1)

...and 49 more files

📄 Description

Summary

Organize existing native analyst semantics, workflows and contracts for #740. Their flat layer roots obscured the distinction between reusable analyst meaning and native provider/host implementations.

Problem and expected behavior

Keep portable native facts and shared CLI/MCP workflows easy to locate while retaining exact producer interpretation, profile/Evidence identity, named contracts and platform authority. This is a mechanical capability increment before any further contract generalization.

Change and scope

  • Move 15 pure domain files to domain/native, nine workflow/test files to application/native and the named native contract to contracts/native.
  • Update all source and compiled catalog/verifier consumers. Keep native, Hopper/Ghidra/IDA implementations, shared dossier/official/enhanced contracts and host-verifier entrypoint locations at their existing owners.
  • Add two existing Swift-demangling regression suites (three cases) to the existing Apple CI job, covering the host-only proof gap affected by the contract move. No new runner/version/job. Document source/test ownership.

Contract and boundary impact

  • Semantic owner and earliest changed stage: internal module ownership/import resolution.
  • CLI and MCP/tool-catalog contract: unchanged names, ordering, schemas and output meaning.
  • Provider, bridge, target-format, or platform compatibility: unchanged code bodies and typed ports; no expanded support claim.
  • Evidence, artifact, provenance, or reconstruction contract: preserved identity, profiles, locations, derivation and unknowns.
  • Process execution, authorization, cleanup, or containment impact: unchanged; no new user options or permission fields.
  • Generated metadata, package, or installation impact: generated commitments byte-identical; 18 new compiled owners replace the old paths, seven source test outputs excluded.

Evidence and regression coverage

  • Exact AST/import/file-URL review confirms all 66 affected TS/MJS modules preserve implementation/assertions after mapping paths.
  • 274 focused cases passed across 23 selected suites, including native graph/call routes/API projection, actual SDK schemas and reordered bindings, CLI/MCP/provider selection and IDA contract conformance. Three real macOS Swift cases skipped locally and selected in Apple CI.
  • Remaining proof gaps: no fresh proprietary Hopper/IDA or interactive macOS UI run. The real native-value and NativeAOT verifier imports change mechanically; module resolution is checked, but no fresh full dependency-trace/NativeAOT claim is made.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance and failed attempts remain preserved.
  • Unsupported, incomplete and uncertain outcomes remain visible.

Validation performed

  • Five static gates and fresh docs/build checks passed; generated catalog and managed commitments unchanged.
  • All 554 test files discovered exactly once, including moved domain/service suites.
  • Compiled owners/old-output exclusion and native-value verifier module export resolution passed. YAML/selected test paths validated.
  • Actual existing Linux Ghidra 12.1.4/JDK: CLI plus six MCP operations, decompilation, file-byte oracle, caller-entry preservation and cleanup passed. Source-owned fixture was analyzed without execution. Two-CPU owned-family sampled peak RSS 1064628224 bytes; no surviving processes.
  • npm run verify:package: isolated installation, CLI/MCP analysis/Evidence, setup/backups/recovery/update and lifecycle passed; the frozen baseline catalog retains 133 tools/six prompts. No owned descendants remained; temporary tarball cleaned. Sampled MCP RSS 377606144 bytes, observed tools/list 2211.31 ms, without a comparative performance claim.
  • All 24 CI checks passed at head 4649625c, including real Apple/Swift and both macOS native package/Inspector baselines, Linux architectures, Windows, source/coverage and actual JavaScript recovery. Real macOS executed all three demangling cases in two suites (31 NIB/plist/demangling cases total).

Compatibility, safety, and release

  • Breaking changes or migration steps: internal module/compiled paths migrated together; public npm entrypoints and caller contracts stable.
  • Real Hopper/Ghidra, browser, or OS coverage: real bounded Linux Ghidra as above; other real host/engine claims retain their matching lanes.
  • Package or release metadata impact: no dependencies/version changes; no generated commitment drift.
  • Security, privacy, process, or containment review: serial heavy lanes, two CPUs, one worker, one-GiB Node heap and bounded Ghidra supervision; no Windows disk writes, installations or GUI changes.

Review checklist

  • One capability increment and Conventional Commit title.
  • Tracking issue linked.
  • Existing assertions/producer boundaries and public CLI/MCP meaning preserved.
  • Owning docs, compiled consumers and host-specific CI selection updated.
  • Final diff checked for private paths, unrelated changes and unsupported claims.

🔄 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/973 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `refactor/native-capability-owners` --- ### 📝 Commits (1) - [`4649625`](https://github.com/morluto/rea/commit/4649625ccc1881e6bb4c50cae2779137cd5f3816) refactor(native): group analyst semantics workflows and contracts ### 📊 Changes **69 files changed** (+158 additions, -127 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+2 -0) 📝 `docs/capability-migration.md` (+21 -0) 📝 `docs/testing.md` (+8 -0) 📝 `scripts/lib/catalog-core.mjs` (+1 -1) 📝 `scripts/lib/native-value-e2e.mjs` (+1 -1) 📝 `scripts/verify-real-ghidra-nativeaot.mjs` (+2 -2) 📝 `src/application/AnalysisProvider.ts` (+1 -1) 📝 `src/application/DirectAnalysis.ts` (+1 -1) 📝 `src/application/EnhancedTools.ts` (+4 -4) 📝 `src/application/native/EnhancedNativeInvestigation.test.ts` (+7 -7) 📝 `src/application/native/NativeApiInspection.test.ts` (+3 -3) 📝 `src/application/native/NativeApiInspection.ts` (+2 -2) 📝 `src/application/native/NativeCallRoutes.test.ts` (+5 -5) 📝 `src/application/native/NativeCallRoutes.ts` (+4 -4) 📝 `src/application/native/NativeDispatchMetadataInspection.ts` (+6 -6) 📝 `src/application/native/NativeUiActionTrace.ts` (+10 -10) 📝 `src/application/native/NativeValueTrace.test.ts` (+6 -6) 📝 `src/application/native/NativeValueTrace.ts` (+8 -8) 📝 `src/cli/utilityCommands.ts` (+1 -1) 📝 `src/contracts/contractSnapshot.test.ts` (+1 -1) _...and 49 more files_ </details> ### 📄 Description ## Summary Organize existing native analyst semantics, workflows and contracts for #740. Their flat layer roots obscured the distinction between reusable analyst meaning and native provider/host implementations. ## Problem and expected behavior Keep portable native facts and shared CLI/MCP workflows easy to locate while retaining exact producer interpretation, profile/Evidence identity, named contracts and platform authority. This is a mechanical capability increment before any further contract generalization. ## Change and scope - Move 15 pure domain files to domain/native, nine workflow/test files to application/native and the named native contract to contracts/native. - Update all source and compiled catalog/verifier consumers. Keep native, Hopper/Ghidra/IDA implementations, shared dossier/official/enhanced contracts and host-verifier entrypoint locations at their existing owners. - Add two existing Swift-demangling regression suites (three cases) to the existing Apple CI job, covering the host-only proof gap affected by the contract move. No new runner/version/job. Document source/test ownership. ## Contract and boundary impact - Semantic owner and earliest changed stage: internal module ownership/import resolution. - CLI and MCP/tool-catalog contract: unchanged names, ordering, schemas and output meaning. - Provider, bridge, target-format, or platform compatibility: unchanged code bodies and typed ports; no expanded support claim. - Evidence, artifact, provenance, or reconstruction contract: preserved identity, profiles, locations, derivation and unknowns. - Process execution, authorization, cleanup, or containment impact: unchanged; no new user options or permission fields. - Generated metadata, package, or installation impact: generated commitments byte-identical; 18 new compiled owners replace the old paths, seven source test outputs excluded. ## Evidence and regression coverage - Exact AST/import/file-URL review confirms all 66 affected TS/MJS modules preserve implementation/assertions after mapping paths. - 274 focused cases passed across 23 selected suites, including native graph/call routes/API projection, actual SDK schemas and reordered bindings, CLI/MCP/provider selection and IDA contract conformance. Three real macOS Swift cases skipped locally and selected in Apple CI. - Remaining proof gaps: no fresh proprietary Hopper/IDA or interactive macOS UI run. The real native-value and NativeAOT verifier imports change mechanically; module resolution is checked, but no fresh full dependency-trace/NativeAOT claim is made. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance and failed attempts remain preserved. - [x] Unsupported, incomplete and uncertain outcomes remain visible. ## Validation performed - Five static gates and fresh docs/build checks passed; generated catalog and managed commitments unchanged. - All 554 test files discovered exactly once, including moved domain/service suites. - Compiled owners/old-output exclusion and native-value verifier module export resolution passed. YAML/selected test paths validated. - Actual existing Linux Ghidra 12.1.4/JDK: CLI plus six MCP operations, decompilation, file-byte oracle, caller-entry preservation and cleanup passed. Source-owned fixture was analyzed without execution. Two-CPU owned-family sampled peak RSS 1064628224 bytes; no surviving processes. - `npm run verify:package`: isolated installation, CLI/MCP analysis/Evidence, setup/backups/recovery/update and lifecycle passed; the frozen baseline catalog retains 133 tools/six prompts. No owned descendants remained; temporary tarball cleaned. Sampled MCP RSS 377606144 bytes, observed tools/list 2211.31 ms, without a comparative performance claim. - All 24 CI checks passed at head 4649625c, including real Apple/Swift and both macOS native package/Inspector baselines, Linux architectures, Windows, source/coverage and actual JavaScript recovery. Real macOS executed all three demangling cases in two suites (31 NIB/plist/demangling cases total). ## Compatibility, safety, and release - Breaking changes or migration steps: internal module/compiled paths migrated together; public npm entrypoints and caller contracts stable. - Real Hopper/Ghidra, browser, or OS coverage: real bounded Linux Ghidra as above; other real host/engine claims retain their matching lanes. - Package or release metadata impact: no dependencies/version changes; no generated commitment drift. - Security, privacy, process, or containment review: serial heavy lanes, two CPUs, one worker, one-GiB Node heap and bounded Ghidra supervision; no Windows disk writes, installations or GUI changes. ## Review checklist - [x] One capability increment and Conventional Commit title. - [x] Tracking issue linked. - [x] Existing assertions/producer boundaries and public CLI/MCP meaning preserved. - [x] Owning docs, compiled consumers and host-specific CI selection updated. - [x] Final diff checked for private paths, unrelated changes and unsupported claims. --- <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:22 +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#2544
No description provided.