Repository navigation
Conversation
Collaborator
Author
|
@codex review |
This was referenced Oct 5, 2026
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
Preserve the complete child path relative to its represented directory when computing virtual-directory identities.
No tracking issue: found during real ZIP inventory/comparison testing; no matching open issue or PR was found.
Problem and expected behavior
A ZIP containing
pkg/andpkg/a/data.txt, without an explicitpkg/a/entry, attaches the file to the nearest represented directorypkg. The directory hash previously retained onlydata.txt:atobwith identical file bytes leftpkg's verified artifact ID unchanged.compare_artifactsstill reported the file removed/added and archive root changed, but incorrectly countedpkgunchanged.a/data.txt=Aandb/data.txt=B, reversing the two file entries changedpkg's identity and produced a spurious directory change.Change and scope
Use the observed path relative to the represented directory as the existing child-name hash/sort key. This retains missing intermediate path components without synthesizing directory occurrences.
The hash shape and immediate-child names are unchanged. Empty and fully represented directory trees retain their exact existing identities; moving a directory and its contents together remains identity-neutral. Affected directory identities and ancestors change where omitted path components were previously lost.
This is not a general archive-ordering or collation overhaul: the existing
localeComparecomparator is retained, including pre-existing equal-collation behavior for distinct unusual names. Late-directory parenting is handled separately in #578. Nested-ASAR parent selection is also unchanged.Contract and boundary impact
Evidence and regression coverage
Six real ZIP cases cover implicit-path rename, reversed equal-basename entries, direct/implicit directory relocation, exact pre-fix IDs for ordinary immediate children and empty directories, and nested explicit-directory compatibility.
On unchanged main
b225b0f, the two defect regressions fail and four compatibility controls pass. The fixed branch passes all six.Executed the built
inspect-artifact <zip> --format jsonCLI for four fixtures and passed its unmodified inventory Evidence into the production comparison:pkgis changed;pkgand both files remain unchanged.Independent review found no blocker within this bounded scope.
Validation performed
b225b0f; focused regressions also reproduced on that unchanged base.npm run check:pr: static checks passed; 1,851 tests passed, 1 skipped, 40 failed across seven native bridge/lease suites due to sandbox Unix-domain socketlisten EPERM. The same seven suites on unchangedb225b0freproduce 40 failures / 22 passes. This is not a full local test-suite pass.npm run docs:check: passed separately because full-test failures short-circuit this step.npm run check:ci: passed.npm_config_cache=/tmp/rea-npm-cache npm run verify:package: passed, including packaged CLI/MCP checks.npm pack --dry-run --cache /tmp/rea-npm-cache: passed.git diff --check: passed.Compatibility, safety, and release
No schema, hash-envelope, dependency, or release-metadata changes. Exact legacy identity controls guard unaffected directories. Corrected IDs for omitted-path cases are intentional; no migration command is required.
Real Hopper/Ghidra and native macOS/Windows verification was not run locally. No archive safety, process, authorization, or containment policy is weakened.
Review checklist