ci: add build/validate-only CI workflow for ql/hotspots - #231
Merged
Merged
Conversation
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
felickz
September 22, 2026 00:51
View session
felickz
marked this pull request as ready for review
September 22, 2026 14:54
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The workflow has one critical credential-persistence issue and two moderate validation issues to address.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds PR-time, build-only CI for ql/hotspots, validating query generation and per-language CodeQL pack compilation without publishing.
Changes:
- Adds deterministic generation and validation using the pinned CodeQL CLI.
- Adds isolated matrix builds and artifact handling.
- Documents CI behavior and local validation.
| File | Summary | Review findings |
|---|---|---|
.github/workflows/hotspots-ci.yml |
Adds generation, validation, artifact upload, and pack-build jobs. | Critical (1 vote): disable persisted checkout credentials. Moderate (3 votes): include .codeqlversion in path filters. Moderate (1 vote): upload generated artifacts with if: always(). |
ql/hotspots/README.md |
Documents CI workflows and local no-publish builds. | None. |
CONTRIBUTING.md |
Documents dedicated Hotspots PR-time CI. | None. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…deqlversion to trigger paths Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
felickz
approved these changes
Sep 23, 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.


ql/hotspotshas no PR-time CI (see #230, a Dependabot bump that ran nothing). The only thing that exercises the generator/patch scripts ishotspots.yml, a manualworkflow_dispatchthat publishes to GHCR, so the only way to learn whether a dependency bump or script edit broke the pipeline was to run a publish.This adds
.github/workflows/hotspots-ci.yml: the same generate → patch pipeline, stopping atcodeql pack createand never publishing.pack createis the compile steppack publishperforms internally, so it is the same build minus the upload.generatejobql/hotspots/requirements.txtwith--require-hasheson Python 3.12 (the version it waspip-compiled against; it pins cp312-only wheels), byte-compiles the scripts and smoke-tests their CLIs.generate-hotspots-queries.pyagainst agithub/codeqlcheckout.Hotspots-<language>.ql— a query with zero configs still compiles, so compilation alone is not a sufficient check.build-packsjobfail-fast: false, so a break is isolated to and re-runnable for a single language rather than discarding the whole loop.patch-codeql.pyover a freshgithub/codeqlcheckout, then per language:Determinism and scope
.codeqlversionCLI and the matchingcodeql-cli/v<version>tag ofgithub/codeql, rather thanhotspots.yml's bundle CLI +github/codeql@main, so a red run points at the PR rather than upstream drift.pull_request(cache scope is the PR branch), thegithub/codeqlref is not caller-overridable, and nothing derived from that checkout is cached. Earlier drafts with aworkflow_dispatchtrigger and an extractor cache tripped CodeQL'sactions/cache-poisoningqueries.generate-hotspots-queries.pyhas no Swift support, so noHotspots-swift.qlexists and the patched Swift pack has nothing to compile. Documented rather than worked around.Docs
ql/hotspots/README.md: CI section covering both workflows, a local no-publish build snippet, and a correction to thepatch-codeql.pyexample (--hotspotstakes theoutputdirectory, nothotspots.csv).CONTRIBUTING.md: note thatql/hotspots, though excluded from thecodeql pack upgradeloop, now has PR-time CI.Running the pipeline locally against CLI 2.27.0 and
github/codeql@codeql-cli/v2.27.0suggests nothing is currently broken: all seven languages generate (22–54 configuration imports each) and all sevensrcpacks compile, the slowest being java at ~2m11. Note the workflow run on this PR is currently pending maintainer approval.