Repository navigation
feat(artifacts): name integrity checks for DMG, directory and release-exposure readers - #11056
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. |
[Medium impact] The PR appears safe to merge; the remaining check-name gap is non-blocking.
|
7076e35 to
0a8118f
Compare
3337cc4 to
1255bff
Compare
0a8118f to
64b20fa
Compare
…-exposure readers Directory members and release-exposure members whose file identity or bytes changed since inventory report member-identity; a directory entry without captured state reports entry-metadata and a changed directory root container-identity; an hdiutil checksum failure reports image-checksum. AnalysisArtifactChangedError carries the check from the reader failure and projects it as details.integrity_check.
… checks through error copies
…ed release files (#11081) feat(artifacts): name integrity checks for ZIP, PyInstaller and changed release files, and keep them through reader projections
0f83cf5 to
6fc06dd
Compare
…their projections (#11098)
| cause instanceof RegularFileChangedError | ||
| ? new ArtifactReaderFailure("integrity", cause.message, { cause }) | ||
| ? new ArtifactReaderFailure("integrity", cause.message, { | ||
| cause, | ||
| integrityCheck, | ||
| }) | ||
| : cause; |
There was a problem hiding this comment.
Changed members lack check names
A disk member that changes during readDiskMember() can still produce an artifact_changed error without details.integrity_check. readStableArtifact() throws an unnamed ArtifactReaderFailure, but this branch only names RegularFileChangedError.
The new test misses this because it makes readStableArtifact() throw RegularFileChangedError, which its real checks do not produce. Cover the real stable-read failure and carry its member role through the error path without losing cleanup facts. This is non-blocking, but affected callers still have to read the message to identify the check.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/artifacts/ReleaseExposureReader.ts
Line: 3199-3204
Comment:
**Changed members lack check names**
A disk member that changes during `readDiskMember()` can still produce an `artifact_changed` error without `details.integrity_check`. `readStableArtifact()` throws an unnamed `ArtifactReaderFailure`, but this branch only names `RegularFileChangedError`.
The new test misses this because it makes `readStableArtifact()` throw `RegularFileChangedError`, which its real checks do not produce. Cover the real stable-read failure and carry its member role through the error path without losing cleanup facts. This is non-blocking, but affected callers still have to read the message to identify the check.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Refs #10508 (Phase 6.1). Stacked on #11052. The DMG, directory and release-exposure readers raised
integrityfailures that only the message told apart. They now name the check, and stable single-file reads (AnalysisArtifactChangedError) carry it to public output asdetails.integrity_check.Problem and expected behavior
artifact_changederror includes it.Change and scope
member-identity; entry without captured state →entry-metadata; root changed (integrity variant of the containment check) →container-identity.member-identity.image-checksum.AnalysisArtifactChangedError.integrityCheck, set byprojectOwnedArtifactIdentityFailureand the release-exposure reader, projected asdetails.integrity_check.Not included: the other readers' integrity failures (PE, ZIP, PyInstaller, …).
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
DirectoryArtifactReader,ReleaseExposureReader,NativeDmgArtifactReader(producers);AnalysisArtifactChangedError(carrier for stable single-file reads), built byprojectOwnedArtifactIdentityFailureand the release-exposure readerartifact_changederrors gaindetails.integrity_checkwhen the reader named the check;ArtifactIntegrityCheckgainsmember-identityandimage-checksum. Codes, categories and messages unchangeddocs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): noneExpected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
directoryArtifactReaderOpen.test.ts(2 message assertions →integrityCheck: "member-identity"),nativeDmgArtifactReader.test.ts(real hdiutil checksum failure assertsimage-checksum; diagnostic provenance assertions kept),ReleaseExposureReader.test.ts(changed ASAR member assertsdetails.integrity_check: "member-identity"throughprojectAnalysisError; keeps the member path){"code":"artifact_changed",…,"details":{"operation":"audit_release_exposure","path":"…","reason":"ASAR member changed before interpretation: dist/notes.txt","boundary":"stable-artifact-read","integrity_check":"member-identity"}}RegularFileChangedErrorconversion (asReadFailure) leaves the check unnamed because that error does not say which file changed. Only the DMG case ran against a real producer (hdiutil on macOS)For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
npm run test:focused -- src/artifacts/ReleaseExposureReader.test.ts tests/boundary/filesystem/directoryArtifactReaderOpen.test.ts tests/boundary/filesystem/directoryArtifactReaderOwnership.test.ts tests/boundary/providers/native/nativeDmgArtifactReader.test.ts tests/boundary/filesystem/desktopApplication.test.ts: 420 passed, 5 skipped (154 s wall incl. build;ReleaseExposureReader.test.tsalone 47 s)npm run check:fast: passedcommand— resultnpm run test:local -- src/domain/analysisErrorProjection.test.ts src/providers/AnalysisClientFailure.test.tspassed (117); reverting the redaction or re-attribution copy failed its new test.npm run test:focused -- tests/boundary/filesystem/directoryArtifactReaderOpen.test.tspassed (10), with the missing-state case now assertingentry-metadata.npm run check:fastpassed.npx oxfmt --check src testspassed;npm run check:fastpassed;npm run test:local -- src/artifacts/ReleaseExposureReader.test.ts src/artifacts/pyinstaller/PyInstallerBoundaries.test.ts src/domain/comparisonEvidenceResult.test.ts src/artifacts/ArtifactOperationFailure.test.ts src/domain/analysisErrorProjection.test.ts428 passed, 5 skipped. This PR now also carries feat(artifacts): name integrity checks for ZIP, PyInstaller and changed release files #11081 (ZIP/PyInstaller/release-file check names,readerIntegrityFailure, locatedreadEvidencePayloadcallers); see that PR for its scope and evidence.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.