[PR #952] [MERGED] refactor(apple): group artifact producers and verification #2528

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

📋 Pull Request Information

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

Base: main ← Head: refactor/apple-artifact-capability-owner


📝 Commits (3)

  • 6d0d1f4 refactor(apple): group artifact producers and verification
  • 67316c2 test(apple): run affected native plist CLI regressions
  • 1688624 chore: integrate current Apple fixes during ownership migration

📊 Changes

50 files changed (+149 additions, -92 deletions)

View changed files

📝 .github/workflows/ci.yml (+1 -1)
📝 docs/capability-migration.md (+29 -0)
📝 docs/testing.md (+6 -0)
📝 package.json (+5 -5)
📝 scripts/fixtures/apple/macos-bundle.mjs (+0 -0)
📝 scripts/lib/module-boundaries.mjs (+1 -0)
📝 scripts/verify/apple/asset-catalog.mjs (+6 -3)
📝 scripts/verify/apple/dispatch.mjs (+3 -3)
📝 scripts/verify/apple/interface-builder.mjs (+3 -3)
📝 scripts/verify/apple/keyed-archive.mjs (+4 -4)
📝 scripts/verify/apple/macos-bundle.mjs (+2 -2)
📝 src/application/NativeUiActionTrace.ts (+1 -1)
📝 src/application/apple/AppleApplicationService.ts (+6 -6)
📝 src/artifacts/ArtifactProvider.ts (+4 -4)
📝 src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts (+0 -0)
📝 src/artifacts/apple/AppleAssetCatalogAnalysis.ts (+6 -6)
📝 src/artifacts/apple/InterfaceBuilderAnalysis.ts (+7 -10)
📝 src/artifacts/apple/KeyedArchiveReader.test.ts (+0 -0)
📝 src/artifacts/apple/KeyedArchiveReader.ts (+6 -6)
📝 src/artifacts/apple/NibArchive.fixture.ts (+0 -0)

...and 30 more files

📄 Description

Summary

Group Apple artifact producer code, pure semantics and Evidence workflows under their actual owners. ArtifactProvider previously called application-layer helpers that owned assetutil, directory reads and NIB/plist decoding; those producer helpers now live in artifacts/apple. Related to #740.

Problem and expected behavior

Apple facts and verifier entrypoints were scattered, and producer acquisition/native-tool behavior sat in the application layer. Maintainers should find the producer boundary separately from pure Apple semantics and shared inventory Evidence projection, with existing CLI/MCP behavior and cleanup preserved.

Change and scope

  • Group 11 pure Apple domain files under domain/apple; retain the shared Apple inventory projection workflow under application/apple.
  • Group archive/NIB decoders and move the five producer/helper/test files from application into artifacts/apple. Preserve ArtifactProvider's existing typed boundary, injected assetutil seam and reader cleanup.
  • Group five real Apple verifier entrypoints under scripts/verify/apple and the macOS bundle fixture builder under scripts/fixtures/apple. Keep npm command names and existing format-specific fixture/golden locations.
  • Update imports, compiled references, fixture URLs, generated-document cache inputs and ownership documentation; guard the migrated producer owner against application/composition/caller dependencies.
  • Include the existing prototype-key and selection-failure plist CLI regressions in the same Apple job, covering seven affected macOS cases that the previous lane omitted. No new runner or job.

Contract and boundary impact

  • Semantic owner and earliest changed stage: internal source ownership and producer dependency placement; original function bodies remain unchanged.
  • CLI and MCP/tool-catalog contract: named contracts, handler binding and complete inventory unchanged; shared cross-domain contract aggregates retain their owners.
  • Provider, bridge, target-format, or platform compatibility: existing artifact analysis port and producer representation; no new provider interface or platform claim.
  • Evidence, artifact, provenance, or reconstruction contract: preserve identities, source ranges, raw producer metadata, unknowns, fixture bytes and failure reasons.
  • Process execution, authorization, cleanup, or containment impact: existing acquisition, assetutil invocation and owned reader/DMG cleanup unchanged.
  • Generated metadata, package, or installation impact: catalog and managed commitments remain byte-identical; internal paths change together, no dependency/version/installer change.

Evidence and regression coverage

  • Tests updated: original moved tests/imports and five producer dependency checks. Two helper tests now use the existing forked adapter project rather than the service project.

  • Base comparison: exact AST body, import-owner and file-URL review passed for 43 affected TypeScript/MJS modules against the frozen integration baseline.

  • User-visible CLI/MCP output: actual artifact inventory, archive encoding, Apple graph projection, Evidence and canonical/reordered SDK contract presentation retain their existing results.

  • Remaining proof gaps: the 21 locally skipped macOS cases now passed in the actual macOS 15 lane, within 28 cases across five suites. Real archive/asset/dispatch/bundle verifiers also passed. Native installed-package/Inspector baselines also passed on Linux/macOS x64/arm64 and Windows x64.

  • 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

  • All 26 checks passed at final head 16886249, including both macOS architectures, real Apple, Windows, browser/recovery and generated documents. Current-main integration preserves the complete upstream chained-fixup verifier and bridge-root/framework fixes.
  • npm run check -- --output-logs=errors-only: all five static gates passed.
  • npm run docs:check and npm run build:cached: fresh generated/build checks passed; 13 new compiled owners present, old paths absent, nine source test/fixture outputs excluded.
  • Exact focused Vitest selection: 247 cases passed across 34 selected suites after integration, with 21 macOS cases skipped; actual CLI/MCP, SDK schema dialects/examples and module guards included.
  • npm run verify:test-discovery: all 539 files discovered exactly once.
  • Real macOS 15 Apple CI: all five relocated verifier entrypoints passed; native NIB/bundle suites passed 14 cases and native plist CLI suites passed 14 cases, including all seven newly selected regressions.
  • Installed Turbo 2.11.7 dry-run inspection: all six relocated verifier/fixture runtime scripts appear in document-check inputs. Version-matched configuration guidance was followed.
  • npm run verify:package: installed CLI/MCP, inventory/analysis/Evidence workflows, configuration backups/recovery, lifecycle and update passed; 131 tools and six prompts. No owned descendants remained and the verifier tarball was cleaned. Sampled MCP peak RSS: 366120960 bytes; observed tools/list startup: 2301.28 ms, without a comparative performance claim.

Compatibility, safety, and release

  • Breaking changes or migration steps: internal imports and verifier/fixture paths move together; public npm commands and product contracts remain stable.
  • Real Hopper/Ghidra, browser, or OS coverage: no fresh local proprietary-engine claim; Linux format/boundary checks and actual CLI/MCP, with real Apple/native CI required before merge.
  • Package or release metadata impact: no dependencies or version changes; generated commitments remain unchanged.
  • Security, privacy, process, or containment review: final path/body and lifecycle review; bounded serial local lanes on two CPUs, one worker and one-GiB heap. No Windows disk writes or user GUI changes.

Review checklist

  • One coherent capability outcome and Conventional Commit title.
  • Tracking issue linked.
  • Tests cover producer boundaries and moved caller paths.
  • Ownership docs and generated-document inputs updated.
  • User-visible CLI/MCP and SDK presentation verified.
  • Final diff checked for secrets and unrelated changes.

🔄 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/952 **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/apple-artifact-capability-owner` --- ### 📝 Commits (3) - [`6d0d1f4`](https://github.com/morluto/rea/commit/6d0d1f4da738e08f30c98d65a985bc6fe4fd4d4f) refactor(apple): group artifact producers and verification - [`67316c2`](https://github.com/morluto/rea/commit/67316c2d4af291a2abdeb1564b6cf69dd89d353d) test(apple): run affected native plist CLI regressions - [`1688624`](https://github.com/morluto/rea/commit/168862490591056f4f843d527afd1c360c557238) chore: integrate current Apple fixes during ownership migration ### 📊 Changes **50 files changed** (+149 additions, -92 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+1 -1) 📝 `docs/capability-migration.md` (+29 -0) 📝 `docs/testing.md` (+6 -0) 📝 `package.json` (+5 -5) 📝 `scripts/fixtures/apple/macos-bundle.mjs` (+0 -0) 📝 `scripts/lib/module-boundaries.mjs` (+1 -0) 📝 `scripts/verify/apple/asset-catalog.mjs` (+6 -3) 📝 `scripts/verify/apple/dispatch.mjs` (+3 -3) 📝 `scripts/verify/apple/interface-builder.mjs` (+3 -3) 📝 `scripts/verify/apple/keyed-archive.mjs` (+4 -4) 📝 `scripts/verify/apple/macos-bundle.mjs` (+2 -2) 📝 `src/application/NativeUiActionTrace.ts` (+1 -1) 📝 `src/application/apple/AppleApplicationService.ts` (+6 -6) 📝 `src/artifacts/ArtifactProvider.ts` (+4 -4) 📝 `src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts` (+0 -0) 📝 `src/artifacts/apple/AppleAssetCatalogAnalysis.ts` (+6 -6) 📝 `src/artifacts/apple/InterfaceBuilderAnalysis.ts` (+7 -10) 📝 `src/artifacts/apple/KeyedArchiveReader.test.ts` (+0 -0) 📝 `src/artifacts/apple/KeyedArchiveReader.ts` (+6 -6) 📝 `src/artifacts/apple/NibArchive.fixture.ts` (+0 -0) _...and 30 more files_ </details> ### 📄 Description ## Summary Group Apple artifact producer code, pure semantics and Evidence workflows under their actual owners. ArtifactProvider previously called application-layer helpers that owned assetutil, directory reads and NIB/plist decoding; those producer helpers now live in `artifacts/apple`. Related to #740. ## Problem and expected behavior Apple facts and verifier entrypoints were scattered, and producer acquisition/native-tool behavior sat in the application layer. Maintainers should find the producer boundary separately from pure Apple semantics and shared inventory Evidence projection, with existing CLI/MCP behavior and cleanup preserved. ## Change and scope - Group 11 pure Apple domain files under `domain/apple`; retain the shared Apple inventory projection workflow under `application/apple`. - Group archive/NIB decoders and move the five producer/helper/test files from application into `artifacts/apple`. Preserve ArtifactProvider's existing typed boundary, injected assetutil seam and reader cleanup. - Group five real Apple verifier entrypoints under `scripts/verify/apple` and the macOS bundle fixture builder under `scripts/fixtures/apple`. Keep npm command names and existing format-specific fixture/golden locations. - Update imports, compiled references, fixture URLs, generated-document cache inputs and ownership documentation; guard the migrated producer owner against application/composition/caller dependencies. - Include the existing prototype-key and selection-failure plist CLI regressions in the same Apple job, covering seven affected macOS cases that the previous lane omitted. No new runner or job. ## Contract and boundary impact - Semantic owner and earliest changed stage: internal source ownership and producer dependency placement; original function bodies remain unchanged. - CLI and MCP/tool-catalog contract: named contracts, handler binding and complete inventory unchanged; shared cross-domain contract aggregates retain their owners. - Provider, bridge, target-format, or platform compatibility: existing artifact analysis port and producer representation; no new provider interface or platform claim. - Evidence, artifact, provenance, or reconstruction contract: preserve identities, source ranges, raw producer metadata, unknowns, fixture bytes and failure reasons. - Process execution, authorization, cleanup, or containment impact: existing acquisition, assetutil invocation and owned reader/DMG cleanup unchanged. - Generated metadata, package, or installation impact: catalog and managed commitments remain byte-identical; internal paths change together, no dependency/version/installer change. ## Evidence and regression coverage - Tests updated: original moved tests/imports and five producer dependency checks. Two helper tests now use the existing forked adapter project rather than the service project. - Base comparison: exact AST body, import-owner and file-URL review passed for 43 affected TypeScript/MJS modules against the frozen integration baseline. - User-visible CLI/MCP output: actual artifact inventory, archive encoding, Apple graph projection, Evidence and canonical/reordered SDK contract presentation retain their existing results. - Remaining proof gaps: the 21 locally skipped macOS cases now passed in the actual macOS 15 lane, within 28 cases across five suites. Real archive/asset/dispatch/bundle verifiers also passed. Native installed-package/Inspector baselines also passed on Linux/macOS x64/arm64 and Windows x64. - [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 - All 26 checks passed at final head 16886249, including both macOS architectures, real Apple, Windows, browser/recovery and generated documents. Current-main integration preserves the complete upstream chained-fixup verifier and bridge-root/framework fixes. - `npm run check -- --output-logs=errors-only`: all five static gates passed. - `npm run docs:check` and `npm run build:cached`: fresh generated/build checks passed; 13 new compiled owners present, old paths absent, nine source test/fixture outputs excluded. - Exact focused Vitest selection: 247 cases passed across 34 selected suites after integration, with 21 macOS cases skipped; actual CLI/MCP, SDK schema dialects/examples and module guards included. - `npm run verify:test-discovery`: all 539 files discovered exactly once. - Real macOS 15 Apple CI: all five relocated verifier entrypoints passed; native NIB/bundle suites passed 14 cases and native plist CLI suites passed 14 cases, including all seven newly selected regressions. - Installed Turbo 2.11.7 dry-run inspection: all six relocated verifier/fixture runtime scripts appear in document-check inputs. Version-matched configuration guidance was followed. - `npm run verify:package`: installed CLI/MCP, inventory/analysis/Evidence workflows, configuration backups/recovery, lifecycle and update passed; 131 tools and six prompts. No owned descendants remained and the verifier tarball was cleaned. Sampled MCP peak RSS: 366120960 bytes; observed tools/list startup: 2301.28 ms, without a comparative performance claim. ## Compatibility, safety, and release - Breaking changes or migration steps: internal imports and verifier/fixture paths move together; public npm commands and product contracts remain stable. - Real Hopper/Ghidra, browser, or OS coverage: no fresh local proprietary-engine claim; Linux format/boundary checks and actual CLI/MCP, with real Apple/native CI required before merge. - Package or release metadata impact: no dependencies or version changes; generated commitments remain unchanged. - Security, privacy, process, or containment review: final path/body and lifecycle review; bounded serial local lanes on two CPUs, one worker and one-GiB heap. No Windows disk writes or user GUI changes. ## Review checklist - [x] One coherent capability outcome and Conventional Commit title. - [x] Tracking issue linked. - [x] Tests cover producer boundaries and moved caller paths. - [x] Ownership docs and generated-document inputs updated. - [x] User-visible CLI/MCP and SDK presentation verified. - [x] Final diff checked for secrets and unrelated changes. --- <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:11 +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#2528
No description provided.