Commit Graph
2 Commits
Author SHA1 Message Date
morluto 264dcd5fee refactor(artifacts): break the artifacts-firmware and artifacts-gpu import 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.
2026-11-16 03:44:53 +08:00
morluto 76c71f0dbd refactor(verify): keep each counted guard's baseline in its own file (#11316)
Every counted-baseline change edited scripts/verify/architecture-guard-baselines.json, so PRs touching unrelated guards conflicted there. Each guard now keeps its baseline in scripts/verify/baselines/<guard-key>.json with paths sorted by code unit; --shrink-baselines rewrites, and deletes a guard's file when its last count is removed, and the guard rejects unsorted files and files that name no counted guard.
2026-11-15 11:14:59 -05:00