Repository navigation
test(ui/scripts): the inputs guards and the lychee pins read the configs that run; ui/lychee.toml is deleted, ui/turbo.objectui.json stays - #27281
Conversation
…e remap pin read the config that runs No turbo invocation in this repository reads ui/turbo.objectui.json and no workflow reads ui/lychee.toml: every `turbo run` resolves the root turbo.json, and check-links.yml passes the root lychee.toml. The guards whose property the root files carry now read them: `type-check` and package `lint` inputs through uiScopedTurboConfig, and the no-remap pin against the root lychee.toml. The guards whose property the root config does not carry keep reading the parked copies, unchanged, so both files stay. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW
…lete the unread ui/lychee.toml The pin held objectui's root_dir sentinel in ui/lychee.toml, a file no workflow reads. The lane that runs, the root check-links.yml, resolves site-absolute routes with --root-dir at the content root plus --fallback-extensions, so the pin now reads that argv: the root lychee.toml config, an absolute --root-dir over the tree /docs routes live under, and the mdx/md fallbacks. With its last reader retargeted, ui/lychee.toml goes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW
…token Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW
|
domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW 席位核对 — ACCEPT · domain:devx#2 · head
|
Part of #26080
Clause-②: no
Metadata-protocol: none
维护者速读
ui/turbo.objectui.json和ui/lychee.toml没有任何真实运行会读(turbo 只解析根turbo.json,check-links.yml只读根lychee.toml)。三组守卫原本对着这两份死配置断言,现在改读真正生效的根配置:type-check输入守卫、包级lint输入守卫、lychee「不许有 remap」守卫。断言一条没删,也没放宽。另把 lychee 的站内路由守卫改为读 check-links.yml 的 lychee 参数(只读不改 workflow),ui/lychee.toml已无读者,删除。turbo.json删掉一条 ui 输入,立刻红 38 条。ui/scripts/__tests__下的 4 个测试文件与 1 份死配置,不动运行时、构建配置、workflow,也不动任何发布包;回滚 = revert。ui/lychee.toml已删;ui/turbo.objectui.json这次不删:用根配置去跑旧断言会红 147 条,其中不少属性在根配置里根本没有对应项。按裁决不许放宽,这些守卫只能继续读旧文件,具体列在 Acceptance notes,要你来定。ui/scripts/__tests__/helpers/turbo-inputs.ts(新增liveTurboConfig/parkedTurboConfig,默认值仍是旧文件);2)ui/scripts/__tests__/check-links-workflow.test.ts的liveLycheeConfigPath;3) Acceptance notes 第一条:根build任务没有哈希 ui 的根脚本。pnpm --dir ui exec vitest run scripts/__tests__/turbo-type-check-inputs.test.ts scripts/__tests__/turbo-lint-inputs.test.ts scripts/__tests__/check-links-workflow.test.ts,预期 3 个文件全绿;在根turbo.json的type-check.inputs里删掉"$TURBO_ROOT$/ui/tsconfig.json",再跑,预期 type-check 守卫红。What changes
Slice 2 of ruling A, item (3):
ui/turbo.objectui.jsonandui/lychee.toml.Measured: no real run on
mainreads either file (readings below). Everyturboinvocation, whether in workflows, the rootpackage.jsonscripts, or turbo's own config resolution, resolves the rootturbo.jsonplus the package-levelui/apps/console/turbo.json. Turbo has no flag here that names another root config, and none is passed.check-links.ymlpasses--config lychee.tomlfrom the repository root, and no workflow readsui/lychee.toml. So both files are dead config, read only by tests.The retarget. The live counterpart of the parked turbo config is
uiScopedTurboConfig()(ui/scripts/workspace-root.mjs): the rootturbo.json, narrowed to theui/subset. It is the same reader the productionselect-type-check-scope.mjsalready uses. Swapping the parked file's content for that live config (probe below) sorts each guard into one of two groups.turbo-type-check-inputs.test.ts(viahelpers/turbo-inputs.ts)liveTurboConfig()turbo-lint-inputs.test.ts, the packagelintdescribeliveTurboConfig()turbo-lint-inputs.test.ts, the//#lint:rootdescribeturbo-build-inputs.test.tsturbo-test-inputs.test.tsturbo-task-guard-coverage.test.tscheck-dist-completeness.test.ts(build-input case)e2e-type-check.test.ts(wiring cases)select-type-check-scope.test.tsturbo-build-outputs-cover-published-entries.test.tsworkspace-root.test.ts(uiTurboConfigPathitself)check-links-workflow.test.ts, "carries no remap"remap)lychee.tomlcheck-links-workflow.test.ts, site-route pincheck-links.ymlLYCHEE_ARGS(--config lychee.toml, absolute--root-dirover the docs tree,--fallback-extensions mdx,md)ui/lychee.tomlhas no reader left and is deleted.helpers/turbo-inputs.tsnow exportsliveTurboConfig()andparkedTurboConfig().taskInputs/rootAnchoredInputstake the config as an optional second argument, defaulting to the parked copy, so every guard not listed as retargeted reads exactly what it read before.ui/turbo.objectui.jsonis not deleted. Readers whose property has no live counterpart still need them, and the ruling forbids loosening those guards. See Acceptance notes.Item (2), checked:
ui/docs/adr's index prefix is settled onmain. PR #26503 merged as79cd9ef8(git merge-base --is-ancestor 79cd9ef8 HEAD→ exit 0, a self-proving leg).docs/adr/README.md:11and:215list the ObjectUI registry under theui-prefix, with files untouched, andscripts/adr-index.mjsgenerates it. No edit is needed, and none is made. A pointer would land inui/docs/adr/**(governed) and buys nothing.Tests
pnpm --dir ui exec vitest run --maxWorkers=2 scripts/on head88bd2bb7(lock VERDICT command-exit 0): Test Files 174 passed | 2 skipped (176), Tests 5003 passed | 2 skipped (5005).pnpm --dir ui run type-check:scripts: exit 0.git hash-object= the HEAD blob, plus an emptygit status --porcelain.node scripts/ablation-replace.mjs --file turbo.json --anchor '"$TURBO_ROOT$/ui/tsconfig.json",' --delete(anchor 1 → 0, blob6d3dece1ae49→5b5820c9f5f8). Result:turbo-type-check-inputs.test.ts38 failed (one per@object-ui/*package). Before this PR, the same root edit could not reach that guard: it read only the parked copy.remap = [...]to the rootlychee.toml(grep -c '^remap'0 → 1). Result: "carries no remap pretending to resolve fumadocs routes" failed.--root-dir, then--fallback-extensions, from the on-diskcheck-links.yml(ablation-replace, blobfd75bd9ccaeerestored by hash, never committed) turns the site-route pin red with its own message each time.Acceptance notes
buildandtesttasks do not hash the ui tree's root files.$TURBO_ROOT$/tsconfig.json,scripts/vite-*.ts,scripts/build-plugin-stylesheet.mjs,scripts/check-dist-completeness.mjs,scripts/invoked-as.mjsandscripts/vitest-invocation-guard.mjsforbuild, plus the vitest config and setup set fortest.turbo.jsoncarries none of them underui/. Measured:pnpm exec turbo run build --filter=@object-ui/components --dry=json→ the task's root-anchored inputs are exactlyscripts/check-dts-emitted.mjs,scripts/invoked-as.mjsandscripts/tsup-drop-sources-content.mjs. Meanwhileui/packages/components/vite.config.ts:14-15importsui/scripts/vite-dts-*.ts, and itstsconfig.jsonextendsui/tsconfig.json.@object-ui/*build in anyturbo run buildthat includes ui packages (rootpnpm build).turbo-build-inputs,turbo-test-inputs,check-dist-completeness's build-input case) stay green because they read the dead copy.build/testinputs. Every@objectstack/*package then also hashes them, so this edits the real cache keys. Then retarget those guards and delete the parked file.turbo.jsonfiles that extend the root.turbo.jsonbehaviour change, so it is its own card, not this slice. Seat: [devx] root turbo.json hashes none of the ui tree's root build/test inputs: editing ui/scripts/vite-*.ts or ui/tsconfig.json can replay a stale @object-ui/* build from cache #27283 carries the root turbo.json ui-input gap, with these guards riding it.//#lint:rootand//#type-check:e2eare root tasks of objectui's own manifest. In the root config,//is the objectstack root package, so they cannot exist there. CI runs them as plain steps (pnpm --dir ui run type-check:e2e, ci.yml's ported-jobs header).turbo-lint-inputs//#lint:rootdescribe,e2e-type-checkwiring,select-type-check-scope's root-task case, part ofturbo-task-guard-coverage) can only ever read the parked copy.ui/lychee.tomlis deleted.select-type-check-scope.test.tsdrives the selector with the parked config, while the selector in production (select-type-check-scope.mjs:324) readsuiScopedTurboConfig. Against the live config, two cases go red: e2e files no longer widen, because//#type-check:e2edoes not exist there. The test stays as is (point 2).turbo-build-outputs-cover-published-entries:ui/apps/console/turbo.jsonrestates the parkedbuild.outputs, not the root's (it lacksjson-schema/**and!.next/cache/**). The "no package configuration narrows the root outputs" case is the one red against live. It is noted only: console emits neither path.Verification
Reading 1: no turbo invocation names the parked file
Reading 2: no workflow reads ui/lychee.toml
Reading 3: probe, the live config substituted for the parked one (base 4d3a077, restored by hash)
Reading 4: derived gates on head 88bd2bb
🤖 Generated with Claude Code
https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW
Generated by Claude Code