perf(ci): cache torch wheel in pip-audit.yml; add codex.yml concurrency guard#481
Merged
Merged
Conversation
…ncurrency pip-audit.yml's verify-install job re-downloads the ~2GB torch CPU wheel on every run because its own triggers (requirements.txt/constraints.txt changes) guarantee a cache-bust, unlike ci.yml which keys the torch wheel separately from the lighter pip cache. Mirrors ci.yml's two-tier caching (pip cache via setup-python + dedicated actions/cache for the torch wheel keyed on runner.os+pin) so a manifest change only re-fetches what actually changed. codex.yml had no concurrency block despite being near-identical in shape to claude.yml (same issue_comment trigger, same checkout-PR-merge-ref pattern). Rapid repeat @codex comments on one PR could run overlapping jobs against the same refs/pull/N/merge ref with no guard; added the same cancel-in-progress group claude.yml already uses.
|
Summary
Testing
|
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.
What
Two small, unrelated-but-small CI hygiene fixes bundled together (both "license/secret/key-free enhancement" per the CyClaw-Optimize scope):
pip-audit.yml:verify-installjob now caches pip downloads (viasetup-python'scache: 'pip') and caches the torch CPU wheel separately (via a dedicatedactions/cachestep keyed onrunner.os+ the pin), mirroringci.yml's existing two-tier caching exactly.codex.yml: added aconcurrencyblock, mirroring the one already onclaude.yml.Why / benefit
pip-audit.ymltriggers onpush/pull_requesttorequirements.txtorconstraints.txt— which means its pip cache is guaranteed to bust on the one event that matters most, and without a separate torch cache it re-downloads the ~2GB CPU wheel on both OS legs every time those files change.ci.ymlalready solved this with a dedicated torch-wheel cache;pip-audit.ymlnever got the same treatment.codex.ymlandclaude.ymlare near-identicalissue_comment-triggered PR-bot workflows (checkout PR merge ref → run agent → post comment), but onlyclaude.ymlhas aconcurrencyguard. Rapid repeat@codexcomments on the same PR could run overlapping jobs against the samerefs/pull/N/mergeref with no guard.Risk to monitor
Both changes are additive (new cache steps / a concurrency block) — no existing step was removed or reordered beyond inserting the cache steps. Worst case on a cache miss is identical behavior to today (fresh download), so there's no plausible way this makes the job slower or less correct, only sometimes faster.
codex.yml'scancel-in-progress: trueis unconditional (matchingclaude.yml's exact policy) since this workflow has no analogous "push to main" case to exempt.Verify
Both files parse as valid YAML (
yaml.safe_load). No Python code touched — this is a CI-workflow-only change validated by the repo's own CI on push, per the skill's documented exception for YAML/lint-only PRs.Scan context
CyClaw-Optimize (ponytail + Karpathy + fable-protocol loaded). Findings #1 and #2 of an 8-finding scan; deduped against open PRs #473, #477, #415.
Generated by Claude Code