chore(ci): consolidate uv cache key across all workflow jobs #1644
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1644
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/ci-consolidate-uv-cache-key"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Consolidates all per-job
uvcache key prefixes across CI workflow files into a single shared key (uv-${{ hashFiles('pyproject.toml') }}), eliminating redundant package downloads and reducing CI wall-clock time. Also adds missinguvcache steps to thebuildjob inci.ymland tonightly-quality.yml.Changes
.forgejo/workflows/ci.yml: Replaced six distinct per-job cache key prefixes (uv-lint-,uv-typecheck-,uv-security-,uv-quality-,uv-tests-,uv-coverage-) with the single shared keyuv-${{ hashFiles('pyproject.toml') }}across all 8 jobs. This means all jobs now hit the same cache entry whenpyproject.tomlis unchanged, rather than each job independently downloading and storing its own copy of the dependency set.restore-keysfallback inci.yml: Changed all per-job restore-key prefixes (e.g.,uv-lint-) to the genericuv-prefix, enabling partial cache hits acrosspyproject.tomlchanges and ensuring the fallback is consistent with the new unified key scheme.uvcache step to thebuildjob inci.yml: Thebuildjob previously had no caching at all. It now participates in the shared cache, preventing unnecessary re-downloads during build runs.uvcaching to.forgejo/workflows/nightly-quality.yml: This workflow had no cache configuration whatsoever. An 8-line cache step using the sameuv-${{ hashFiles('pyproject.toml') }}key anduv-restore-key has been added for consistency and to benefit nightly runs from cached dependencies.Design Decisions
pyproject.tomlas the cache key hash source:pyproject.tomlis the single source of truth for Python dependencies in this project. Hashing it produces a cache key that is stable when dependencies are unchanged and invalidates correctly when they are updated — no other file (e.g.,uv.lock) is needed for this purpose.uv-restore-key fallback: Usinguv-as the fallback allows any previously cached environment to serve as a warm starting point after apyproject.tomlchange, minimising cold-cache penalty during dependency updates.nightly-quality.yml: Consistency across all workflow files reduces maintenance burden and ensures nightly runs benefit from the same caching strategy as the main CI pipeline.Testing
Modules Affected
.forgejo/workflows/ci.yml— 16 lines changed (cache key consolidation across 8 jobs + added missingbuildjob cache step).forgejo/workflows/nightly-quality.yml— 8 lines added (newuvcache step)Related Issues
Closes #1535
Checklist
# type: ignoredirectivesAutomated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker
Replace per-job cache key prefixes (uv-lint-, uv-typecheck-, uv-security-, uv-quality-, uv-tests-, uv-coverage-) with a single shared key uv-${{ hashFiles('pyproject.toml') }} across all jobs in ci.yml. Also add a missing uv cache step to the build job and add uv caching to nightly-quality.yml, which previously had no cache at all. All jobs now share the same cache entry when pyproject.toml is unchanged, eliminating redundant package downloads and reducing CI wall-clock time. ISSUES CLOSED: #1535Review claimed by reviewer pool instance pr-reviewer-pool-3983434-1775170710. Dispatching independent code review.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
Label compliance fix applied:
Priority/Medium,State/In Review,Type/Taskchore(ci): consolidate uv cache key), soType/TaskandPriority/Mediumare appropriate. State set toState/In Reviewas this is an open PR.Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Independent Code Review — APPROVED ✅
Summary
This PR consolidates the
uvcache key across all CI workflow jobs, replacing 6 distinct per-job cache key prefixes with a single shared keyuv-${{ hashFiles('pyproject.toml') }}. It also adds missing cache steps to thebuildjob andnightly-quality.yml.Review Findings
✅ Specification Alignment
✅ Correctness
pyproject.toml, so sharing a singleuvdownload cache is correct. The~/.cache/uvdirectory stores downloaded packages (not virtual environments), making cross-job sharing safe.uv-: Correctly provides warm cache hits acrosspyproject.tomlchanges.pip install uvand beforenox -s build.✅ PR Metadata Compliance
chore(ci): consolidate uv cache key across all workflow jobsType/Task,Priority/Medium,State/In Review— all required labels present✅ CI Status
921c13f) which shows identical failures.✅ Security
Verdict
Clean, well-documented CI infrastructure improvement. The approach is correct, the implementation is consistent across all jobs, and the PR goes beyond the issue scope by also adding caching to previously uncached jobs. No concerns. Proceeding to merge.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer
Review: PR #1644 — chore(ci): consolidate uv cache key across all workflow jobs
Decision: APPROVED ✅ — Proceeding to merge
Clean YAML-only change consolidating 6 per-job cache keys into single shared key. Adds missing cache to build job and nightly-quality workflow.
pyproject.tomlhash is the correct cache key source. Low risk.Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer
Code Review: ✅ APPROVED
Reviewed against: CONTRIBUTING.md rules, CI best practices.
Summary:
Consolidates all per-job
uvcache key prefixes into a single shared key. Adds missing cache steps tobuildjob andnightly-quality.yml.pyproject.tomlis the correct hash source for dependency cachinguv-restore-key fallback enables partial cache hitsbuildjob cache eliminates unnecessary re-downloadsProceeding to merge.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer