Skip to content

Keep both files in Download all when Windows treats their names as one - #457

Merged
abhishekgahlot2 merged 1 commit into
useagenthq:mainfrom
leninworld:windows-download-all-names
Nov 24, 2026
Merged

abhishekgahlot2 merged 1 commit into
useagenthq:mainfrom
leninworld:windows-download-all-names

Conversation

@leninworld

@leninworld leninworld commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #402

What changed

  • Download all compared names only by case and accent form, so two names that Windows treats as one file could both stay in the ZIP and one would overwrite the other on unzip.
  • The name comparison now also ignores trailing dots and spaces, and treats < > : " | ? * and _ as the same character, since unzip tools replace the characters Windows does not allow.
  • The ZIP still keeps each file's own spelling. Only the second name of a colliding pair gets the usual (2) suffix.

Testing

buildArtifactBundle with the pairs from the issue:

Names in Before After
report, report. report, report. (one file on Windows) report, report (2).
a:b.txt, a?b.txt a:b.txt, a?b.txt (both become a_b.txt) a:b.txt, a?b (2).txt
a_b.txt, a:b.txt a_b.txt, a:b.txt (both become a_b.txt) a_b.txt, a:b (2).txt
254 as, then 254 as + b the second is cut to 254 as + a trailing space, one file on Windows 254 as, 251 as + (2)
  • cd packages/artifact-formats && bun test: 46 pass, 0 fail. The four new tests fail on main (42 pass, 4 fail). One of them loops over all seven characters.
  • Removing the character rule, the trailing-dot rule, the trailing-space rule, or a single character such as * makes the matching test fail again.
  • bunx -p typescript@5.9.3 tsc --noEmit in packages/artifact-formats and bun test scripts/agent-docs.test.ts: pass.

Not checked: I have no Windows machine, so the result was not unzipped on Windows. An unzip tool that drops the invalid characters instead of replacing them, and reserved names such as CON, are not covered. I did not run the root bun run typecheck (it needs the frontend and backend installs) or backend/test/artifacts.test.ts (it needs a Postgres test database). The package API and types are unchanged.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Compare bundle names the way Windows resolves them: ignore trailing dots and spaces, and treat the characters Windows does not allow in a name like an underscore, since unzip tools replace them. The ZIP keeps each file's spelling; only the second name of a colliding pair gets a suffix.

Closes useagenthq#402
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@leninworld

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

I have read the CLA Document and I hereby sign the CLA

@leninworld

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@leninworld

Copy link
Copy Markdown
Contributor Author

recheck

github-actions Bot added a commit that referenced this pull request Nov 24, 2026
@abhishekgahlot2
abhishekgahlot2 merged commit 75ba1ff into useagenthq:main Nov 24, 2026
21 of 22 checks passed
@github-actions

Copy link
Copy Markdown

Thanks @leninworld, merged. Download all now keeps both files when Windows would treat their names as the same one.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep both files in Download all when Windows treats their names as one

2 participants