[PR #907] [MERGED] refactor(javascript): group domain semantics and contracts #2337

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

📋 Pull Request Information

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

Base: main ← Head: refactor/javascript-domain-contracts-owner


📝 Commits (2)

  • 1a43145 refactor(javascript): group domain semantics and contracts
  • e98efe4 chore: merge main into JavaScript owner migration

📊 Changes

253 files changed (+432 additions, -410 deletions)

View changed files

📝 .github/workflows/real-javascript-recovery.yml (+2 -2)
📝 docs/capability-migration.md (+15 -0)
📝 scripts/lib/browser-script-export-assertions.mjs (+1 -1)
📝 scripts/lib/catalog-core.mjs (+20 -13)
📝 scripts/verify-real-electron.mjs (+1 -1)
📝 scripts/verify/javascript/application-workflows.mjs (+3 -3)
📝 scripts/verify/javascript/recovery.mjs (+1 -1)
📝 src/application/EvidenceInputResolver.test.ts (+1 -1)
📝 src/application/ReconstructionObligationCandidates.test.ts (+2 -2)
📝 src/application/javascript/ElectronActiveEvidence.ts (+1 -1)
📝 src/application/javascript/ElectronActiveObservationPort.ts (+1 -1)
📝 src/application/javascript/ElectronActiveObservationService.ts (+1 -1)
📝 src/application/javascript/ElectronBoundaryAnalysis.ts (+2 -2)
📝 src/application/javascript/ElectronBoundaryGraphContext.ts (+3 -3)
📝 src/application/javascript/ElectronBoundaryGraphIpc.ts (+2 -2)
📝 src/application/javascript/ElectronBoundaryGraphNative.ts (+1 -1)
📝 src/application/javascript/ElectronBoundaryGraphWindows.ts (+2 -2)
📝 src/application/javascript/ElectronEvidence.ts (+1 -1)
📝 src/application/javascript/ElectronObservationPort.ts (+1 -1)
📝 src/application/javascript/ElectronObservationService.ts (+1 -1)

...and 80 more files

📄 Description

Summary

Group the existing JavaScript/Electron domain semantics in src/domain/javascript/ and their specific contracts/examples in src/contracts/javascript/. This completes the layer ownership for the JavaScript application pilot in T6 of #740.

Problem and expected behavior

The JavaScript application workflows have an owner, but their pure parsing, graphs, runtime reconciliation and schemas still occupied the domain/contract roots. Their consumers and verification tooling should follow one coherent owner without changing public contracts or moving cross-domain aggregates into JavaScript.

Change and scope

  • Move 116 domain files, including 28 colocated tests and three source-only fixtures, and six JavaScript-specific contracts/examples.
  • Keep Evidence, digests, ordering, comparison semantics and historical-source graphs shared.
  • Keep applicationToolContracts.ts shared because it also owns Android/Apple projections and reconstruction workflows.
  • Update source/type/reexport imports, compiled catalog/verifier/SDK fixture paths and recovery CI filters together. Reuse the verifier/fixture owners established in #896.

Contract and boundary impact

  • Semantic owner and earliest changed stage: domain/contract capability ownership and module resolution.
  • CLI and MCP/tool-catalog contract: unchanged names, schemas, examples, results and generated metadata.
  • Provider, bridge, target-format, or platform compatibility: no producer or support-policy change.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged implementations and identity algorithms.
  • Process execution, authorization, cleanup, or containment impact: none.
  • Generated metadata (docs/product-catalog.json), package, or installation impact: generated outputs unchanged; compiled module paths follow their owners.

Evidence and regression coverage

  • Tests added or updated: existing imports and source-only fixtures; no new arbitrary caps or prescribed workflows.
  • Base reproduction or other evidence: all 251 affected TS/MJS implementation/assertion bodies, mapped import owners and file-URL roots compare exactly. Compiled catalog path literals are checked against the explicit move map. Clean build confirms 91 new production module paths with old paths absent, and preserves all 31 test/fixture build exclusions.
  • User-visible CLI/MCP output: canonical contracts, SDK schemas/examples, normal/reordered presentation and retained application workflows passed unchanged.
  • Remaining proof gaps: real Wakaru and browser execution were not performed locally for this increment; affected hosted lanes must pass. The optional engine-string-limit stress lane was not run locally.

For evidence-bearing changes:

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

Validation performed

  • npm run check -- --output-logs=errors-only — all five static gates passed.
  • npm run docs:check — fresh build and generated-document checks passed without generated changes.
  • Exact focused Vitest selection — 1183 cases in 88 files passed, including moved pure tests, public schemas/examples/snapshots, source maps, runtime reconciliation, Electron boundaries, CLI/MCP, relocated scripts and original/reversed SDK presentation.
  • npm run verify:test-discovery — all 520 files discovered once; exact new-path developer selection also passed.
  • npm run verify:inspector — all eight actual Linux CLI/MCP filename fixtures passed.
  • npm run verify:package — installed CLI/MCP, setup, backup/recovery, Evidence, lifecycle and update passed; 130 tools and 6 prompts. Observed startup to tools/list was 6325.37 ms; sampled MCP peak RSS was 429023232 bytes.

Compatibility, safety, and release

  • Breaking changes or migration steps: internal module paths moved; direct repository consumers, generator inputs and CI filters migrated. Public commands/contracts unchanged.
  • Real Hopper/Ghidra, browser, or OS coverage: actual Linux Node Inspector locally. The native baseline matrix covers Linux x64/arm64, macOS x64/arm64 and Windows x64; hosted success is required before merge.
  • Package or release metadata impact: no dependencies, engine installation or version changes; test/fixture modules remain source-only.
  • Security, privacy, process, or containment review: final diff and exact import/path mapping reviewed. Heavy local checks ran serially with two-CPU affinity, reduced priority, 1-GiB heap and one test worker. No Windows disk writes or GUI mutation.

Review checklist

  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

A narrow startup follow-up observed 2843.98 ms and 424718336 bytes RSS on unchanged source. The ESM diagnostic counter varies with stderr delivery at the tools/list boundary (184/201 immediately, 546/410 after 200 ms in two identical runs); these diagnostic counts are not a stable import-graph or performance comparison. The exact mapped source-owner comparison remains the structural proof. No startup improvement is claimed.

Main integration: merged the newly landed browser source-location and Android session fixes into this branch. The five static gates, fresh generated-document/build checks, and 153 cases in 11 files passed, including the new source-location CLI/MCP and decoder boundaries. The tool-count observation above belongs to the original frozen baseline; the upstream source-location capability adds a tool. The new merge commit requires a fresh complete CI run.


🔄 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/907 **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/javascript-domain-contracts-owner` --- ### 📝 Commits (2) - [`1a43145`](https://github.com/morluto/rea/commit/1a4314589d0469104da4f517f0f13725872b44b5) refactor(javascript): group domain semantics and contracts - [`e98efe4`](https://github.com/morluto/rea/commit/e98efe469ca0b4da3befffcb75febbf01d116e33) chore: merge main into JavaScript owner migration ### 📊 Changes **253 files changed** (+432 additions, -410 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/real-javascript-recovery.yml` (+2 -2) 📝 `docs/capability-migration.md` (+15 -0) 📝 `scripts/lib/browser-script-export-assertions.mjs` (+1 -1) 📝 `scripts/lib/catalog-core.mjs` (+20 -13) 📝 `scripts/verify-real-electron.mjs` (+1 -1) 📝 `scripts/verify/javascript/application-workflows.mjs` (+3 -3) 📝 `scripts/verify/javascript/recovery.mjs` (+1 -1) 📝 `src/application/EvidenceInputResolver.test.ts` (+1 -1) 📝 `src/application/ReconstructionObligationCandidates.test.ts` (+2 -2) 📝 `src/application/javascript/ElectronActiveEvidence.ts` (+1 -1) 📝 `src/application/javascript/ElectronActiveObservationPort.ts` (+1 -1) 📝 `src/application/javascript/ElectronActiveObservationService.ts` (+1 -1) 📝 `src/application/javascript/ElectronBoundaryAnalysis.ts` (+2 -2) 📝 `src/application/javascript/ElectronBoundaryGraphContext.ts` (+3 -3) 📝 `src/application/javascript/ElectronBoundaryGraphIpc.ts` (+2 -2) 📝 `src/application/javascript/ElectronBoundaryGraphNative.ts` (+1 -1) 📝 `src/application/javascript/ElectronBoundaryGraphWindows.ts` (+2 -2) 📝 `src/application/javascript/ElectronEvidence.ts` (+1 -1) 📝 `src/application/javascript/ElectronObservationPort.ts` (+1 -1) 📝 `src/application/javascript/ElectronObservationService.ts` (+1 -1) _...and 80 more files_ </details> ### 📄 Description ## Summary Group the existing JavaScript/Electron domain semantics in `src/domain/javascript/` and their specific contracts/examples in `src/contracts/javascript/`. This completes the layer ownership for the JavaScript application pilot in T6 of #740. ## Problem and expected behavior The JavaScript application workflows have an owner, but their pure parsing, graphs, runtime reconciliation and schemas still occupied the domain/contract roots. Their consumers and verification tooling should follow one coherent owner without changing public contracts or moving cross-domain aggregates into JavaScript. ## Change and scope - Move 116 domain files, including 28 colocated tests and three source-only fixtures, and six JavaScript-specific contracts/examples. - Keep Evidence, digests, ordering, comparison semantics and historical-source graphs shared. - Keep `applicationToolContracts.ts` shared because it also owns Android/Apple projections and reconstruction workflows. - Update source/type/reexport imports, compiled catalog/verifier/SDK fixture paths and recovery CI filters together. Reuse the verifier/fixture owners established in #896. ## Contract and boundary impact - Semantic owner and earliest changed stage: domain/contract capability ownership and module resolution. - CLI and MCP/tool-catalog contract: unchanged names, schemas, examples, results and generated metadata. - Provider, bridge, target-format, or platform compatibility: no producer or support-policy change. - Evidence, artifact, provenance, or reconstruction contract: unchanged implementations and identity algorithms. - Process execution, authorization, cleanup, or containment impact: none. - Generated metadata (`docs/product-catalog.json`), package, or installation impact: generated outputs unchanged; compiled module paths follow their owners. ## Evidence and regression coverage - Tests added or updated: existing imports and source-only fixtures; no new arbitrary caps or prescribed workflows. - Base reproduction or other evidence: all 251 affected TS/MJS implementation/assertion bodies, mapped import owners and file-URL roots compare exactly. Compiled catalog path literals are checked against the explicit move map. Clean build confirms 91 new production module paths with old paths absent, and preserves all 31 test/fixture build exclusions. - User-visible CLI/MCP output: canonical contracts, SDK schemas/examples, normal/reordered presentation and retained application workflows passed unchanged. - Remaining proof gaps: real Wakaru and browser execution were not performed locally for this increment; affected hosted lanes must pass. The optional engine-string-limit stress lane was not run locally. 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, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run check -- --output-logs=errors-only` — all five static gates passed. - `npm run docs:check` — fresh build and generated-document checks passed without generated changes. - Exact focused Vitest selection — 1183 cases in 88 files passed, including moved pure tests, public schemas/examples/snapshots, source maps, runtime reconciliation, Electron boundaries, CLI/MCP, relocated scripts and original/reversed SDK presentation. - `npm run verify:test-discovery` — all 520 files discovered once; exact new-path developer selection also passed. - `npm run verify:inspector` — all eight actual Linux CLI/MCP filename fixtures passed. - `npm run verify:package` — installed CLI/MCP, setup, backup/recovery, Evidence, lifecycle and update passed; 130 tools and 6 prompts. Observed startup to tools/list was 6325.37 ms; sampled MCP peak RSS was 429023232 bytes. ## Compatibility, safety, and release - Breaking changes or migration steps: internal module paths moved; direct repository consumers, generator inputs and CI filters migrated. Public commands/contracts unchanged. - Real Hopper/Ghidra, browser, or OS coverage: actual Linux Node Inspector locally. The native baseline matrix covers Linux x64/arm64, macOS x64/arm64 and Windows x64; hosted success is required before merge. - Package or release metadata impact: no dependencies, engine installation or version changes; test/fixture modules remain source-only. - Security, privacy, process, or containment review: final diff and exact import/path mapping reviewed. Heavy local checks ran serially with two-CPU affinity, reduced priority, 1-GiB heap and one test worker. No Windows disk writes or GUI mutation. ## Review checklist - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. A narrow startup follow-up observed 2843.98 ms and 424718336 bytes RSS on unchanged source. The ESM diagnostic counter varies with stderr delivery at the tools/list boundary (184/201 immediately, 546/410 after 200 ms in two identical runs); these diagnostic counts are not a stable import-graph or performance comparison. The exact mapped source-owner comparison remains the structural proof. No startup improvement is claimed. Main integration: merged the newly landed browser source-location and Android session fixes into this branch. The five static gates, fresh generated-document/build checks, and 153 cases in 11 files passed, including the new source-location CLI/MCP and decoder boundaries. The tool-count observation above belongs to the original frozen baseline; the upstream source-location capability adds a tool. The new merge commit requires a fresh complete CI run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:17:29 +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#2337
No description provided.