Repository navigation
build(turbo): hash the Service Worker generator into the Console's build and type-check only - #29504
Conversation
…onto the Console's own tasks
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkrepTAZhPsbF4oG6
|
domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y 席位核对 · ACCEPT · 2026-11-02T17:17ZHead-sha:
Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 41490080553 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 41491869362 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y Landed · 2026-11-02T18:36Z · PR #29504 merged through the merge queue as
The card closed through Generated by Claude Code |
Requested by Steedos · project thread
Fixes #29361
Clause-②: no
Metadata-protocol: none
维护者速读
ui/packages/mobile/src/serviceWorkerSource.ts不再挂在根turbo.json通用build/type-check的输入上,改挂到 Console 自己的ui/apps/console/turbo.json(带$TURBO_EXTENDS$,根输入照常继承)。通用test输入保留。ui 的两个 turbo 输入守卫改为按「turbo 对该包实际解析出的输入」判定,能读懂包级turbo.json。@object-ui/*包的 build/type-check 缓存失效,实际只有 Console 读它。总监在 PR feat(console): installable desktop PWA with an offline app shell and a push-ready Service Worker #29326 合同复审里提的 should-fix。ci.yml未动,check:ci-filter-parity绿。回滚即 revert。ui/apps/console/turbo.json(两条 inputs 必须带$TURBO_EXTENDS$,否则 Console 的根输入全丢);ui/scripts/__tests__/helpers/turbo-inputs.ts的packageTaskInputs;turbo-build-inputs.test.ts新增的逐包$TURBO_DEFAULT$断言。pnpm exec turbo run build type-check --filter=@object-ui/console --filter=@object-ui/core --dry=json,给生成器末尾加一行注释再跑一次:Console 两个 hash 变,core 两个不变。What changes
turbo.json: the generator leaves the genericbuildandtype-checkinputs. The generictestinput stays, because the root ui vitest config loads the Console'svite.config.ts.ui/apps/console/turbo.json:buildandtype-checkdeclare["$TURBO_EXTENDS$", "$TURBO_ROOT$/ui/packages/mobile/src/serviceWorkerSource.ts"], so the Console keeps every root input and adds the generator.ui/scripts/__tests__/helpers/turbo-inputs.ts(ruling A, claim amendment 6581882409):packageTaskInputsresolves a package's task inputs the way turbo does. Noinputson the package task inherits the root list; a list holding$TURBO_EXTENDS$is the root list plus its entries; a list without it replaces the root list. A rootPACKAGE#TASKoverride for the package throws, because the reader does not implement that shape.packageTurboConfignarrows the package config like the root one.turbo-build-inputs.test.tsandturbo-type-check-inputs.test.ts: each package row is judged against its resolved list. The phantom-input and earned-input assertions also cover each package's own$TURBO_ROOT$entries, earned only by that package's program. The build suite gains a per-package assertion that the resolved list still carries$TURBO_DEFAULT$. No rule is loosened, no row exempted, no assertion deleted.turbo-inputs-package-config.test.ts: fixtures for each resolution, the throw cases, and live-tree pins (Console build/type-check hash the generator plus the root list;@object-ui/corebuild/type-check do not; every package'steststill does).No changeset: nothing here ships.
@object-ui/consolepublishesdist,plugin.*andREADME.mdonly; the rest is repo tooling.skip-changesetis set on this PR.Tests
Hash proofs,
turbo run build type-check test --filter=@object-ui/console --filter=@object-ui/core --filter=@object-ui/app-shell --dry=json(turbo 2.11.10), before and after appending a comment to the generator:main (6af3d29): every package's build and type-check move
@object-ui/core#build@object-ui/core#type-check@object-ui/console#build@object-ui/console#type-check@object-ui/coredoes not depend on@object-ui/mobile(its build closure has 4 tasks, none of them mobile's), so its move came from the input alone.this branch: only the Console's build and type-check move; every test still moves
@object-ui/core#build@object-ui/core#type-check@object-ui/core#test@object-ui/console#build@object-ui/console#type-check@object-ui/console#test@object-ui/app-shell#test@object-ui/console#buildhashes 457 files, the same count as on main, with all 9ui/scripts/vite-*.tsroot inputs present.@object-ui/app-shell#buildstill moves because it depends on@object-ui/mobile#build, not through the input.With the marker removed from
ui/apps/console/turbo.json,@object-ui/console#buildhashes 3 files ($TURBO_DEFAULT$and the root list are gone). With the marker written last instead of first it hashes the same 457. Restored from HEAD after each probe,git diff HEADempty.Reverse checks on the suites
@object-ui/consolerows of both suites, each readingserviceWorkerSource.tsfrom outsideapps/console. This is the red the ruling asked to teach away.$TURBO_DEFAULT$case, two live-tree pins).git checkout HEAD --;git status --porcelainempty after.Acceptance notes
turbo-test-inputs,turbo-lint-inputs) still read the root list only. No package config declarestestorlinttoday, so their verdicts are unchanged; they can takepackageTaskInputswhen one does.check:ci-filter-parityreads rootturbo.jsononly (its header names a package-levelturbo.jsonas a known bound). Thecore:row for the generator stays, held by the generictestinput.ci.ymlis untouched.turbo.json, in a@objectstack/*#testtask about 600 lines away from these hunks. No overlap.Verification
On head 84365b1 (main merged at 6af3d29):
pnpm check:ci-filter-parity: exit 0 (self-test 138 assertions; 29 build inputs and 9 test inputs covered, no leftover).pnpm --dir ui exec vitest run scripts/under the verify lock: exit 0, 170 files passed / 2 skipped, 4972 tests passed / 2 skipped.pnpm --dir ui run type-check:scripts: exit 0.eslinton the four changed ui files: exit 0.pnpm --dir ui run lint:root: exit 0, no warning in these files.dispatch-gates --commands: 31 derived. 27 exit 0.check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closureandcheck:sourcemap-no-sources-contentexit 3 (PREREQUISITE NOT MET, nodist/without a fullpnpm build): NOT MEASURED locally, Build Core runs them on this PR.--ranreconciliation: 31 accounted, 27 run, 4 NOT-MEASURED, 0 UNRUN.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (eslint on the changed ui files andlint:rootlocally; the repo-wide run is CI's)main, one pull request.skip-changeset)packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTkrepTAZhPsbF4oG6
Generated by Claude Code