Skip to content

[repo-assist] Add regression test confirming square brackets are escaped in nupkg entries (#3906) - #4420

Open
github-actions[bot] wants to merge 1 commit into
masterfrom
repo-assist/fix-issue-3906-bracket-escape-test-dee11b6b93f7a4a9
Open

[repo-assist] Add regression test confirming square brackets are escaped in nupkg entries (#3906)#4420
github-actions[bot] wants to merge 1 commit into
masterfrom
repo-assist/fix-issue-3906-bracket-escape-test-dee11b6b93f7a4a9

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated contribution from Repo Assist, an automated AI assistant.

Relates to #3906 ("paket pack doesn't escape square brackets").

Investigation

I traced the packing pipeline in NupkgWriter.fs (ensureValidName, used by addEntryFromFile) and tested it directly against a file named file[0].txt. In the current codebase, this path already produces a correctly escaped zip entry name (file%5B0%5D.txt), not the unescaped file[0].txt reported in the issue. I could not find any git history since the issue was filed indicating a targeted fix, so this may have been resolved indirectly (e.g. via the Uri-based round-trip in ensureValidName), or the original repro used a different, older Paket version.

Since I can't rule out a repro path I haven't hit, I'm not claiming the issue is fully resolved — but I've added a regression test to lock in and document the current (correct) behavior, so any regression here would be caught immediately.

Change

  • New test tests/Paket.Tests/Packaging/NupkgWriterSpecs.fs: packs a folder containing file[0].txt via NupkgWriter.Write and asserts the resulting nupkg's zip entry is lib/net461/file%5B0%5D.txt (escaped), not the raw bracketed name.
  • Registered the new file in Paket.Tests.fsproj.

No production code changes — this is a pure test addition intended to give maintainers confidence and a safety net while they decide on the final disposition of #3906.

Test Status

  • dotnet test tests/Paket.Tests/Paket.Tests.fsproj --filter "FullyQualifiedName~NupkgWriter": Passed on net10.0 (1/1).
  • The net461 target aborted in this sandbox only because mono is not installed here (infrastructure limitation, unrelated to the change) — worth re-running in CI where mono is available.

I'll also leave a comment on #3906 summarizing this finding so maintainers can confirm whether the issue is fully closed or if there's another repro path to track down.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38

…nupkg entries

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme
dsyme marked this pull request as ready for review September 1, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants