Skip to content

ci(bazel): enroll scheduling-kit in the shared cache-backed lane (TIN-2110)#111

Merged
Jesssullivan merged 2 commits into
mainfrom
codex/tin2110-kit-enroll
Jun 14, 2026
Merged

ci(bazel): enroll scheduling-kit in the shared cache-backed lane (TIN-2110)#111
Jesssullivan merged 2 commits into
mainfrom
codex/tin2110-kit-enroll

Conversation

@Jesssullivan

Copy link
Copy Markdown
Owner

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)

  1. Repin + opt-in — both ci.yml and publish.yml move from the bare
    ci-templates commit SHA @61cd1338… to the immutable tag
    @v2.3.0 (which ships the opt-in cache_backed path) and set
    cache_backed: true. When cache_backed is unset/false the shared
    js-bazel-package.yml Bazel validation is byte-identical to today
    (bazelisk build … --verbose_failures) — zero behavior change for the ~190
    non-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.
  2. .bazelrc — adds the endpoint-free ci-cached block (--config=ci +
    --remote_upload_local_results=false + --remote_download_minimal +
    --remote_timeout=60) plus cache-readonly / no-remote-cache, and empties
    the disk cache under :ci so a cache hit proves the REMOTE shared cache,
    not an incidental local disk hit. Endpoints are injected at runtime, never
    baked.
  3. scripts/cache-attachment-contract.sh — vendors the GF#889-proven
    fail-closed classifier (TIN-2108 naming: GF_BAZEL_SUBSTRATE_MODE; modes
    shared-cache-backed / compatibility-local-only / executor-backed).
    Rejects unexpanded ${…} placeholders, non-grpc/http endpoints, localhost
    without explicit proof, and executor-without-cache. Executor is classified
    but never selected by this lane.
  4. 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.
  5. AGENTS.md — adds the GloriousFlywheel cache-enrollment stanza near the
    top (names GF; do not create runners; do not run raw bazel build as
    validation; attach via the cache-backed lane; self-verify via the contract
    checker; REAPI out of scope).
  6. justfile + flake just — org house-style
    nix develop --command just <recipe>: info / cache-contract-strict
    (fail-closed checker) / flywheel-build / flywheel-test behind a
    FLYWHEEL flag. No executor recipe (cache-first).

Attach evidence

The tinyland-nix runner is in-cluster and nix-setup exports
BAZEL_REMOTE_CACHE=grpc://bazel-cache.nix-cache.svc.cluster.local:9092 from
cluster DNS. The real-attach proof is remote cache hit/transfer lines in the
Validate Bazel targets (cache-backed) step log
(replacing the prior
all-local 1822-action breakdown). A green build showing only --disk_cache and
no 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.0 surface
(cache_backed input, scripts/cache-attachment-contract.sh,
bazelrc/ci-cached.bazelrc); kit only opts in + carries the consumer .bazelrc
block, 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.

Jess Sullivan 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.
@Jesssullivan Jesssullivan merged commit fcbe81a into main Jun 14, 2026
5 checks passed
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