Don't record an overlay status when the job was cancelled - #4122
Open
henrymercer wants to merge 2 commits into
Open
Don't record an overlay status when the job was cancelled#4122henrymercer wants to merge 2 commits into
henrymercer wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Copilot review overview
🟢 Approval recommended
The focused implementation is consistent with existing input handling and covers the new behavior with unit tests.
Review tier: Balanced
Findings: None
What changed in this PR
Prevents cancelled jobs from incorrectly disabling overlay analysis through cached failure markers.
Changes:
- Passes the runtime job status into post-processing.
- Skips overlay failure recording for cancellations unless CodeQL already reported an error.
- Adds unit coverage for cancellation scenarios.
| File | Description |
|---|---|
src/init-action-post.ts |
Captures post-step job status before restoring inputs. |
src/init-action-post-helper.ts |
Adds cancellation-aware overlay status handling. |
src/init-action-post-helper.test.ts |
Tests cancellation and prior-error behavior. |
init/action.yml |
Defines the internal job-status input. |
lib/entry-points.js |
Generated output; excluded from review by policy. |
Files excluded by content exclusion policy (1)
- lib/entry-points.js
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
henrymercer
marked this pull request as ready for review
September 3, 2026 17:36
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 4, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 4, 2026
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.
The overlay status mechanism records a marker in the Actions cache when building an overlay-base database fails, so that later runs skip overlay analysis instead of failing the same way, but it records one whenever the analyze step did not report success, which also covers runs that were cancelled, since the
initpost step still runs in that case. A cancellation tells us nothing about whether the analysis would have succeeded, and a marker disables overlay analysis for the whole repository until the next CodeQL release, so this adds an internaljob-statusinput defaulting to${{ job.status }}and skips recording when the job was cancelled.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
dynamicworkflows (Default Setup, Code Quality, ...).Products:
analysis-kinds: code-scanning.Environments:
github.comand/or GitHub Enterprise Cloud with Data Residency.How did/will you validate this change?
cancelledto the post step..test.tsfiles).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
overlay_analysis_status_saveis enabled, so disabling that flag restores the previous behaviour. The new input is inert on its own.How will you know if something goes wrong after this change is released?
codeql-action/overlay-disableddiagnostic reportsskipped-due-to-cached-status, so the rate of that reason shows whether we are recording fewer markers as intended, and overlay adoption shows whether we have stopped recording ones we needed.Are there any special considerations for merging or releasing this change?
Merge / deployment checklist