Repository navigation
feat(artifacts): name integrity checks for the remaining readers and their projections - #11098
Merged
morluto merged 1 commit intoNov 15, 2026
Conversation
…their projections
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 reviewed changes appear safe to merge; no actionable defects were found. SummaryThis PR names existing integrity failures and routes nine provider conversions through
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
Reader["Reader detects an existing failure"] --> Failure["ArtifactReaderFailure + integrityCheck"]
Failure --> Helper["readerIntegrityFailure + provider options"]
Helper --> Changed["AnalysisArtifactChangedError"]
Failure --> Translate["translateArtifactFailure"]
Translate --> Operation["ArtifactOperationError"]
Changed --> Public["Public error details.integrity_check"]
Operation --> Public
Reviews (2) · Last reviewed commit: "feat(artifacts): name integrity checks f..." · Reviewed by Greptile |
morluto
added a commit
that referenced
this pull request
Nov 15, 2026
…-exposure readers (#11056) * feat(artifacts): name integrity checks for DMG, directory and release-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. * fix(artifacts): name missing directory entry state and keep integrity checks through error copies * feat(artifacts): name integrity checks for ZIP, PyInstaller and changed release files (#11081) feat(artifacts): name integrity checks for ZIP, PyInstaller and changed release files, and keep them through reader projections * feat(artifacts): name integrity checks for the remaining readers and their projections (#11098)
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
Refs #10508 (Phase 6.1). Stacked on #11056. The Mach-O slice, iNES, FIT, safe output tree, JavaScript file, SQLite snapshot and inventory classify/scan readers raised
integrityfailures that only the message told apart, and nine provider projections rebuiltAnalysisArtifactChangedErrorby hand and dropped the check. Each of these readers now names the check, and every projection goes throughreaderIntegrityFailure.Problem and expected behavior
new AnalysisArtifactChangedError(…, cause.message, …)themselves, so a check the reader named never reached public output.Change and scope
declared-digest(FIT hash, container CRC, declared entry digest),layout-consistency(Mach-O structural index or lipo disagreement, slice or region range outside the artifact),reconstruction(iNES regions do not reassemble into the source),inventory-node(JavaScript reads a node or verified state the inventory lacks),output-readbackandoutput-lifecycle(safe output tree).foreign-entry/entry-metadata(Mach-O, iNES, FITopen),read-coverage,declared-size,member-identity(extracted or re-read bytes differ from inventory),container-identity(root, iNES source, SQLite file set and journal changed).readerIntegrityFailure(operation, path, failure, options?): options replace the default cause and add facts; the check always comes from the reader failure. Used by the nine projections above.AsarEntryStreamalready named all three of its checks; nothing left there.Not included: the readers listed under remaining proof gaps.
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
ArtifactReaderFailure.integrityCheckat the throw site;readerIntegrityFailure(StableArtifactFailure.ts) owns the projection toAnalysisArtifactChangedErrorand now takes provider options;ArtifactIntegrityCheckgains six valuesintegrityerrors carrydetails.integrity_check, with six new values (declared-digest,layout-consistency,reconstruction,inventory-node,output-readback,output-lifecycle). 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
integrityCheck:artifactInventoryRegularRoot,inesArtifact,artifactAdmittedIdentity(2),javascriptIntegrityPolicy,artifactProvider.machOSlices,ArtifactEmbeddedFormatProbes.test.ts;FitArtifactReader.test.tsalso asserts the check (it keeps the message regex because image, node and algorithm exist only in prose). Added:ArtifactOperationFailure.test.ts(helper keeps the check when a provider supplies its own cause and options) andGhidraProvider.behavior.test.ts(the Ghidra re-attribution keeps the check, with and without the launcher wrapper)integrityCheckfrom the Ghidra copy inGhidraProviderClient.tsfails the new direct-cause case (the launcher case goes throughanalysisClientFailureForOperationand was already covered); dropping...optionsfromreaderIntegrityFailurefails the new helper case{"code":"artifact_integrity_mismatch",…,"details":{"reason":"integrity","integrity_check":"container-identity",…}}for a root replaced after target admissionintegrityfailures (Bun, Deno, .NET bundle, positional, decoded region, uImage, UnityFS, wxapkg, Node SEA, PyInstaller CArchive/PYZ layout, dylib, keyed archive, asset catalog, artifact extraction,readStableArtifact,ArtifactFileSource, GPU/model sources,NativeMachoSource);ArtifactAnalysisResources.integrityChangedkeeps its own post-run message. Most of the newly named sites have no deterministic public CLI/MCP trigger (each needs a race or a corrupted layout), so they are checked through the reader tests listed aboveFor 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 --the nine converted/added test files: 425 passed, 1 skipped (base: 422 passed, 1 skipped). Warm wall/CPU (user+sys): 7.9 s / 13.4 s after, 7.2 s / 12.4 s beforenpm run test:focused -- src/application/environment/environmentBundleWrite.test.ts src/artifacts/MachOSliceArtifactReader.test.ts src/artifacts/SafeOutputTreeAdmission.test.ts src/browser/history/CaptureFailures.test.ts src/sqlite/SqliteDatabaseSnapshotLimits.test.ts tests/boundary/filesystem/safeOutputTree.test.ts tests/boundary/sqlite/sqliteDatabaseSnapshot.test.ts tests/boundary/providers/native/machoSliceReader.test.ts: 110 passed, 1 skippednpm run test:focused -- tests/boundary/android/androidMappingFile.test.ts tests/boundary/model/modelArtifact.test.ts tests/acceptance/gpuCodeObjectsCli.test.ts tests/boundary/providers/ghidra/ghidraFileFailure.test.ts tests/boundary/mcp/modelArtifactPartialReadFailure.test.ts: 180 passednpm run check:fast: passed;node scripts/verify/architecture-guards.mjs: passedcommand— resultCompatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.