Repository navigation
Conversation
The inventory stores each member under its NFC spelling for lookup, so a ZIP member named "café.txt" (decomposed) showed up only as "café.txt", with nothing in the Evidence that recovers the name the archive holds. Record that spelling as an occurrence limitation when NFC changes it, next to the existing note for a stripped "./" prefix. The check sits where occurrences are built, so it covers every reader. Fixes morluto#5108
Codex Review SummaryThis 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. |
[Medium impact] The PR appears safe to merge; no blocking issue was found. SummaryAdds a note to
Reviews (4) · Last reviewed commit: "Merge origin/main into fix/zip-nfc-membe..." · Reviewed by Greptile |
|
Verified |
Keep this branch's non-NFC member-name limitation beside main's new declared_integrity and format_metadata occurrence fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged latest What changed and why
Validation (local macOS, merged head)
|
|
Thanks for resolving the conflict and keeping the new |
|
TL;DR: The PR's new ZIP test passes on Node 22, 24 and 26 at head 9189099, and it fails on main's code, so it does test the fix. The new case is one test. Main fails it because the member's note is missing. #5127's test for the same issue fails on this head. It fails since it looks for #5127's own wording. That does not mean the spelling is lost. Results
Against main. I copied only this PR's test file into a tree of main. The one new test, "keeps a decomposed ZIP member name beside its NFC logical path", fails. The other six tests in the file pass. The failing check is the first one: The printout shows main's occurrence for #5127's test on this head. This is #5127's test, not this PR's. I took Line 40 is My earlier notes on #5127 are here. Which of the two PRs goes in is the maintainers' call. Not run
CommandsEach run used a fake HOME and npm cache under /tmp/rt-5125-t1 and Run in the head tree on Node 22.23.4, 24.22.1 and 26.12.1 (each exit 0), then in the main tree on Node 24.22.1 (exit 1). The main tree had only that test file replaced with the PR's copy. Run in the head tree on Node 24.22.1 (exit 1) with #5127's file copied in, then removed. Test setup
🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
There was a problem hiding this comment.
TL;DR: Main still drops the spelling of a ZIP member name that NFC normalization changes (issue #5108). This PR adds one note to that occurrence's limitations, and the ZIP test covers it. No test has run on GitHub for this head. Another open PR, #5127, fixes the same issue, and I tested that one.
Edit: This review is out of date at head d8b8f8c. The template parts are back, GitHub's CI has run, and main now keeps the original spelling in source_path. The newer notes are here.
Findings
Should fix
- The body does not keep the repo template as written. Please restore these parts:
- The "Follow the contribution scope" paragraph is cut short. The sentence about linking a maintainer scope decision for new providers is gone. So is the sentence about draft PRs.
- One part lost a line and its three boxes. The part is "Evidence and regression coverage". The line is "For evidence-bearing changes:".
- The text in parentheses on the "Generated metadata" label is dropped.
- Every other heading, label and box is there. The author readiness boxes are checked and the text is unchanged. The body adds a closing note about using Claude Code, which is fine.
Worth a look
- Another open PR fixes the same issue: #5127 by Varshith-Kali. They said on #5108 that they would take it (2026-10-18T22:13:11Z). This PR opened first (22:25:02Z, against 22:40:16Z for #5127). I tested #5127 on 20 Oct and re-read it on 23 Oct. Two points stayed open there: wording for folders and ZIP directory entries, and output size. Both are worth checking here too.
- Wording. The note says "Member name".
DirectoryArtifactReaderis also an artifact reader, and every reader's entries go throughcreateOccurrence. A folder on disk is not an archive member. I did not read what names that reader hands over, or run it. - Size. The note repeats the member's own path once, escaped. It does this on each occurrence that NFC changes (the new lines). #5127 repeated two paths. This one should add less, but I did not measure it. A long NFD folder name inside a big ASAR would show it.
- Which of the two PRs goes in is the maintainers' call. The two fixes differ in where they hook in and what the note says.
- Wording. The note says "Member name".
- No test has run on GitHub for this head. The
CIandPR titleruns areaction_required, so they never started. The checks that did run are green:Validate author declaration,Greptile ReviewandPR readiness. A maintainer has to approve the workflow run. I did not confirm why it is waiting. The body says 108 tests also fail in its container, on main and on the PR alike (release tooling that needsgitandzip). I did not check that. Thanks, kaoru0822-kitauji, for the focused run (43 passed on macOS, after the merge of main). - The new test checks only a top-level ZIP file. The body says the note "covers every archive reader, not only ZIP". That is true of where the code sits:
scanReader.tsline 212 hands every reader's entry tocreateOccurrence. But no test covers a ZIP directory entry, a member inside a nested container, or another reader.ArtifactGraphConstruction.test.tsalready builds entries forcreateOccurrencedirectly (main lines 78 to 95), so one more case there would be cheap.
Nits
- The note quotes only the raw member name. It does not say what the NFC spelling is. That is fine, since
logical_pathcarries it. The text "its logical path uses the NFC spelling" is the only pointer.
Looks good
- Main still has the bug.
createOccurrencebuildslimitations: [...entry.limitations]and nothing else (main line 120). A search for "Unicode NFC" acrosssrcfound nothing on main. - The check compares like with like.
scanReaderpasses the rawentryand the normalizedlogicalPath(main lines 195 to 215). Soentry.pathis the spelling the reader gave, and the PR tests it against its NFC form. - Identity does not change. The occurrence id still comes from the NFC path, and a name already in NFC gets no new note. The test checks that
plain.txthas an emptylimitationslist. - The test's fixture is genuinely decomposed. I checked the code points. The ZIP member has
ethen U+0301. The expectedlogical_pathhas U+00E9. The quoted name in the note hasethen U+0301. - It is a small diff: 2 files and 31 changed lines (compare API). Thanks to x1mm4nu3l for checking
inspect-artifacton Linux with both spellings in one ZIP. That was on the first commit, 6a965d1. They found distinct occurrence ids and a note only on the decomposed member. - Greptile scored the head 5/5 (last reviewed 9189099). Codex's review of the first commit failed, so no Codex findings exist for this PR.
Not run
- No checkout, build, tests or formatter.
- I did not run
inspect-artifacton any archive, and I did not measure output size. - I did not read
DirectoryArtifactReaderbeyond confirming that it is an artifact reader. - I did not apply the patch to today's main. GitHub reports it as mergeable.
Thanks, bercedev, for the small, careful fix and the clear body.
Test setup
🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
|
thanks for testing it on three Node versions and for the detailed read. I restored the template parts you listed: the full contribution scope paragraph, the full "Generated metadata" label, and the "For evidence-bearing changes" line with its boxes. on #5127: agreed, picking between the two is up to the maintainers. if this one is kept, I can add a |
baron
left a comment
There was a problem hiding this comment.
Integration with current main needs correction before this can move forward.
Merging this head into recorded main d361c53c504590b5ec90e9c690b5a2d6ae67cc38 succeeds textually but duplicates the logicalPathNfc import in src/artifacts/inventory/ArtifactGraphConstruction.ts (integration lines 15 and 17). On Node 24.22.1, both artifactZipRelativePaths.test.ts and ArtifactGraphConstruction.test.ts fail to transform with “Identifier logicalPathNfc has already been declared”; no tests execute. The same suites pass on the PR head (35 tests) and main (39 tests). Please reconcile the import against current main and rerun the affected suites on the combined tree.
Main also now retains original NFC-changed names in structured source_path; its existing retention regression passes. Please clarify whether the additional prose limitation is still wanted, or consider this superseded.
Required Static checks, Portable tests, and CI required are currently missing at this head. No real-provider or cross-platform verification was performed. This review is not merge permission.
|
sorry, closed this by accident, reopened. fixing the import conflict now. |
Drop the second logicalPathNfc import that the merge brought in.
|
merged current main (d361c53) in d8b8f8c and dropped the duplicate logicalPathNfc import. on the combined tree artifactZipRelativePaths.test.ts and ArtifactGraphConstruction.test.ts pass (40 tests), tsc --noEmit is clean, oxlint shows the same 4 warnings as main. on the limitation: source_path now keeps what the archive stores, the limitation only says why logical_path differs from it (NFC), like the ./ case already does. if source_path is enough for you I'm fine dropping it and closing this. |
|
TL;DR: The PR is the same as before, except one import line, and that fixes baron's duplicate-import point. But main now keeps the original spelling in Results
Main already keeps the name. Main's commit bbc7554 adds The PR's note now repeats the same name in words, plus the reason. baron asked whether the note is still wanted. bercedev answered that dropping it and closing is fine. I found no maintainer reply yet. Which way it goes is the maintainers' call. Not run
Thanks, bercedev, for the quick fix and the clear answers. What I checked (no tests)I read the PR's change and its base with A script compared the PR body with the template at Test setup🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
|
Thank you for identifying the lost archive-member spelling. Main now retains the original spelling in the structured |
Summary
Fixes #5108.
A ZIP member named
café.txt(decomposed) appeared in the inventory only ascafé.txt, and nothing in the Evidence kept the spelling the archive stores. The NFC logical path stays as it is; the member's own name is now recorded as an occurrence limitation when NFC changes it.Problem and expected behavior
normalizeArtifactPathapplies NFC to every member name when the inventory builds logical paths. That is intended, for lookup, but the source spelling was dropped. The ZIP reader already keeps the original name in a limitation when it strips a leading./; the NFC change had no equivalent. Expected (from the issue): keep the NFClogical_pathand retain the decoded member spelling when normalization changes it.Change and scope
createOccurrenceaddsMember name "<name>" is not in Unicode NFC; its logical path uses the NFC spelling.whenentry.pathdiffers from its NFC form. It is the one place occurrences are built from reader entries, so the note covers every archive reader, not only ZIP. Names already in NFC get no new limitation. Extraction output names are unchanged.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.
Ordinary fix within existing boundaries: not applicable.
Contract and boundary impact
createOccurrenceinsrc/artifacts/inventory/ArtifactGraphConstruction.ts), right afternormalizeArtifactPath.docs/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): none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
artifactZipRelativePaths.test.ts, a ZIP withcafé.txtandplain.txt: the first has logical pathcafé.txtand the new limitation, the second has no limitation.mainthe new test fails (no limitation on the decomposed member).inspect-artifact --json) was not run; checked through the inventory fixture. Other archive formats were not exercised separately.For evidence-bearing changes:
Validation performed
In a Node 24.18.0 container (with procps) and no network, after
npm ci:npx vitest run tests/boundary/filesystem src/artifacts src/domain: 6933 passed, 108 failed, 303 skipped. Onmain, with the new test, 109 failed; the extra failure is the new test, and the other 108 are the same in both runs (release/CI tooling tests that needgit,zipand similar tools absent from the container).npx tsc --noEmit: no errors.oxlinton the changed files: 4 warnings, 0 errors, the same 4 as onmain.oxfmt --checkon the changed files: clean.npm run verify:module-boundaries: passed.Compatibility, safety, and release
Author readiness
Human owner: @bercedev
Before merge
type(scope): outcome.Note: I used Claude Code while working on this.