Split CodeQL Swift analysis into separate workflow#133
Merged
Conversation
- Split the Swift CodeQL analysis into codeql-swift.yml: path-filtered to Swift changes, no merge_group trigger. The ~25-minute traced macOS build outlived the merge-queue ref on every fast merge, failing the SARIF upload with "ref not found" on 7 consecutive queued PRs, and burned ~25 macOS runner-minutes per PR for a file that rarely changes. The push-to-main run scans the identical merge result; the weekly sweep keeps the baseline fresh. - Promote the debuglog tests' logging snapshot/restore into a shared preserve_logging_state conftest fixture so the next module that touches process-global logging doesn't rediscover the pytest-randomly order dependence that cost PR #125 a red CI round. - AGENTS.md: note the shared fixture, and tell concurrent sessions to check open PRs / recent main commits before starting a fix (PR #89 was closed as an exact duplicate of #90). https://claude.ai/code/session_019CwN6T2ztwvNARvj3z39sP
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.
Summary
Separates Swift CodeQL analysis into a dedicated workflow (
codeql-swift.yml) to optimize CI performance. Swift compilation requires a ~25-minute traced build on macOS runners, which is two orders of magnitude slower than interpreted-language scans. This change isolates that cost to only run when Swift code changes.Key Changes
New workflow
codeql-swift.yml: Dedicated CodeQL analysis for Swift with:**/*.swiftand the workflow itself, so macOS runner time is only spent when Swift code can change resultsmerge_group(merge-queue refs are deleted immediately after PR merge, causing SARIF upload failures on slow scans; the push run on main scans the identical result instead)swiftcinvocation matchingscripts/check.shSimplified
codeql.yml: Removes Swift analysis and macOS runner:[python, actions, javascript-typescript]build-mode: none(interpreted languages, ~1 minute each)ubuntu-latestTest infrastructure improvements:
preserve_logging_statefixture inconftest.pyto snapshot/restore process-global logging state (root handlers/level, per-logger levels)test_debuglog.pyto use the shared fixture instead of hand-rolling state managementpytest-randomly(logging leaks only fail on some seeds)NOTSETto prevent earlier tests' silencers from interferingDocumentation: Updates
AGENTS.mdwith lessons learned:Linting: Adds
preserve_logging_statetopyproject.tomlvulture ignore list (fixture parameter, not called directly)Implementation Details
The Swift workflow uses the same
swiftcinvocation as the gate (scripts/check.sh), ensuring consistency between local and CI builds. Path filtering prevents unnecessary macOS runner allocation while the weekly schedule maintains baseline freshness independent of code changes.https://claude.ai/code/session_019CwN6T2ztwvNARvj3z39sP