ci(bazel): enroll scheduling-kit in the shared cache-backed lane (TIN-2110)#111
Merged
Conversation
added 2 commits
June 14, 2026 13:02
…-2110) Cache-first (TIN-1997 Option D) enrollment pilot — the reusable template for the spoke fan-out. Opt-in, default-off; no remote executor / REAPI is wired. - Repin both workflows from a bare ci-templates SHA to the immutable tag @v2.3.0 (which ships the opt-in cache_backed path) and set cache_backed: true. - .bazelrc: add the endpoint-free ci-cached config block (--config=ci + --remote_upload_local_results=false + --remote_download_minimal + --remote_timeout=60) plus cache-readonly / no-remote-cache, and empty the disk cache under :ci so a hit proves the REMOTE shared cache. Endpoints are injected at runtime, never baked. - scripts/cache-attachment-contract.sh: vendor the GF#889-proven fail-closed classifier (TIN-2108 naming: GF_BAZEL_SUBSTRATE_MODE; shared-cache-backed / compatibility-local-only / executor-backed). Executor is classified but never selected by this lane. - tinyland.repo.json: declare kit's enrollment dimensions (forge scope = Jesssullivan personal; operator overlay = jesssullivan-infra; execution pool = tinyland-nix; substrate mode = shared-cache-backed) per the ci-templates manifest schema. - AGENTS.md: add the GloriousFlywheel cache-enrollment stanza near the top. - justfile + flake just: org house-style recipes (info / cache-contract-strict / flywheel-build / flywheel-test) behind a FLYWHEEL flag. No executor recipe. When cache_backed is unset/false the existing bazelisk validation path is byte-identical (zero behavior change for non-opted ci-templates consumers).
The release-metadata guard previously required the js-bazel-package.yml uses: ref to be a 40-char commit SHA, which is exactly the bare-commit pin debt the enrollment converges off. Accept an immutable semver release tag (vMAJOR.MINOR.PATCH, e.g. @v2.3.0) as a valid pin too, while still rejecting floating refs (@main, @v2). This unblocks the @v2.3.0 repin without re-introducing pin debt.
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.
Enrollment contract — cache-first (TIN-1997 Option D / TIN-2110)
This is the pilot / reusable template for enrolling spokes in the
GloriousFlywheel shared Bazel cache. It flips scheduling-kit from
local-disk-only to shared-cache-backed. Cache-first only: no remote
executor / REAPI lane is wired anywhere (out of scope).
What changed (additive, opt-in, default-off)
ci.ymlandpublish.ymlmove from the bareci-templates commit SHA
@61cd1338…to the immutable tag@v2.3.0(which ships the opt-incache_backedpath) and setcache_backed: true. Whencache_backedis unset/false the sharedjs-bazel-package.ymlBazel validation is byte-identical to today(
bazelisk build … --verbose_failures) — zero behavior change for the ~190non-opted consumers. The opted path runs a fail-closed contract step then
--config=ci-cached --remote_cache=$BAZEL_REMOTE_CACHE --remote_upload_local_results=false..bazelrc— adds the endpoint-freeci-cachedblock (--config=ci+--remote_upload_local_results=false+--remote_download_minimal+--remote_timeout=60) pluscache-readonly/no-remote-cache, and emptiesthe disk cache under
:ciso a cache hit proves the REMOTE shared cache,not an incidental local disk hit. Endpoints are injected at runtime, never
baked.
scripts/cache-attachment-contract.sh— vendors the GF#889-provenfail-closed classifier (TIN-2108 naming:
GF_BAZEL_SUBSTRATE_MODE; modesshared-cache-backed/compatibility-local-only/executor-backed).Rejects unexpanded
${…}placeholders, non-grpc/http endpoints, localhostwithout explicit proof, and executor-without-cache. Executor is classified
but never selected by this lane.
tinyland.repo.json— declares kit's enrollment dimensions (forge scope= Jesssullivan personal; operator overlay = jesssullivan-infra; execution
pool = tinyland-nix; substrate mode = shared-cache-backed) per the
ci-templates manifest schema.
AGENTS.md— adds the GloriousFlywheel cache-enrollment stanza near thetop (names GF; do not create runners; do not run raw
bazel buildasvalidation; attach via the cache-backed lane; self-verify via the contract
checker; REAPI out of scope).
justfile+ flakejust— org house-stylenix develop --command just <recipe>:info/cache-contract-strict(fail-closed checker) /
flywheel-build/flywheel-testbehind aFLYWHEELflag. No executor recipe (cache-first).Attach evidence
The
tinyland-nixrunner is in-cluster andnix-setupexportsBAZEL_REMOTE_CACHE=grpc://bazel-cache.nix-cache.svc.cluster.local:9092fromcluster DNS. The real-attach proof is remote cache hit/transfer lines in the
Validate Bazel targets (cache-backed)step log (replacing the priorall-local 1822-action breakdown). A green build showing only
--disk_cacheandno remote transfer is NOT enrollment and will be reported as such. The
fail-closed contract step surfaces any BLOCKED state instead of silently
building local-only.
Reusable-template note
Logic lives in the shared
tinyland-inc/ci-templates@v2.3.0surface(
cache_backedinput,scripts/cache-attachment-contract.sh,bazelrc/ci-cached.bazelrc); kit only opts in + carries the consumer.bazelrcblock, manifest, AGENTS stanza, and justfile. Any spoke enrolls the same way —
no per-repo runners, no bespoke cache instance, no baked endpoints.
Non-claims
Cache attach is not org-migration closure: a green cache-backed build does
not close GF#412 / TIN-1516.
Refs TIN-2110.