Skip to content

ci (master): a Darkbloom Sandbox without the Darkbloom cache uses no Actions cache; refuse an unsafe cached .git (port of #1981) - #1982

Closed
davidtai wants to merge 3 commits into
masterfrom
ci/darkbloom-no-github-cache-master
Closed

davidtai wants to merge 3 commits into
masterfrom
ci/darkbloom-no-github-cache-master

Conversation

@davidtai

@davidtai davidtai commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Port of #1981 to master: the same two commits, cherry-picked without conflicts. On master, Cluster GPU Tests runs on blacksmith-12vcpu-macos-27 without asking the plane. It still runs the step, which sets nothing there. The changelog fragment is new on master.

What leaks

When the plane gives a Darkbloom Sandbox job no Darkbloom cache, the guest's job cache does not start (darkbloom-sandbox crates/guest/src/cache/job.rs, JobCache::enable returns None). The guest then adds none of its cache variables (NODE_OPTIONS=--require=<preload>, DARKBLOOM_CACHE_URL, DARKBLOOM_CACHE_UPSTREAM) to the runner's environment (runtime/mod.rs, workload_env). actions/cache then reads and writes GitHub's own Actions cache through the gateway.

Evidence:

  • Job 127018716621 (master push, 2026-11-05) saved .git, a 1.69 GiB Swift build, the SwiftPM repositories and a Metal library to GitHub's refs/heads/master scope.
  • The dev pushes on 2026-11-07 and 2026-11-09 saved .git to refs/heads/dev.
  • A restored .git was checked only with git fsck --connectivity-only, so a hook in a cached .git could run at checkout.

How a job detects Darkbloom without the cache

Each routed job that uses a cache now runs Choose this job's Actions cache before its first cache step:

  • runner name not darkbloom-* (Blacksmith, GitHub-hosted): nothing is set, and the job keeps its cache.
  • runner name darkbloom-* (the plane names every runner darkbloom-<id>, crates/core/src/runner/mod.rs) and DARKBLOOM_CACHE_URL set: the job keeps the plane's per-host cache. The step logs the URL.
  • runner name darkbloom-* and no DARKBLOOM_CACHE_URL: the step writes CI_ACTIONS_CACHE=off to $GITHUB_ENV and logs a notice.

Every actions/cache, actions/cache/restore and actions/cache/save step under .github starts its condition with env.CI_ACTIONS_CACHE != 'off'. The routed actions/setup-node steps get cache: ${{ env.CI_ACTIONS_CACHE != 'off' && 'npm' || '' }}. When the flag is unset, the cache steps run, so the Blacksmith-only release workflows are unchanged and not edited.

The .git restore

The discard step (renamed Discard a damaged or unsafe cached .git) now deletes a restored .git, before any git command reads it, if:

  • it is not a directory (a gitdir: file or a link);
  • it holds a symbolic link;
  • it holds a hook other than *.sample, in .git/hooks or in a submodule's .git/modules/*/hooks (names compared without case, as on macOS);
  • a config under .git sets core.fsmonitor or core.hooksPath, or has an include or includeIf.

It reads these with find and git config --file, which run nothing. The fsck check follows as before. This applies on every runner, Blacksmith too.

Hooked up

  • provider-tests.yml: all 7 cached jobs (build-cluster, build-provider, test-provider, test-cluster, test-cluster-gpu, cluster-release-checks, test-cluster-focused) run the step first, and all 22 cache steps are gated.
  • .github/actions/provider-ci-build: 6 cache steps gated (the flag comes from the calling job).
  • ci-master.yml: Release Integrity and Docs Lint (Linux routed lanes) run the step, and their 4 cache steps are gated.
  • provider-release-cache.yml warm (Darkbloom on pull requests) runs the step. .github/actions/provider-release-build has its 6 cache steps gated. The release workflows that also use this action never set the flag, so their caches do not change.
  • desktop.yml frontend and landing.yml check (Linux routed lanes) run the step, and their npm cache is gated. desktop.yml review-package stays on Blacksmith and is not changed.
  • scripts/test-provider-ci-workflow.py: a new test checks that every cache step in every workflow and action is gated. It also checks that every routed job with a cache runs the step before its first cache step, and that a job with a literal label never runs on Darkbloom. It runs the step's script with each kind of runner. The .git validation test adds a case for each unsafe kind of .git and a kept *.sample hook. The tests that compare exact conditions and step positions were adapted. No test was deleted.
  • docs/developer/build.md (CI Caching, and the routing paragraph) and changelog.d/ci-darkbloom-no-github-cache.md.

Notes

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

davidtai and others added 2 commits November 10, 2026 16:44
…ache

On a Darkbloom Sandbox that the plane gave no Darkbloom cache, the guest
sets no DARKBLOOM_CACHE_URL and actions/cache reads and writes GitHub's
own Actions cache through the gateway. Job 127018716621 (master push,
2026-11-05) saved .git, a 1.69 GiB Swift build, the SwiftPM repositories
and a Metal library to refs/heads/master; dev pushes on 11-07 and 11-09
saved .git to refs/heads/dev.

Each routed job that uses a cache now first runs "Choose this job's
Actions cache", which sets CI_ACTIONS_CACHE=off on a runner named
darkbloom-* without DARKBLOOM_CACHE_URL. Every actions/cache step under
.github starts its condition with env.CI_ACTIONS_CACHE != 'off', and the
routed setup-node steps get cache ''. Blacksmith, GitHub-hosted and
cache-enabled Darkbloom jobs, and the Blacksmith-only release workflows,
keep their caches.

The .git discard step now also refuses a restored .git that is not a
directory, holds a symbolic link or a hook other than *.sample (also in
.git/modules), or whose config sets core.fsmonitor, core.hooksPath or an
include, before any git command reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 10, 2026 11:08pm UTC
darkbloom-status Ready Ready Preview Nov 10, 2026 11:08pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 10, 2026 11:08pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Threat model review — advisory

Reviewed head 68c94f205b8f against base 34c4a10d86aa.

Reviewers: anthropic/claude-sonnet-5.5: first pass completed; anthropic/claude-opus-5.5: selected depth completed (1 batches); openai/gpt-6.1-sol: selected depth completed (6 batches)

No actionable findings in the reviewed text. This is not a security approval.

Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging.

Scan completed; human review required.
Cross-file reviewer requests further review; independent human review required; Final reviewer requests further review; independent human review required

Coverage: 61/61 source units; cross-file integration complete. 0 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned.

Cost this run: $0.0000 reported, $0.0000 reserved with unknown cost; 0 paid request(s), 15 reused batch(es), 0 provider cache-hit tokens.

Saved findings and earlier report · Historical findings are not confirmed resolved.

Bedrock: 7 request(s), 258331 uncached + 0 cache-read + 54850 cache-write input / 5519 output tokens; 0 request(s) with unknown usage. OpenRouter backup used 0 time(s). Dollar amounts above cover OpenRouter only; AWS billing is reconciled separately.
Workload allowance: 23 native request(s), including one shared response repair; 500 emergency ceiling. Selected depth and integration rounds are admitted as their scope becomes known.

…ps the release build's cache steps

Docs Impact maps .github/actions/provider-release-build and
provider-release-cache.yml to docs/operations/provider-release.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidtai

Copy link
Copy Markdown
Collaborator Author

@Gajesh2007 please review this PR and #1960.
This cache stopgap must land first: it stops Darkbloom jobs without the plane's cache from writing GitHub's master cache.
Then #1960 can route the build lanes to Darkbloom.

davidtai added a commit that referenced this pull request Nov 11, 2026
…1981, #1986, #1987, #1988, #1990); supersedes #1960 (#2000)

* ci: port #1951 to master (route the build lanes while job sizes are off)

Cherry-pick of dev's merge 2474f3d (-m 1). changelog.d/ci-macos-job-sizes.md
was consumed into CHANGELOG.md on master by #1938, so this commit adds
changelog.d/ci-build-lanes-routed.md instead, as #1960 did. The tree of this
commit equals #1960's head 429d1bf; this PR supersedes #1960.

(cherry picked from commit 2474f3d)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1955 to master (GPU shards ask Darkbloom first)

Cherry-pick of dev's merge 086dd06 (-m 1).

(cherry picked from commit 086dd06)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1986 to master (route desktop-package)

Cherry-pick of dev's merge 2588e7f (-m 1).

(cherry picked from commit 2588e7f)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1981 to master (no GitHub Actions cache on a Darkbloom runner without the Darkbloom cache)

Cherry-pick of dev's merge 723ce1d (-m 1). docs/operations/provider-release.md
conflicted only on its "Last updated" line; it takes 2026-11-10. This PR
supersedes #1982.

(cherry picked from commit 723ce1d)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1990 to master (gate desktop-package's npm cache)

Cherry-pick of dev's merge 844b76d (-m 1).

(cherry picked from commit 844b76d)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1987 to master (GPU shard 2 memory)

Cherry-pick of dev's merge 732904f (-m 1). docs/developer/test.md
conflicted only on its "Last updated" line; it takes 2026-11-10.

(cherry picked from commit 732904f)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1988 to master (right-size jobs; BoundedBufferCache)

Cherry-pick of dev's merge 420a512 (-m 1).

(cherry picked from commit 420a512)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Gajesh Naik <26431906+Gajesh2007@users.noreply.github.com>

@jonathan308 jonathan308 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Test approval

@davidtai

Copy link
Copy Markdown
Collaborator Author

Closing as superseded: master already carries this whole change through #2000 (merged 2026-11-11, which ported #1981), and it's still there after #2400 and #2415. The only remaining difference is changelog.d/ci-darkbloom-no-github-cache.md, whose entry is already released in CHANGELOG.md, so merging would duplicate it.

@davidtai davidtai closed this Nov 20, 2026
@davidtai
davidtai deleted the ci/darkbloom-no-github-cache-master branch November 20, 2026 23:31

This branch was successfully deployed

3 active deployments
Preview – d-inference-landing — 68c94f20 Deployed Nov 10, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 68c94f20 Deployed Nov 10, 2026 by vercel[bot]
Preview – darkbloom-status — 68c94f20 Deployed Nov 10, 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.

2 participants