Repository navigation
Conversation
…Windows A test task's hash only covered its direct dependencies' build tasks. tui and script have no build task, so core, codemode, plugin-browser and ui never reached cli#test's hash, and Linux replayed cached cli test passes from the runner's remote cache for commits that changed core. Every test task now also depends on a transit task, which runs nothing but folds the whole workspace closure into its hash. The root package.json is a global dependency, so a Bun upgrade through packageManager invalidates results. Windows unit jobs had no Turbo cache at all. Restore one keyed by week on Windows, save it from pushes to dev, and skip it on manual runs.
3 of 6 tasks
Member
Author
|
Combined into #55866, which squashes this whole stack into one change (rebased onto current dev). The evidence for this part stays here for reference. |
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.
Issue for this PR
No issue. Fifth PR in the
testspeed-up stack, based on #55692.Type of change
What does this PR do?
Linux CI replays stale test passes.
unit (linux)has used the Blacksmith runner's Turbo remote cache since early October. A test task's hash covers its package plus its^builddependencies, and each build hash covers only that package's own files (buildhasdependsOn: []).tuiandscripthave no build task, socore,codemode,plugin-browser,simulationanduinever reachcli#test's hash.codemodeandplugin-browserlikewise never reachserver#testortui#test. All packages exportsrc, so these tests do run the changed code.Example: runs 38691743520 and 38692392415 on dev both changed only
packages/core/src/mcp/client.ts, and both logged@opencode/cli:test: cache hit, replaying logs 021fe0708552bc59. cli's tests never ran against either change. Over the last 60 dev pushes, 14 Linuxcli:testexecutions were replays like this.Every
<pkg>#testnow also depends on atransittask ("transit": { "dependsOn": ["^transit"] }). No package has atransitscript, so nothing new executes, but each test hash now folds in its whole workspace closure. The rootpackage.jsonis also a global dependency now: a Bun upgrade throughpackageManageralone changed no test hash before (for example df05945, Bun 1.3.14 → 1.4.0).Checked with
turbo run test --dry=json:packages/core/src/account/sql.tspackages/codemode/src/index.tsWindows gets a Turbo cache. Windows runners have no remote cache (
Remote caching disabled), so everyunit (windows)run rebuilds all^builddependencies. The oldactions/cachestep for Turbo (removed in #55690) cachednode_modules/.cache/turbo, a path Turbo 2 never writes to. Windows now restores.turbo/cache:From replaying the last ~140 Windows runs against a cache built from dev pushes: about 15s median / 22s mean off
unit (windows), almost all from replayed builds (server, core and simulation builds are 27-34s each on Windows). The save step makes dev pushes a few seconds slower.Measured on Windows with two back-to-back manual runs of this commit on a scratch branch (restore and save enabled for manual runs there only):
unit (windows)turbo-Windows-2026-W42-…)26 cached, 27 total;desktop:testhascache: false)The warm run is the best case: the same tree, so everything replays. On a normal PR only the builds and the tests whose workspace closure didn't change replay, which the simulation above puts at about 15s median. Restore and save cost about 1s each.
Not included:
typecheckhas the same gap ("typecheck": {}has no^dependencies), but changing it affectscheck.ymland belongs in its own PR.How did you verify your code works?
turbo run test --dry=jsonbefore and after, as above, including the executed task set.case()and Blacksmith runner label warnings).Screenshots / recordings
N/A
Checklist