Repository navigation
refactor(domain): move the Mach-O load command and binary plist readers into src/domain/apple - #11415
Merged
Merged
Conversation
…rs into src/domain/apple
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
[Low impact] The PR appears safe to merge; no actionable defects were found. SummaryMoves six Mach-O and plist readers into
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
Application["Application"] --> Plist["Domain: plist readers"]
Artifacts["Artifacts provider"] --> Plist
Artifacts --> MachO["Domain: Mach-O readers"]
Native["Native provider"] --> Plist
Native --> MachO
Electron["Electron provider"] --> MachO
Kuna["Kuna provider"] --> MachO
Plist --> Formats["Domain format declarations"]
MachO --> Formats
Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
# Conflicts: # src/native/hardening/MachoHardening.ts
…readers-domain # Conflicts: # src/artifacts/ReleaseExposureReader.ts # src/native/NativeMacOSProvider.ts
Merged
22 tasks
This was referenced Nov 15, 2026
Merged
Merged
11 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the pure Mach-O load command reader, the Mach-O encryption reader and the binary property list codecs from
src/artifacts/apple/intosrc/domain/apple/. These areMachoLoadCommandReader,MachoEncryptionReader,PlistScalars,BinaryPlistLayout,PropertyListDecodeBudgetandBinaryPlistMaterializer. The domain already holds the Mach-O and plist format declarations that these files implement. Native, Kuna and Electron then read Mach-O and binary plists without importing the artifacts provider.This is a pure move:
git mv, specifier rewrites, and renamed per-guard baseline keys. Part of plan W9. Refs #11359.Problem and expected behavior
native -> artifactswas the second-largest cross-provider pair (11 imports). Seven of those imports were these readers.MachoLoadCommandReaderfrom artifacts too.PropertyListDecodeBudgetandBinaryPlistMaterializerfrom the artifacts provider.MachoLoadCommandReadertakes an injectedReadAt. Their production imports are onlysrc/domainmodules, theplistpackage and each other.Expected: the format readers live with the format declarations they implement, and each provider that reads Mach-O or binary plists depends on the domain, not on another provider.
Owner choice: this PR picks
src/domain/apple/and notsrc/resources/, becausesrc/resourcesis the I/O toolkit (stable reads, scopes, leases) and these readers do no I/O.src/domain/apple/already holds similar pure decoders (keyedArchive,interfaceBuilderKeyedArchive,appleAssetCatalog), and #11331 makes the same call forBinaryContainerand the devicetree parser.Change and scope
git mvto camelCase names insrc/domain/apple/. The tests areplistScalars,binaryPlistMaterializerandpropertyListDecodeBudget's own unit tests where they import only domain code.src/artifacts/apple/, because they exercise artifact readers and the Mach-O image fixture, which the pure-layer rule does not allow fromsrc/domain:MachoLoadCommandReader.test.tsMachoEncryptionReader.test.tsPropertyListDecodeBudget.test.tsvi.mockpaths in two invariant tests are reformatted by oxfmt because the longer path wraps.scripts/verify/baselines/raw-buffer-read.json: 4 keys renamed. Counts are unchanged.tests/boundary/filesystem/appleXmlDeclarations.test.ts: the builtdist/path follows the move.Not included:
native -> artifactsimports:withArtifactTargetIdentity(2) andhashStableRootArtifact(1). They do I/O and belong with the stable-read toolkit insrc/resources(next slice).artifacts -> nativelipo edges.MachoImage.fixture.ts, which stays in artifacts.Contract and boundary impact
src/artifacts/apple/tosrc/domain/apple/, and the code is unchanged.docs/public/product-catalog.json), package, or installation impact: none. The built path ofpropertyListDecodeBudget.jschanges; only one test loads it by path.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
Tests added or updated: none added. The moved and importing tests (16 files) run unchanged apart from specifiers.
Base reproduction or other evidence: I applied this commit onto the provider boundary stack (refactor(architecture): add the ports and resources layers, move ports and shared resource owners there, and ratchet the layer baseline #11208) and ran
node scripts/verify-module-boundaries.mjs. The recorded counts drop:native -> artifacts: 11 to 3electron -> artifacts: 2 to 0kuna -> artifacts: 1 to 0entryimports into artifacts: 11 to 9Whichever of this PR and refactor(architecture): add the ports and resources layers, move ports and shared resource owners there, and ratchet the layer baseline #11208 lands second lowers those counts with
--shrink-layer-baseline. Onmainthe module layer baseline does not change.User-visible CLI/MCP output (if applicable): none.
Remaining proof gaps: none known.
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:fast: passed (typecheck, lint with module boundaries, architecture guards). The pre-push hook also passed.npm run test:focused -- <the 16 moved or rewritten test files>: 392 passed.npm run verify:test-discovery: all 3678 test files discovered exactly once.node scripts/verify-module-boundaries.mjs: passed. It reports two lowerable entries that already exist onmain(process -> artifactsandapplication <-> dotnet), which this PR does not cause.Compatibility, safety, and release
The move commit will be listed in
.git-blame-ignore-revsafter merge.Author readiness
Human owner:
Before merge
type(scope): outcome.