Repository navigation
refactor(artifacts): move the PE resource reader into src/artifacts/pe - #11347
Merged
morluto merged 1 commit intoNov 15, 2026
Merged
Conversation
…artifacts/pe The Node SEA and Deno standalone readers in src/artifacts locate PE resources with the layout and parser that lived under src/native/pe, while those modules already read through src/artifacts (ArtifactReaderFailure, assertArtifactReadActive). Pure move: git mv plus import specifier, baseline key and spec path updates.
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 in the relocation. SummaryMoves the shared PE resource reader, test, and fixture from
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
NodeSea["NodeSeaLocation"] --> Parser["artifacts/pe/PeResourceParser"]
NodeSea --> Layout["artifacts/pe/PeResourceLayout"]
Deno["DenoStandaloneLocation"] --> Layout
Resources["native/pe/PeResourcesProvider"] --> Parser
Certificates["native/pe/PeCertificateParser"] --> Layout
Parser --> Layout
Parser --> Facts["artifacts/pe/PeResourceTreeFacts"]
Layout --> Facts
Reviews (2) · Last reviewed commit: "refactor(artifacts): move the PE resourc..." · Reviewed by Greptile |
19 tasks
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
…mport cycles (#11331) * refactor(domain): move BinaryContainer into src/domain BinaryContainer imports only domain modules and is shared by artifacts, firmware, gpu, go, il2cpp, python, rust and native. Living under src/native made artifacts and firmware import native for its failure types and BinaryReader. Pure move: git mv plus import specifier updates. * refactor(firmware): move the devicetree parser into src/domain/firmware The FIT artifact reader in src/artifacts parses embedded devicetree blobs with the parser that lived under src/firmware, while firmware's providers import src/artifacts: the two units imported each other. The parser and its fixture are pure and now sit beside domain/firmware/devicetree.ts. Pure move: git mv plus import specifier and baseline key updates. * refactor(artifacts): break the artifacts-gpu import cycle (#11335) * refactor(artifacts): move the LZ4 block decoder into src/artifacts Pure move: git mv plus import specifier updates. The next commit removes its GPU-specific budget. * refactor(artifacts): take the LZ4 output budget from the caller decodeLz4Block bounded every decode by the GPU object budget and threw through rejectGpu, so UnityFS decoding in src/artifacts imported src/gpu while gpu imports artifacts. Callers now pass their budget: GPU payloads keep GPU_OBJECT_BYTES; UnityFS passes its 64 MiB block bound, which its size checks already enforce before decoding. Malformed blocks still throw BinaryFormatFailure with the same messages. * test(architecture): drop the artifacts-firmware and artifacts-gpu cycles from the layer baseline * refactor(artifacts): move the PE resource reader into src/artifacts/pe (#11347) refactor(artifacts): move the PE resource layout and parser into src/artifacts/pe The Node SEA and Deno standalone readers in src/artifacts locate PE resources with the layout and parser that lived under src/native/pe, while those modules already read through src/artifacts (ArtifactReaderFailure, assertArtifactReadActive). Pure move: git mv plus import specifier, baseline key and spec path updates.
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 PE resource layout, parser and tree facts (with their test and fixture) from
src/native/pe/tosrc/artifacts/pe/. Pure move. It removes three of the fiveartifacts -> nativeimports; the remaining two (MachOSliceArtifactReaderrunninglipothroughnative/CommandRunner) need a port and are a follow-up. Part of plan W9 (layer enforcement); stacked on #11331.Problem and expected behavior
src/artifacts/nodeSea/NodeSeaLocation.tsandsrc/artifacts/deno/DenoStandaloneLocation.tslocate embedded payloads withPeResourceLayout/PeResourceParserfromsrc/native/pe/, while the native providers read targets throughsrc/artifacts/. The moved modules already depend only on domain modules andsrc/artifacts/(ArtifactReaderFailure,assertArtifactReadActive), so they are artifact readers by their dependencies. Expected: the shared PE resource reader lives in the shared artifact layer, the native PE resources provider and certificate parser import it from there, and behaviour is unchanged.Change and scope
PeResourceLayout.ts,PeResourceParser.ts,PeResourceTreeFacts.ts,PeResourceParser.test.ts,PeResources.fixture.tstosrc/artifacts/pe/withgit mv; specifier rewrites in 22 files; threeraw-buffer-readbaseline keys renamed (counts unchanged); the path indocs/specs/artifacts/deno-standalone/plan.md.Not included: the
lipodependency ofMachOSliceArtifactReader(needs a port supplied by composition), soartifacts <-> nativestays recorded.Contribution scope: maintainer-approved W9 approach; no new capability.
Contract and boundary impact
docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
No target interaction changes: module locations only.
Evidence and regression coverage
resolveModuleImports) lists onlyMachOSliceArtifactReader.ts -> native/CommandRunner.tsand-> native/parsers/lipo.tsasartifacts -> nativeafter the change (before: alsoDenoStandaloneLocation.ts -> PeResourceLayout.tsandNodeSeaLocation.ts -> PeResourceParser.ts,-> PeResourceLayout.ts).Validation performed
npm run check:fast(typecheck, lint, module boundaries, architecture guards) — passed.npm run test:local -- src/artifacts/pe/PeResourceParser.test.ts src/artifacts/NodeSeaArtifactReader.test.ts src/artifacts/deno/DenoStandaloneArtifactReader.test.ts src/native/pe/PeResourcesProvider.test.ts— 203 passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.