Repository navigation
fix(artifacts): resolve parents after archive enumeration - #578
Merged
morluto merged 1 commit intoOct 5, 2026
Merged
Conversation
Collaborator
Author
|
@codex review |
9 tasks done
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
Resolve artifact containment after reader enumeration so ZIP members can precede their directory entries without corrupting parent relationships or virtual-directory identities.
No tracking issue: found with a valid three-entry ZIP during boundary testing; no matching open issue or PR was found.
Problem and expected behavior
A ZIP ordered
pkg/sub/data.txt,pkg/sub/,pkg/previously attached all three occurrences to the archive root. Both nonempty directories received the empty-directory identity, andinspect-artifactexposed incorrectcontainsrelationships while reporting complete substep coverage.Archive member order must not determine the nearest represented directory parent. With the fix, the same bytes produce
root → pkg → pkg/sub → data.txt.Change and scope
Resolve occurrence parents against the complete path index after enumeration, before virtual-directory materialization. Per-entry path registration, hashing, safety limits, archive validation, and reader cleanup remain in place.
Missing directory entries are not synthesized. The existing nearest-directory policy and nested-ASAR containment semantics are unchanged. Separate implicit-path identity behavior is outside this fix.
Contract and boundary impact
Evidence and regression coverage
bb91abd, the two new regression files produce 8 failures and 8 passing controls. The focused fixed matrix including existing archive safety and ASAR freshness tests passes 25/25.Evidence review:
Validation performed
bb91abd, including fix(javascript): prefer package entrypoints over directory indexes #575 and fix(javascript): preserve literal CommonJS path punctuation #576.npm run check:pr: static checks passed; 1,855 tests passed, 1 skipped, 40 failed in seven native bridge/lease suites because this sandbox denies Unix-domain socket listening (EPERM). The same seven suites on unchangedbb91abdreproduce 40 failures / 22 passes. This is not a full local test-suite pass.npm run docs:check: passed separately because the full-test failure short-circuits this step incheck:pr.npm run check:ci: passed.npm_config_cache=/tmp/rea-npm-cache npm run verify:package: passed, including packaged CLI/MCP checks; cache override was needed for this environment.npm pack --dry-run --cache /tmp/rea-npm-cache: passed.inspect-artifact <child-first.zip> --format jsonand stdio MCPopen_binary+inspect_artifact: passed.git diff --check: passed.Compatibility, safety, and release
Review checklist