Repository navigation
Conversation
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
[Medium impact] The PR appears safe to merge. SummaryMoves
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Reader binds expected SHA-256] --> B[Verify open file]
B --> C[Digest file bytes]
C --> D[Verify source again]
D --> E{Source and digest match?}
E -->|No| F[Report integrity failure]
E -->|Yes| G{Cancelled?}
G -->|Yes| H[Report cancellation]
G -->|No| I[Save verified digest]
Reviews (2) · Last reviewed commit: "refactor(resources): move the artifact f..." · Reviewed by Greptile |
morluto
merged commit Nov 15, 2026
8992872
into
refactor/stable-root-digest-resources
1 check passed
22 tasks
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
ArtifactFileSourceandartifactFileAdmissionFailurefrom the artifacts provider intosrc/resources(git mv), and exports them fromsrc/resources/index.ts:src/artifacts/ArtifactFileSource.ts(and its test) ->src/resources/ArtifactFileSource.ts;src/artifacts/ArtifactFileAdmission.ts->src/resources/ArtifactFileAdmission.ts.ArtifactFileSourcehashed its bound descriptor through the artifactshashReadable, which also ran the classification probe. It now uses the resources digest from #11445 (digestReadableToCompletion) directly and reads onlysha256, so it no longer depends on artifacts and no longer runs a classification probe it discarded.PlaywrightTraceDecoderimportedassertArtifactFileSelectedSourcefrom artifacts, sobrowser -> artifactsdrops from 5 to 4.Stacked on #11445. Third step of the ZIP half of #11426, after #11474 (
ArtifactReaderLimits) and #11475 (src/domain/zip): with this,ZipArtifactReader's remaining artifacts dependencies have owners below providers. Refs #11359. Part of plan W9.Problem and expected behavior
Shared archive readers (ZIP, Mach-O slices and others) bind their descriptor through an artifacts-provider class, so they could not leave the provider. Expected: the descriptor and hash binding lives with the other artifact file primitives in the shared provider toolkit.
Change and scope
hashReadablechecked the signal right after the last chunk. A cancellation in that window then preempted the source revalidation that follows. The new code keeps the completed digest, revalidates the source, and checks cancellation afterwards (the existingassertArtifactReadActiveafter binding). This is what the code comment there already required ("A completed digest needs source validation before late cancellation can decide the outcome"). Outcomes:tests/process-global/selectedArtifactSourceLifecycle.test.tsheld the late abort inside a spy onhashReadable. It now spies ondigestReadableToCompletion. Itsabort = truecase fails if the post-digest signal check is restored, because the abort then arrives before that check.resources/index.js. Duplicate imports from that entry are merged.resources, the moved files import their siblings directly, as the other resources modules do.Not included: the
ZipArtifactReadermove itself (next), andbrowser -> artifactsthroughElectronFileScope(ASAR) andSazCapture/PlaywrightTraceDecoder(ZIP reader).Contract and boundary impact
src/resources; hashing goes through the resources digest. Only the late-cancellation ordering described above changes.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.
Evidence and regression coverage
selectedArtifactSourceLifecycle.test.tsspies on the resources digest;ArtifactFileSource.test.tsmoves with the class.rejects selected pathname replacement after real hashing even with a late abort (true)failed (1 failed, 7 passed). It passes after the change.For boundary fixes, the applicable lifecycle regression is cancellation during final validation, covered by the test above.
Validation performed
npm run check:fast: passed, including the architecture guards.node scripts/verify-module-boundaries.mjs: passed after lowering the baseline.npm run test:focused --withsrc/resources/ArtifactFileSource.test.ts,tests/process-global/selectedArtifactSourceLifecycle.test.ts,src/artifacts/{ArtifactSourceResolution,FitArtifactReader,HexRecordArtifactReader,NtfsMftArtifactReader,ZipArtifactReader,MachOSliceArtifactReader}.test.tsandsrc/artifacts/{UnityFsArtifactReader,WxapkgArtifactReader}.boundaries.test.ts: 10 files, 186 tests passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.