Repository navigation
ci: extend the turbo remote cache to the Type Check, Test Core, dogfood and Temporal build steps - #22086
Merged
objectstack-fleet[bot] merged 1 commit intoOct 7, 2026
Conversation
… and Temporal build steps Extends Build Core's remote-cache env block, verbatim (same write rule: merge_group and push/workflow_dispatch on main write, everything else reads; same signing; no new secret), to every `turbo run build` step of lint.yml's three Type Check build lanes and of ci.yml's dogfood shards and Temporal Conformance. Test Core built its closure inside the test step's own turbo run, which must stay off the remote, so each shard now builds its `^build` closure in a new guarded step that carries the block, and the test step replays it. Build Core's comment gains the PINS every carrier points back to: build tasks only, hash-identical to Build Core's plan, and root inputs declared. Claude-Session: https://claude.ai/code/session_01VF48aw8RPG6wzDnMgp6rtw Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Oct 7, 2026
objectstack-fleet
Bot
deleted the
claude/issue-22077-turbo-remote-cache-jobs
branch
October 7, 2026 15:30
This was referenced Oct 7, 2026
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.
Fixes #22077
Clause-②: no
The turbo remote cache that #21186 wired into Build Core is now read by every
turbo run buildstep of the three LintType Checkbuild lanes, the Test Core shards, the dogfood shards and Temporal Conformance. Each carrier gets Build Core's four env lines verbatim: the same write rule (writes only onmerge_groupand onpush/workflow_dispatchagainstmain, everything else reads), the same signing, and no new secret. Two files:.github/workflows/ci.ymland.github/workflows/lint.yml.Route that landed: the remote cache, not the artifact fallback
Nothing in the remote route failed, so the
dist/upload-artifact alternative was not needed:Hashes. Each carrier's plan is a subset of Build Core's
turbo run build --filter=!@objectstack/docsplan, with identical task hashes and identicalglobalCacheInputs. Measured with--dry=jsonon3d9188502e, turbo 2.11.5,CI=true:Build workspace packages(3 lanes)Build the ledgered packages' dependencies/Build the nested packages ...Build the dogfood package's dependency closureBuild this shard's dependency closure, shards 1-6Every plan is 100%
#buildtasks. Filters and--concurrencyare not part of a task hash.Signing and permissions. These are the same secrets and the same expressions as Build Core. A same-repo PR receives them; a fork PR receives none, so
TURBO_TOKENevaluates to''and turbo reportsRemote caching disabled(ci: wire the Vercel turbo remote cache (team object-stack) into ci.yml — trusted events write, PRs read, signed — so cloud's pinned framework build can replay what this repo's main already built #21186 measured this).TURBO_CACHEnever evaluates to''.The cache already serves. On the
mainpush run at this PR's base (CI37627942232), Build Core's build step took 6 s, because the queue entry for the same tree wrote it. In the same run, the jobs that did not read the remote rebuilt: dogfood took 200 / 201 / 336 s, and in Lint37627942309the Type Check lanes took 297 / 330 / 335 s.Test Core: a new guarded build step
Test Core's existing build step,
Build the sliced package's dependency closure, runs zero iterations, because no package has been sliced since #21487. The closure was built insideRun this shard's tests. That run cannot read the remote, becausetest/test:repostay off it.Merge-queue run
37623284168,Test Core (3/6), shows the cost: one turbo run of the tests and their closure printedCached: 1 cached, 72 total/Time: 11m43.373s.Each shard now runs a new step,
Build this shard's dependency closure, before the slice step. It is one guardedturbo run build, with--filter=PKG^...for every package on the shard (PKG's dependencies without PKG), and it carries the env block. The test step then replays that closure from the local cache.Measured on all six shards of the local partition: this plan equals the test plan's build tasks, with identical hashes, 0 extra and 0 missing. One exception is
cli#buildon shard 1/6:cli#testhasdependsOn: ["build"], so the test step still builds that one, as before.Other properties of the new step:
FILTERSexits before turbo runs, because a bareturbo run buildwould build the whole workspace.--summarize, so.turbo/runs/stays the test step's alone, for the drift check and the timings capture.check:stall-guard-budgetjudges it at window 10m, cap 20m, budget 45m, slack 25m.The two pins
Both pins are written into Build Core's
Turbo remote cache (#21186)comment as a PINS paragraph, and every carrier points back to it. They are not a new gate.#19086: a step that writes artifacts from a cache-served dist must not be among those served.
TURBO_TOKENhold Build Core's four lines byte-identical and run onlyturbo run build/pnpm build, and no job setsTURBO_*at job level. The dry-run plans above contain notest,test:repo,typecheckorgen:*task.gen:schemaandgen:skill-refsare cacheable turbo tasks, but no workflow runs them through turbo (turbo run gen: 0 hits).gen:,--fixand--writegives 0 hits, so no step there writes tracked artifacts.Type Check · workspacestays off the remote. Every build task its^buildclosure schedules is already in the wired build step's plan (66 of 66, 0 extra), so it replays them locally.#21193: the build hash covers every root input the builds read. I re-ran #21193's probe on
3d9188502e: append one comment line to a file, re-derive the 72-task Build Core plan, restore fromHEAD, and prove the restore by blob hash.tsup-drop-sources-content.mjs,check-dts-emitted.mjs,invoked-as.mjscheck-dts-references,ts-parse,check-regen-pending,regen-artifacts,git-env,import-prerequisite,cli-build-prerequisite,check-dev-prereqs,build-input-hash,workspace-enumerator,js-comment-masksync-scaffold-emission-policy.mjs,sync-template-versions.mjs,packages/cli/src/commands/init.tstsup.config.tsscripts/check-turbo-task-graph.mjs,ci.yml,lint.ymlThese are #21193's own numbers. The last row also shows that this PR's own diff moves no build hash. A static check agrees: the import closure of every root script that a build command or a tsup config names lies inside the declared
$TURBO_ROOT$inputs. The spec generators' closure (450 files) reaches 10 root scripts, all declared.Measurement (before / after)
Before. Build-step seconds, from the jobs API:
mainpush at base3d9188502e(CI37627942232/ Lint37627942309)37623284168/ Lint37623284080)Build packages (excluding docs)(reads the remote already)Build workspace packagesRun this shard's tests(closure plus tests), shards 1-6After (seat-appended from the dev's report
6040381091on #22077; this PR'spull_requestrun, CI37635720375/ Lint37635720510, headcbb948b926). Step seconds from the jobs API:mainpush, base3d9188502e)Build workspace packagesBuild this shard's dependency closure, shards 1-6Most of that main-to-PR delta is the local
actions/cacheseed, which this run restored from the base push. The attributable reading is the same-base control, Lint37632788013(PR #22084: no remote, same seed), against Lint37635720510:Build the ledgered packages' dependencies: controlRemote caching disabled/Cached: 66 cached, 71 total/Time: 29.447s; this PRRemote caching enabled/Cached: 71 cached, 71 total/Time: 527ms >>> FULL TURBO;Cached: 66 cached, 71 total/Time: 29.819s; this PRCached: 71 cached, 71 total/Time: 558ms >>> FULL TURBO.The 5 tasks the control executed lie outside the plan the typecheck seed is saved from, so the remote served them here. Turbo's lines for the dogfood, workspace, driver-sql and non-SQL steps are NOT MEASURED: they fall outside the last 5000 log lines the read path returns. The merge-queue reading is pending: the seat takes it from this PR's own queue entry at landing and records it.
How to read the after numbers: a PR's restored
actions/cacheseed comes from the latestmainpush. A cache hit does not say whether the local seed or the remote served it. So the clean signal is the nextmainpush after landing: today Build Core takes 6 s there while the Type Check lanes take about 300 s.Kept as ruled
check:required-contextsis green.actions/cacherestore and save steps are untouched. They stay until the remote hit rate is measured.turbo.jsonandscripts/**are not touched.Local gates
The gates come from
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon this diff: 52 commands. Each exit code was written to disk before it was read. The full table, with exit codes and the--ranreconciliation, is in theos-dev-reporton #22077. The workflow readers were green before this PR opened:check-ci-filter-parity,check-self-test-workflow-commands,check-step-collectors,check-self-test-wired,check-aggregator-roster,check:stall-guard-budget,check:workflow-step-name-quoting,check:required-contexts,check:pnpm-filter-targetsandcheck:pm-expected-skips.Acceptance notes
Dogfood Verify CLIandConsole Pin Gatealso run turbo builds. The card does not name them, so they are not wired here.Type Check · source gateslane runs no turbo build, so it has nothing to wire..github/workflows/**, which publishes nothing.skip-changesetapplies.Generated by Claude Code