Skip to content

Minify test debug artifacts#3901

Merged
henrymercer merged 2 commits into
mainfrom
henrymercer/minify-test-debug-artifacts
May 14, 2026
Merged

Minify test debug artifacts#3901
henrymercer merged 2 commits into
mainfrom
henrymercer/minify-test-debug-artifacts

Conversation

@henrymercer
Copy link
Copy Markdown
Contributor

Quick win: minify the test debug artifacts to include only the TRAP file containing the secret. Preserve the zipped structure so the test is realistic, but remove the other files.

This reduces the size of the test debug artifacts from 1.14 MB to 22 KB on disk. The tarred checkout size decreases from 10.02 MB to 9.17 MB (-8.4%).

This does make it harder to ensure the scanner can scan artifacts in a reasonable amount of time, but the scanner isn't being changed much, and we will still do a full test in the PR checks. So the repo size saving seems worth the cost.

Copilot AI review requested due to automatic review settings May 14, 2026 13:50
@henrymercer henrymercer requested a review from a team as a code owner May 14, 2026 13:50
@github-actions github-actions Bot added the size/XS Should be very easy to review label May 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to reduce repository/test-fixture size by trimming the “debug artifacts” regression-test archive to only the minimal content needed to exercise token detection, and adjusts the corresponding artifact-scanner test execution conditions.

Changes:

  • Removes the CI/RUN_SLOW_TESTS gating for the “debug artifacts” token-scan regression test (it now runs on all non-Windows platforms).
  • Removes the explicit per-test timeout for that regression test.
  • (Per PR description) Minifies the debug-artifacts fixture while keeping the nested archive structure realistic.
Show a summary per file
File Description
src/artifact-scanner.test.ts Updates platform gating (and timeout handling) for the regression test that scans nested debug-artifact archives for tokens.

Copilot's findings

  • Files reviewed: 1/2 changed files
  • Comments generated: 1

Comment on lines +144 to 147
// `scanArchiveFile` does not support Windows, so we skip this test there.
if (os.platform() !== "win32") {
test("scanArtifactsForTokens finds token in debug artifacts", async (t) => {
t.timeout(15000); // 15 seconds
const messages: LoggedMessage[] = [];
Copy link
Copy Markdown
Member

@mbg mbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with one further suggestion and one question.

Comment thread src/artifact-scanner.test.ts
Comment thread src/artifact-scanner.test.ts
@henrymercer henrymercer enabled auto-merge May 14, 2026 14:07
@henrymercer henrymercer added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit 3368848 May 14, 2026
229 checks passed
@henrymercer henrymercer deleted the henrymercer/minify-test-debug-artifacts branch May 14, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Should be very easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants