GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Tests: Run slow `scanArtifactsForTokens` test in CI only by default by henrymercer · Pull Request #3874 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented May 6, 2026

Copy link
Copy Markdown
Contributor

The "scanArtifactsForTokens finds token in debug artifacts" test takes 4.7 seconds to complete on my machine. Run it in CI only by default.

Here's proof that it actually runs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer
Tests: Run slow scanArtifactsForTokens test in CI only by default
2c9cd77
@henrymercer
henrymercer requested a review from a team as a code owner May 6, 2026 17:47
Copilot AI review requested due to automatic review settings May 6, 2026 17:47
@github-actions github-actions Bot added the size/XS Should be very easy to review label May 6, 2026
Copilot started reviewing on behalf of henrymercer May 6, 2026 17:48
View session
Copilot AI reviewed May 6, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the artifact-scanner test suite to avoid running an expensive zip-extraction/token-scan test during typical local runs, while still exercising it in CI to preserve coverage of the regression scenario.

Changes:

  • Adds an environment-gated condition so the slow “scanArtifactsForTokens finds token in debug artifacts” test runs by default only in CI.
  • Introduces a local opt-in mechanism via RUN_SLOW_TESTS=1.
  • Documents the rationale for the gating inline in the test file.
Show a summary per file
File Description
src/artifact-scanner.test.ts Gates the slow artifact-scanning regression test to CI by default with a local opt-in environment variable.

Copilot's findings

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mbg
mbg reviewed May 7, 2026
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Just a question about why this also changes the test to not run on Windows, given that it would only run in CI.

Aside from that, it makes sense to me to only run this in CI.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/artifact-scanner.test.ts
// This test is slow (extracts and scans a zip artifact), so by default we only run it in CI. Set
// RUN_SLOW_TESTS=1 to run it locally.
if (
os.platform() !== "win32" &&

@mbg mbg May 7, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

If we are only running this test in CI, why not also run it on Windows? Given the nature of the function being tested, it seems like we could easily miss a Windows-specific problem.

If there is a good reason why we aren't running it on Windows, it would be good if the comment noted it and explained why.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@henrymercer henrymercer May 7, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The artifact scanner isn't compatible with Windows — it's only used in our debug artifact tests, which always run on Linux. It's not compatible because it directly shells out to extract archives.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mbg mbg May 7, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Ah, I had a look at the implementation but didn't see an obvious guard against running on Windows. I saw the isInTestMode() check, but I didn't verify whether we always run on Linux there.

In that case, it might be good to make this more explicit in the main implementation in scanArtifactsForTokens as well and return with a suitable message there if it is somehow running on Windows?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@henrymercer henrymercer May 7, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Agreed, done!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer
Add explicit error on Windows
0c80cee
mbg
mbg approved these changes May 7, 2026
View reviewed changes
Comment thread src/artifact-scanner.ts
);
}

if (process.platform === "win32") {

@mbg mbg May 7, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Of course it is win32 regardless of architecture.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

henrymercer reacted with laugh emoji
All reactions
  • 😄 1 reaction
@henrymercer
henrymercer enabled auto-merge May 7, 2026 14:50
@henrymercer
henrymercer added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit b81d0d2 May 7, 2026
225 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer deleted the henrymercer/slow-tests-ci-only branch May 7, 2026 15:27
This was referenced May 15, 2026
Merge main into releases/v4 #3905
Merged
Merge releases/v4 into releases/v3 #3907
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@mbg mbg mbg approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size/XS Should be very easy to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@henrymercer @mbg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.