Repository navigation
fix(artifacts): preserve archive entry types and host paths - #581
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
9 tasks done
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
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
Fix JavaScript analysis of archives containing directories such as
node_modules/@zip.js, and fix ASAR inventory/extraction on Windows. Directory and unknown-file inventory remains complete; these changes correct entry-type classification and provider path translation without adding filesystem permissions or scopes.Fixes #571
Fixes #570
Problem and expected behavior
Directory graph nodes have artifact IDs, so the JavaScript file projection previously treated any
.js,.json, or similar path as content to read. Opening a directory then aborted the whole analysis. Only regular-file occurrences now become parsing candidates or nested ASAR containers; directory nodes and their children remain evidence.Electron's ASAR library lists paths with the host separator and a leading separator, and requires host-relative lookup keys. REA stripped only
/, which left Windows lookup keys rooted and unreadable. The adapter now retains a host-relative key forstatFileandextractFileand exposes slash-separated logical paths. Literal backslashes in POSIX filenames are preserved.Change and scope
@zip.jsdirectory with an analyzableentry.jschild.Contract and boundary impact
Evidence and regression coverage
The regression builds an archive containing
node_modules/@zip.js/entry.js, proves the scope directory still has a graph node, and verifies that the child appears in the JavaScript asset graph. Reader tests pack real archives with the installed official@electron/asarimplementation and read their nested contents through REA.The path change was checked against the installed library's
listFiles,getFile,statFile, andextractFileimplementation. No module mocks replace the provider boundary.Validation performed
npm run check:pr— passed, 347 files and 1,957 tests passed with 1 skipped; static checks and generated-document checks passed.npm run check:fastand five focused files — passed, 42 tests covering ASAR inventory, JavaScript reconstruction, client dialect/lifecycle, and curated Windows lane registration.Compatibility, safety, and release
No breaking schema changes or added permissions. Non-file entries remain inventoried and regular files inside suffix-named directories remain analyzable. The separate doctor subprocess observation in #570 is outside this ASAR fix; the named
RuntimeExecutableDiagnosticsimplementation is absent from current source.Review checklist