Repository navigation
ci: prune the build-core, typecheck and pack-smoke Turbo seeds before saving them - #27067
Conversation
… saving them Wires scripts/ci/prune-turbo-cache.mjs in front of the four remaining per-sha Turbo seed saves (Build Core, Type Check · workspace and the two pack-smoke jobs), as Test Core, Build UI Deps, Type Check UI and Lint UI already are, so each seed keeps only the task entries its own run used. The typecheck and pack-smoke turbo runs gain --summarize, which the prune reads; the pack-smoke jobs split actions/cache into restore + save so the save can sit behind the prune, keeping the post-step's gate. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYooUn7D13pPguPf727
Contract reviewServed-tier: Inputs read: card #26957 body and all 5 comments (ruling 6458731814 letter A; claim 6459608872; os-dev-report 6460037369), PR #27067 body and file list, the net diff ① Derived judgments
② Semver levelNothing publishes: the diff is four workflow files, no package source, no changeset. The ③ Boundary flagsThree
Other dev flags:
④ Design judgmentJudged against the ruling's scenario: a seed that holds only the task entries its own run used, every PR still restoring a warm seed, no seed dropped, wiring only.
Must-fix: none. Implemented-by: VERDICT: PASS Generated by Claude Code |
Matches the main-phase saves in ci.yml's ui jobs, so a stalled upload cannot run the job into its ceiling after its verdict is recorded. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYooUn7D13pPguPf727
Contract reviewServed-tier: Delta review on the head that follows ① Derived judgments
② Semver levelUnchanged: nothing publishes, ③ Boundary flags
④ Design judgment
Must-fix: none. Should-fix: none new; S2 stays open only until Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 — ACCEPT · domain:devx#2 · head
|
Fixes #26957
Part of #25452 (step 2 of its directive, rewritten by ruling 6458731814 to "prune, not drop"; step 3, the pool reading after at least 5 merges, stays open there)
Clause-②: no
Metadata-protocol: none
维护者速读
prune-turbo-cache.mjs后面,种子只留本次运行用到的任务条目;不删种子、不加脚本、不加门禁、不抬池子上限。.github/workflows/的四个文件;最坏情况是某次 push 不保存种子(无运行摘要即save=false),下一个 PR 退回上一份种子;回滚 = revert 本 PR。.github/workflows/lint.yml(typecheck 两条 turbo 命令加--summarize,否则修剪会丢掉 typecheck 条目);.github/workflows/publish-smoke.yml(actions/cache拆成 restore + save,保存门槛与原 post-step 一致);.github/workflows/ci.ymlBuild Core 尾部。node scripts/ci/prune-turbo-cache.mjs --self-test,预期最后一行prune-turbo-cache self-test: OK (25 case(s) across 5 batteries).What changes
Ruling 6458731814, verbatim from #26957: "Letter A, prune, do not drop: the Build Core, Type Check · workspace and pack-smoke per-sha seeds stay, and each seed-save step is wired behind
scripts/ci/prune-turbo-cache.mjs --site …exactly as Test Core, Build UI Deps, Type Check UI and Lint UI are today, so a seed holds only the task entries its own run used." and "⛔ The pool limit is not raised here" stands.Every save site of the three seed families, derived from the YAML at
origin/maincb8988ee14(eachactions/cache*step whose key resolves toturbo-build-core-,turbo-typecheck-orturbo-pack-smoke-):--summarize?build-core)ci.ymlalways() && pushpnpm build --summarize, summary left in.turbo/runs/)--site 'Build Core'; save ANDssave == 'true'typecheck-workspace), the one designated typecheck writerlint.ymlalways() && pushturbo run typecheckNO--summarizeadded to bothturbo run typechecklines; prune step--site 'Type Check · workspace'; save ANDssave == 'true'pack-smoke)publish-smoke.ymlworkflow_runafter Release,workflow_dispatch), job green, exact key missed (theactions/cachepost-step)pnpm run build)--summarizeadded;actions/cachesplit intoactions/cache/restore+actions/cache/savebehind the prune, same gate:success() && cache-hit != 'true' && save == 'true'pack-smoke)pack-smoke-optin.ymlpull_requestwithneeds:pack-smoke, job green, exact key missedRestore-only sites, untouched:
ci.ymlui-published-artifacts;lint.ymltypecheck-source-gates,typecheck-debt,typecheck-consumers;test-nightly-tiers.ymltiers(L186 is a restore, not a save, so no wiring is owed there). The pack-smoke seed is keyed${{ runner.os }}-turbo-${{ github.job }}-${{ github.sha }}, which is why a grep for the literalturbo-pack-smokefinds nothing.Wiring notes:
--summarizedoes not enter a task hash (ci.yml Build Core's ASSERTED paragraph: 83 of 83 identical with and without, turbo 2.11.5), and none of the four TURBO_* remote-cache lines is added anywhere, so the PINS in that comment still hold.continue-on-error: trueand keeps the post-step's semantics: a failedactions/cachepost-step never failed the job, and an explicit save step without the flag could have.cache-hit != 'true', so an exact-key hit, which the post-step never saved, does not touch the restored cache either.--sitelist is pinned anywhere:git grep -n "prune-turbo-cache" -- scripts packages .githubhits only the script itself andci.yml(its CI-filter path and its--self-testin Build Core), and the script's self-test uses the fixture site name only.Tests
node scripts/ci/prune-turbo-cache.mjs --self-test(script unchanged):prune-turbo-cache self-test: OK (25 case(s) across 5 batteries)., exit 0.--cache-dirso the shared cache was untouched: a planted stale entrydeadbeefpluspnpm exec turbo run typecheck --filter=@objectstack/sdui-parser --summarize, then the exact prune command of thelint.ymlsite. Output:kept 1 task entry named by 1 run summary/dropped 3 file(s) the run did not use,save=true; what is left is the typecheck task's three files only. That shows the--summarizethis PR adds is what keeps the typecheck entries.pnpm run build --summarize --dry=jsonechoesturbo run build --filter=!@objectstack/docs --filter=!./ui*/apps/site --summarize --dry=json, so pnpm forwards the flag to turbo in the two pack-smoke jobs.if:, key, command):Rendered steps
Acceptance notes
mainsaves these seeds, so the first reading is the first push run after this lands. Read theprune-turbo-cache: Build Core: …andprune-turbo-cache: Type Check · workspace: …lines (kept N task entries …/dropped N file(s) the run did not use: X MB -> Y MB on disk.) in that run's Build Core and Type Check · workspace logs. The pack-smoke lines (prune-turbo-cache: Packed-tarball smoke (…): …) appear on the next Release-triggered Publish Smoke run, or on a PR carryingneeds:pack-smoke. The MB-scale figure on the card is an extrapolation from Test Core, not a measurement.actions/cache/*read access.${{ runner.os }}-turbo-restore-key fallback, which can restore any Turbo seed family. Wiring only; noted, not filed.Verification
Derived gates (
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack), run on56f9bbcewith each exit code captured before any pipe; reconciled onb782ee2d(the merge oforigin/main3230bdbf, which touches no workflow; the derived list is byte-identical on both):dispatch-gates --ran
The four NOT-MEASURED gates read a built
dist/; this diff changes nothing they read. CI runs them in Build Core.pnpm check:pm-dispatch-gatesexited 0 (1935 cases passin the fast tier). Every other derived family exited 0, among themcheck:self-test-wired,check:self-test-workflow-commands,check:ci-filter-parity,check:workflow-status-functions,check:workflow-step-name-quoting,check:step-collectors,check:shard-attestationandcheck:required-contexts.Governed surface:
.github/workflows/**, Tier H. This lands only through a GOVERNED_APPROVERS approval or the maintainer's hand.Generated by Claude Code