Skip to content

fix(archive): preserve UTF-8 filenames for standard ZIP extractors - #416

Merged
StepenkoAnatoli merged 2 commits into
mainfrom
fix/issue-345-utf8-zip
Oct 14, 2026
Merged

StepenkoAnatoli merged 2 commits into
mainfrom
fix/issue-345-utf8-zip

Conversation

@StepenkoAnatoli

Copy link
Copy Markdown
Owner

ZIP entries previously stored UTF-8 filename bytes while declaring the legacy ZIP character set. Standard extractors could produce mojibake paths that disagreed with the package manifest. Both ZIP headers now declare UTF-8, preserving names such as docs/über-日本語.md.

Fixes #345

what changed: Set language encoding bit 11 in the local and central headers. Add header assertions and an independent Python extraction regression that checks the exact manifest path and file content.

why: Declare the encoding already used by the writer so ordinary extractors interpret filenames correctly. No alternative design was set aside.

what it touched: archive.mjs, audit/artifact-producer tests, architecture, changelog and the 1,845-test README inventory.

what you verified: Verified two expected regression failures before the fix. After refresh, 69 focused audit/artifact-producer checks passed with zero failures and two disclosed local unsupported symlink cases in 37.3 seconds; the documented local allowance produced exit 0 while retaining them, and CI blocks unsupported results. The normal full commit gate accepted 6adef63 at 12:50 UTC. That commit carries the accepted #364 dependency; after PR415 merged, synced current main b836e5b through the normal documentation gate in 5574f27. Its only delta from the full-tested source is the two reviewed workflow assets; all code/test blobs are unchanged. Final current-base GitHub CI follows before merge.

what you got wrong and fixed: nothing to report.

Fixes #345

what changed: Set language encoding bit 11 in the local and central ZIP headers. Added direct header assertions and a Python extraction regression proving a Unicode document lands under its manifest-declared path.

why: Names were UTF-8 bytes with an encoding flag declaring the legacy ZIP character set, so standard extractors produced mojibake names. Declare the existing encoding as APPNOTE requires. No alternative design was set aside.

what it touched: archive.mjs, audit and artifact-producer tests, architecture, changelog and research-kit README inventory. The existing reader and manifest format are unchanged.

what you verified: verified - red-first 65 passes, two expected failures and two unsupported local symlink tests; then 67 passes, zero failures and the same two unsupported capabilities. Python extraction preserved the exact Unicode path and content. Handoff OK, preflight PASS, doctor READY collector/firecrawl-cli in this checkout. After refresh onto merged main 82a02cb, focused audit/artifact-producer checks passed 69 tests with zero failures and two unsupported symlink cases in 37.3 seconds. The documented local allowance produced exit 0 while retaining those unsupported results; CI blocks unsupported cases. Advanced the patch to a6d6328, the locally accepted #364 fix in PR415 (not yet merged), to verify both remaining fixes together. All three staged code/test blobs match the focused-tested patch; the shared docs preserve that dependency and the 1,845-test inventory. The normal full commit gate runs before acceptance; final publication uses current main and GitHub CI before merge.

what you got wrong and fixed: nothing to report.
what changed: Carry main's reviewed workflow PNG and asset guide into the accepted ZIP fix before its final current-base PR checks.

why: The config dependency and public workflow assets have now landed. The ZIP fix already carries the original config-fix commit; this sync brings its ancestry up to current main.

what it touched: Only docs/assets/README.md and docs/assets/research-kit-workflow.png are added to the locally accepted 6adef63 tree. The UTF-8 ZIP implementation remains in its original task commit.

what you verified: verified - the normal full commit gate accepted 6adef63 with exit 0 at 12:50 UTC, after the independent Python extraction and header regressions passed in the 69-check focused run (two disclosed local unsupported symlink cases). Main b836e5b carries the config fix and workflow assets after their seven required CI jobs passed. The staged sync is guarded to exactly two documentation assets; every other source/test blob remains identical to the accepted tree. The normal documentation gate and final GitHub CI follow.

what you got wrong and fixed: nothing to report.
@StepenkoAnatoli
StepenkoAnatoli merged commit 54d899d into main Oct 14, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-345-utf8-zip branch October 14, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

archive.mjs writes UTF-8 names with the UTF-8 flag clear, so a non-ASCII file extracts under a mojibake name while manifest.json declares the real one

1 participant