Minify test debug artifacts#3901
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_TESTSgating 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[] = []; |
mbg
approved these changes
May 14, 2026
Member
mbg
left a comment
There was a problem hiding this comment.
LGTM, with one further suggestion and one question.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.