Skip to content

test: shrink GitHub archive file-count fixtures - #4670

Merged
dgageot merged 1 commit into
mainfrom
test/github-archive-file-limit
Oct 20, 2026
Merged

dgageot merged 1 commit into
mainfrom
test/github-archive-file-limit

Conversation

@dgageot

@dgageot dgageot commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Replace the 4,097-entry file-count overflow fixture with two small, real tar/gzip extraction cases: three files accepted and a fourth rejected.

  • Keep production extraction at the unchanged 4,096-file limit through the existing wrapper.
  • Pass the file-count limit by value to an internal helper; no mutable global or public configuration.
  • Verify directories and unselected files do not consume the limit, preserve extracted content, and confirm the overflow file is never written.
  • Leave byte-size, expansion, unsafe-path, and snapshot tests unchanged.

Implements the archive-test finding from #4664; separate from #4669.

Hosted measurements

CI run passed, including Windows, Linux, lint, cross-compilation, gate, and CodeQL.

TestGitHubArchiveLimits/file_count now takes 0.01s on Windows and 0.01s on Linux. Earlier normal Windows CI measurements were around 42s for the 4,096 real file writes/deletions. These are test timings, not a claim about equivalent whole-job savings.

Validation

  • task build
  • task test
  • task lint
  • go test -count=1 -json ./pkg/skills -run '^TestGitHub'
  • go test -race -count=1 ./pkg/skills
  • Reviewer checked unchanged production behavior and boundary coverage

Cryptographically signed and DCO-signed commit.

Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot
dgageot marked this pull request as ready for review October 20, 2026 10:17
@dgageot
dgageot requested a review from a team as a code owner October 20, 2026 10:17
@aheritier aheritier added area/skills Skills system and custom slash commands kind/test Test-only changes labels Oct 20, 2026
@dgageot
dgageot added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 130df20 Oct 20, 2026
16 checks passed
@dgageot
dgageot deleted the test/github-archive-file-limit branch October 20, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/skills Skills system and custom slash commands kind/test Test-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants