Repository navigation
ci(dogfood): carry the shard slice in a task env so the dogfood test hash sees its upstream closure - #21074
Merged
objectstack-fleet[bot] merged 3 commits intoOct 1, 2026
Conversation
…hash sees its upstream closure
Contributor
📓 Docs Drift Check
What this run could not see
Coarse fallback — 2 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
objectstack-fleet
Bot
deleted the
claude/issue-20820-dogfood-shard-honest-hash
branch
October 1, 2026 05:51
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 #20820
Clause-②: no
What
The required
Dogfood Regression Gate (k/3)leg ranturbo run test --filter=@objectstack/dogfood --only -- --shard=k/3.--onlydrops the^buildclosure out of thedogfood#testhash, so a PR that changed only an upstream package could match a main-seeded cache entry and be replayed green. This ports #19278's shape to the dogfood leg:turbo.json:@objectstack/dogfood#testnow declaresOS_TEST_SHARDin itsenv. The sharedtesttask already declares it (ci(test-core): carry the shard slice in a task env so the slice leg's hash sees its upstream closure (#19278) #20824), but a per-package task entry REPLACES the shared entry'senvinstead of extending it, so the shared declaration did not cover dogfood: measured, the pre-change plan listed onlyOS_TEST_TIERSfor that task.packages/qa/dogfood/vitest.config.ts: readsprocess.env.OS_TEST_SHARDinto the roottest.shard(same spelling aspackages/cli/vitest.config.ts)..github/workflows/ci.yml: the leg exportsOS_TEST_SHARD="k/3"and runspnpm turbo run test --filter=@objectstack/dogfood --log-order=stream: no--, no--only, no--force. Stall guard,dogfood.logtee,NODE_OPTIONS/--report-dir, cache restore/save are untouched. The step's comment states the new mechanism.Also touched (comment only, one deviation from the card's file surface, flagged): the comment of the preceding closure-build step said it exists "so that the sharded run in the next step can be
--only", which is now false; it now says so. The step itself is unchanged.No second shard mechanism.
scripts/measure-test-shard-timings.mjs/partition-test-shards.mjs/report-test-timings.mjsare untouched: the dogfood leg passes no--summarizeand has no timings consumer, so there is nothing to reuse or change.Measurements
turbo 2.10.10 dry-runs (
--dry=json) and real vitest runs, in this worktree at head 55bd9e0.Pin 1, hash moves (shard 1/3, edit = append a comment line to the file, restored from HEAD after):
packages/objectql/src/index.ts--only -- --shard=1/3)The pre-build and post-build clean hashes differ (d6f169ed vs bd114335); I did not isolate why (suspect built output under the
examples/app-showcase/**input). Each row's before/after is on one tree.Pin 2, lit control (post-build tree, shard 1/3, clean bd114335fad78510):
packages/client-react/src/index.tsx(a workspace package NOT in the dogfood closure, checked against the plan): bd114335fad78510, unchanged.packages/qa/dogfood/test/action-params-contract.dogfood.test.ts(dogfood-internal): a5dc81d7aadebe29, moves.Pin 3, shards differ: post-build 1/3 bd114335fad78510, 2/3 0387e6b5b568a93c, 3/3 d3b158ab11f62582; pre-build d6f169ed1431553e / fd1f57f4bbe9537f / bc48cac953e838cc. Pins 1 to 3 are dry-run hash readings, not executions.
Pin 4, the shard is honoured: vitest 4.1.11 (lockfile). Real
OS_TEST_SHARD=k/3 vitest runinpackages/qa/dogfoodran 50 / 49 / 49 test files (148 in total, 148 in the union, 0 overlap between any two shards), 0 failed in each.vitest list --filesOnlyis NOT a valid measure of this: it prints all 148 files for any shard, even with--shard=1/3on the command line. #21032's vitest 5.0.2 is NOT MEASURED; the env-read shape is the onepackages/cli/vitest.config.tsalready uses, so the dogfood read breaks together with it if a vitest line stops honouringtest.shard.Plan cost of dropping
--only(OS_TEST_SHARD=1/3 turbo run test --filter=@objectstack/dogfood --dry=json): 66 tasks. Against the cache the step above fills: 63 HIT / 3 MISS (the test, plus two#buildnodes of packages with nobuildscript, which never execute); cold cache: 66 MISS. The leg's 65buildhashes are identical toturbo run build --filter=@objectstack/dogfood's plan (65 same, 0 differ, 0 missing), so the closure replays rather than rebuilds. The old leg planned 1 task.Pin 5, nothing is replayed green: a replay needs an equal
dogfood#testhash. That hash now carries the shard value (pin 3), the upstream closure (pin 1) and the package's own files (pin 2), the control shows it is not moving on everything, and pin 4 shows the shard value is what selects the files that execute. NOT MEASURED: an end-to-end executed replay across an upstream edit on the new leg.Gates
node scripts/pm/dispatch-gates.mjs --commands: 79 derived; 78 run, all exit 0, recorded with--ran.pnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET:Run pnpm build first, nothing measured), so it is NOT MEASURED; the diff changes no built output.pnpm --filter @objectstack/dogfood typecheckexit 0, but that program does not compilevitest.config.ts(0 hits intsc --listFiles), so thesatisfiesclause is checked only by vitest loading the file. actionlint is not installed here: NOT MEASURED;ci.ymlparses as YAML andturbo.jsonas JSON.Changeset
None.
@objectstack/dogfoodis"private": true, andci.yml/turbo.jsonship in no package'sfiles[].Acceptance notes
None beyond the above.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv