Repository navigation
fix(scripts): a diff of sdui.manifest.json alone now derives pnpm check:sdui-reference - #27528
Conversation
…patch-gates The generator reads the repo-root sdui.manifest.json through a bare single-segment literal, which the derivation refuses as too generic, so a diff that changed only the manifest never derived pnpm check:sdui-reference. Declare it with the repo-root-file hint idiom (sdui.manifest.json/**), hold the declaration equal to MANIFEST_PATH in the generator's self-test, and pin the placement against the live fleet in the dispatch-gates self-test. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2dPRZXfgE1A2Vct3FU
|
domain:skills#1 · marchtian · session_017ihL2dPRZXfgE1A2Vct3FU 席位核对 — ACCEPT · #27367 · head
|
|
domain:skills#1 · marchtian · session_017ihL2dPRZXfgE1A2Vct3FU Contract reviewServed-tier: ① Derived judgmentsNo published accept set or public surface moves: both files are repo-root tooling of a ② Semver levelNo package is released by this diff; no changeset owed ( ③ Boundary flagsThe dev raised no Implemented-by: VERDICT: PASS |
Requested by 田騏 · project thread
Fixes #27367
Clause-②: no
Metadata-protocol: none
维护者速读
scripts/gen-sdui-reference.mjs新增一行ROOT_FILE_WATCH_HINTS = ['sdui.manifest.json/**']声明它读取仓根清单,并在其自测里校验该声明与MANIFEST_PATH一致;dispatch-gates自测加两条用例钉住这一推导。sdui.manifest.json的 PR 之前推导不出pnpm check:sdui-reference,开发者照工具清单跑完仍会在 CI 变红;现在能推导出来。scripts/,不发布任何包,不改匹配器;回滚即 revert 本 PR。scripts/gen-sdui-reference.mjs(声明与自测里的声明校验)、scripts/pm/dispatch-gates.self-test.mjs(两条新用例)。node scripts/pm/dispatch-gates.mjs --commands sdui.manifest.json,预期输出里出现pnpm check:sdui-reference(main 上没有)。What changes
scripts/gen-sdui-reference.mjs: declares the repo-root manifest it reads asROOT_FILE_WATCH_HINTS = ['sdui.manifest.json/**'], the same hintscripts/check-sdui-manifest.mjsdeclares for that file. The bareMANIFEST_PATHliteral has no separator, andhintCoversrefuses that shape as too generic, so onlyOUT_DIRwas visible to the derivation. Per the triage ruling, the matcher is not widened. The fix is this declaration.--self-testnow checks the declaration, the waycheck-sdui-manifest.mjschecks its own (outside the cases table, so the battery roster and floor do not change). It fails when the declared paths are not exactly[MANIFEST_PATH], and when a repo-root entry is missing the/**suffix.scripts/pm/dispatch-gates.self-test.mjs: two cases beside the existing repo-root-file declarations. They run against the live fleet (discoverFamilies()+placeFamily). (1) A diff ofsdui.manifest.jsonalone placescheck:sdui-referenceasmatched. (2)examples/sdui.manifest.jsondoes not, so the declaration covers only the one file it names.scripts/pm/dispatch-gates.mjsordispatch-gates.data.mjs. No changeset: rootscripts/belongs to no published package (the root manifest@objectstack/spec-monorepoisprivate: true), so this PR carriesskip-changeset.ROOT_FILE_WATCH_HINTS, notROOT_WATCH_HINTS.check-watch-hint-literal.mjsdefines the name as the kind of root: repo-root files areROOT_FILE_, mixed roots areROOT_. This population is one repo-root file. The hint value is byte-identical to the onecheck-sdui-manifest.mjsdeclares, andcheck:watch-hint-literaladmits it (14ROOT_FILE_WATCH_HINTSdeclarations, previously 13).Tests
Tree:
objectstack-ai/objectstackat3e920461(baseded67bfb).pnpm check:sdui-reference: exit 0.✓ gen-sdui-reference self-test: 20 cases pass.and✓ gen-sdui-reference --check: content/docs/ui/components/ matches sdui.manifest.json (106 components on 7 pages).pnpm check:pm-dispatch-gates: exit 0.✓ dispatch-gates self-test (fast tier): 1937 cases pass; 7 slow section(s) deferred.The two new cases ran in the fast tier:✓ a diff of sdui.manifest.json alone derives pnpm check:sdui-reference✓ and that declaration claims no same-named file inside a directorynode scripts/check-sdui-manifest.mjs --self-test: exit 0 (21 cases).ded67bfbthe family's hints were["content/docs/ui/components"]andplaceFamily(..., ['sdui.manifest.json']).verdictwassilent. On3e920461the hints are["content/docs/ui/components","sdui.manifest.json/**"]and the verdict ismatched.ui/apps/console/sdui.manifest.jsonstayssilent.Acceptance notes
Verification
Before / after: dispatch-gates --commands sdui.manifest.json
Before, on
ded67bfb(11 commands, nocheck:sdui-reference):After, on
3e920461(12 commands): the same 11 rows pluspnpm check:sdui-reference.diff before afterprints exactly> pnpm check:sdui-reference. Footer moves from11 command(s) — 5 pnpm, 6 direct node (3 matched by path …)to12 command(s) — 6 pnpm, 6 direct node (4 matched by path …).Local gates derived for this diff (31), with exit codes
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat3e920461derived 31 commands. Each one ran with exit 0:check-closing-keyword-parity(+--self-test),check-comment-mask-corpus,check-declaration-mirrors(+--self-test),check-self-test-wired(+--self-test),check-self-test-workflow-commands(+--self-test),check-whole-set-label-write(+--self-test),ci/plan-test-core-shards --self-test,pm/bare-root-worklist --self-test, andpnpm check:agent-test-spelling,bash32-floor,ci-filter-parity,cli-command-ids,cross-package-test-inputs,driver-memory-census,entry-guard,gitlink-declared,nul-bytes,parse-guard,pm-dispatch-gates,pnpm-filter-targets,pnpm-flag-spellings,ratchet-remedy-authority,refd-timer-probe,scripts-symbol-anchors,sdui-reference,watch-hint-literal.Reconciliation,
--ranover a record carrying an exit code on every row:✓ dispatch-gates --ran: 31 derived famil(ies) accounted for — 31 run, 0 NOT-MEASURED (a DERIVED zero — all 31 recorded an exit code and none of them is 3).CI-only steps that
--commandsdoes not print (Plan Test Core shards and the type-check lanes) are left to this PR's check-runs.🤖 Generated with Claude Code
https://claude.ai/code/session_017ihL2dPRZXfgE1A2Vct3FU