Repository navigation
fix(artifacts): verify opaque bytes before reusing inventory identities - #779
Closed
rudycelekli wants to merge 1 commit into
Closed
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
Signed-off-by: Rudy Celekli <[email protected]>
Owner
|
Superseded by #815, which integrated this change and has now merged (3af3811). Thanks @rudycelekli for the fix and the thorough verification — much appreciated! |
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
Verify opaque ASAR/container and native-addon bytes before reusing their inventoried SHA/size during JavaScript reconstruction. Self-contained correctness regression; no separate issue linked.
Problem and expected behavior
Rebuilding an ASAR with changed non-JavaScript assets leaves its source text unchanged. Reconstruction previously accepted the stale container identity. Changed opaque
.nodebytes also bypassed verification because their text is intentionally not applicable. All projected inventory identities must describe bytes actually read.Change and scope
Stream and compare raw root/nested ASAR and opaque native-addon SHA/size against the existing inventory. Text omission remains unchanged. Normalize native filesystem-stream aborts through the existing typed cancellation guard; unrelated native IO errors retain their code for outer IO classification.
Contract and boundary impact
docs/product-catalog.json), package, or installation impact: none.Evidence and regression coverage
ABORT_ERR; the failing cancellation regression now returns typedcancelled.For evidence-bearing changes:
Validation performed
npm run check— 5 tasks successful, 125 existing warnings, zero errors.npm run check:fast— 2 tasks successful.git diff --check— passed; SSH signature and DCO verified. Reused exact Node24.18.0/Vitest5.0.3/TypeScript7.0.2 without dependency edits.Hosted full coverage tracked separately. External binary/browser provider verification is not applicable to passive local byte ingestion.
Compatibility, safety, and release
AI assistance: implemented and independently source reviewed with Codex on behalf of @rudycelekli before publication.
Review checklist
type(scope): outcome.