Skip to content

improvement(ci): check out same-repo pull requests through a git mirror - #8768

Merged
waleedlatif1 merged 1 commit into
stagingfrom
chore/ci-checkout-mirror
Oct 7, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
chore/ci-checkout-mirror

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Since ci: faster, cheaper, consistently named CI #8750/ci: duration-balanced integration shards, warm desktop-live, CI on every PR #8763 the checks run as ~19 parallel jobs, and a run finishes when its slowest job does. Checkout is now the long tail: median 11s, but 1 in 10 took a minute or more (up to 4 min), so one slow clone set the run's pace (a balanced 5.2 min integration shard took 9.8 min after a 4 min checkout)
  • Same-repo pull requests now check out with useblacksmith/checkout (pinned v1.8.1). It keeps a git mirror on a sticky disk and fetches only what is new; on a non-Blacksmith runner, or if the mirror is unavailable, it falls back to a normal clone
  • Fork pull requests and pushes keep actions/checkout. The mirror is one disk per repository that job steps can write to, and Git doesn't re-hash objects read through alternates, so it's shared only by runs that already share the pull_request caches. The deploy-gating push checks never read it
  • Only checks.yml changes. Release, signing, publish and image jobs keep actions/checkout. Each job's mirror/plain pair is written once per fetch depth with YAML anchors

Type of Change

  • Improvement

Testing

  • Parsed the workflow and checked every job: each resolves to exactly one checkout for a same-repo PR, a fork PR, and a push, with its fetch depth unchanged (desktop-changes still checks out only on pull requests)
  • actionlint 1.7.12, bun run lint, block registry check, check:audits (58), type-check, docs-manifest:check, root bun run test
  • This PR's own CI run is the first mirror hydration, so the first warm run measures the checkout gain

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

A clone from GitHub took a minute or more for 1 in 10 checks jobs (up to 4 min), and with
~19 parallel jobs per run one slow clone set the run's pace. Same-repo pull requests now check out
with useblacksmith/checkout, which keeps a git mirror on a sticky disk and fetches only new
objects. Fork pull requests and pushes keep actions/checkout: the mirror is one disk per
repository that job steps can write to, and Git does not re-hash objects read through
alternates, so only runs that already share the pull_request caches share it.
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Error Error Oct 7, 2026 10:35pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/checks.yml
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Introduces a new third-party checkout action into CI.

The PR appears safe to merge; no actionable defects were found.

What we checked:

  • Forks and pushes avoid mirror: The mirror step requires a PR from a non-fork repository. The plain step covers forks and non-PR events.
  • Desktop checkout remains PR-only: Each PR selects one checkout with fetch-depth: 2. Non-PR events skip both checkouts and the diff step, as before.

Summary

Same-repository PR jobs now select pinned useblacksmith/checkout to reuse a Git mirror.

  • Fork PRs and push runs retain actions/checkout.
  • YAML anchors share the checkout pairs while preserving the existing fetch-depth settings.
  • No actionable issues were found.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Checks job] --> B{Pull request?}
  B -->|No| C[Plain checkout]
  B -->|Yes| D{Fork repository?}
  D -->|Yes| C
  D -->|No| E[Mirror checkout]
  C --> F[Existing checks]
  E --> F
Loading

Reviews (1) · Last reviewed commit: "improvement(ci): check out same-repo pul..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 350b016 into staging Oct 7, 2026
46 of 47 checks passed
@waleedlatif1
waleedlatif1 deleted the chore/ci-checkout-mirror branch October 7, 2026 22:49

This branch had an error being deployed

1 failed deployment
Preview — 5131dd29 Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant