Skip to content

Add --no-cache-at-frontier to run-queries#1374

Merged
robertbrignull merged 1 commit intomainfrom
robertbrignull/no-evaluate-as-overlay
Feb 18, 2026
Merged

Add --no-cache-at-frontier to run-queries#1374
robertbrignull merged 1 commit intomainfrom
robertbrignull/no-evaluate-as-overlay

Conversation

@robertbrignull
Copy link
Contributor

@robertbrignull robertbrignull commented Feb 18, 2026

This is to work around an error when overlay databases have been uploaded for repositories.

Tested with a MRVA run on repos that previously failed to analyse and this flag allowed the queries to succeed.

Copilot AI review requested due to automatic review settings February 18, 2026 10:46
Copy link
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 adds the --no-evaluate-as-overlay flag to the CodeQL CLI's database run-queries command as an experimental workaround for errors that occur when overlay databases have been uploaded for repositories. This is an internal action used by GitHub's multi-repository variant analysis feature.

Changes:

  • Added --no-evaluate-as-overlay flag to the runQuery function's call to codeql database run-queries
  • Updated both the TypeScript source and the generated JavaScript bundle

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/codeql.ts Added --no-evaluate-as-overlay flag to the database run-queries command in the runQuery function
dist/query.js Generated bundle reflecting the TypeScript source changes
Comments suppressed due to low confidence (2)

src/codeql.ts:74

  • The existing tests for runQuery in src/codeql.test.ts do not verify the command-line flags passed to the CodeQL CLI. Adding this flag unconditionally could affect query behavior, but there's no test coverage to validate that:
  1. The flag is actually being passed correctly
  2. Queries still execute successfully with this flag
  3. The flag achieves the intended effect (working around overlay database errors)

Consider adding a test that verifies the flag is passed when calling database run-queries, or at minimum, ensure the existing integration tests pass with this change.

    "--no-evaluate-as-overlay",

src/codeql.ts:74

  • There is no documentation explaining what the --no-evaluate-as-overlay flag does or why it's needed. This makes the code harder to maintain and understand. Consider adding a comment above this line that:
  1. Explains what this flag does
  2. References the issue or error it's intended to fix
  3. Mentions that this is experimental (as noted in the PR description)
  4. Links to relevant CodeQL CLI documentation if available

For example:

// Experimental: Disable evaluation as overlay to work around errors when
// overlay databases have been uploaded for repositories.
// See: [link to issue/documentation]
    "--no-evaluate-as-overlay",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

src/codeql.ts Outdated
await codeql.run([
"database",
"run-queries",
"--no-evaluate-as-overlay",
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

This experimental flag is being added unconditionally to all query executions. Since the PR description mentions this is an "experiment to potentially work around an error when overlay databases have been uploaded," consider making this configurable via the existing feature flags system (Instructions.features).

This would allow:

  1. The flag to be enabled/disabled without requiring a code change and redeployment
  2. A/B testing to verify it solves the overlay database issue
  3. Easy rollback if unexpected issues arise

For example, you could check for a feature flag like no_evaluate_as_overlay before adding this flag to the command.

This issue also appears in the following locations of the same file:

  • line 74
  • line 74

See below for a potential fix:

  const runQueriesArgs = [
    "database",
    "run-queries",
  ];

  // Enable the experimental "--no-evaluate-as-overlay" flag by default, but
  // allow it to be disabled without a code change by setting the environment
  // variable NO_EVALUATE_AS_OVERLAY to "false".
  if (process.env.NO_EVALUATE_AS_OVERLAY !== "false") {
    runQueriesArgs.push("--no-evaluate-as-overlay");
  }

  runQueriesArgs.push(
    `--ram=${getMemoryFlagValue().toString()}`,
    "--additional-packs",
    queryPack.path,
    "--",
    databasePath,
    queryPack.name,
  );

  await codeql.run(runQueriesArgs);

Copilot uses AI. Check for mistakes.
@robertbrignull robertbrignull force-pushed the robertbrignull/no-evaluate-as-overlay branch from 05f77e9 to fa4d09c Compare February 18, 2026 11:00
@robertbrignull robertbrignull changed the title Add --no-evaluate-as-overlay to run-queries Add --no-cache-at-frontier to run-queries Feb 18, 2026
@robertbrignull robertbrignull merged commit 244921a into main Feb 18, 2026
9 checks passed
@robertbrignull robertbrignull deleted the robertbrignull/no-evaluate-as-overlay branch February 18, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants