Repository navigation
feat(create-objectstack): the blank starter ships a test story on @objectstack/verify; two test gates read the tsconfig-exclude payload boundary - #22960
Conversation
…jectstack/verify The blank template gains a `test` script, @objectstack/verify and vitest devDependencies, a vitest.config.ts and ONE note.test.ts that boots the project's own stack with bootStack and asserts one business fact through the in-process handle. The Scaffold E2E workflow runs it after install. Ported from the held scaffold branch (812d8db) without its superseded docs page; the template's vitest range is ~4.0.0, the shared scaffold policy's value, instead of the held branch's ^4.0.0. Claude-Session: https://claude.ai/code/session_01VoSxBQujKLZKPwK2u5ehQ6 Co-authored-by: Claude <noreply@anthropic.com>
check-registry-log-declared and check-test-source-alias walked every test file under a package directory, so the blank template's starter test, payload create-objectstack copies into a scaffolded project and never runs, reddened both: one demanded OS_REGISTRY_LOG in a config that boots nothing, the other six source aliases for imports no run loads. Both now read the boundary check-undeclared-dep-imports already reads, imported from there (tsconfigExcludedDirs): a directory the package's own tsconfig.json excludes, as a literal entry inside src/, is payload and not a test source. A glob such as **/*.test.ts is not payload. One self-test case each, with a control for the glob shape. The registry-log green line names the honoured payload directories. Claude-Session: https://claude.ai/code/session_01VoSxBQujKLZKPwK2u5ehQ6 Co-authored-by: Claude <noreply@anthropic.com>
…'s vitest range POLICY_STAMPS gains a devDependencies.vitest row generated from SCAFFOLD_VITEST_RANGE, so the blank starter's vitest range is written by create-objectstack's build from the constant the CLI scaffolders import, and check:scaffold-emission-policy reddens if they drift apart. The self-test fixtures carry the third constant and assert it is stamped. Claude-Session: https://claude.ai/code/session_01VoSxBQujKLZKPwK2u5ehQ6 Co-authored-by: Claude <noreply@anthropic.com>
…usion `**/*.test.ts` alone is dropped by tsconfigExcludedDirs's inside-src/ filter before its glob filter is consulted, so the control could not see that guard. `src/**/*.test.ts` reaches it. Claude-Session: https://claude.ai/code/session_01VoSxBQujKLZKPwK2u5ehQ6 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VoSxBQujKLZKPwK2u5ehQ6 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check
What this run could not see
Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
…and @objectstack/verify The blank starter now ships note.test.ts, vitest.config.ts and @objectstack/verify as a devDependency, so the "What was generated" tree gains the two root files and the package table, which calls itself the entire framework surface a project installs, gains the verify row. Claude-Session: https://claude.ai/code/session_01VoSxBQujKLZKPwK2u5ehQ6 Co-authored-by: Claude <noreply@anthropic.com>
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 38212559019 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Queue ejection triage: re-queued once. A timeout in a driver-sql test this diff cannot reach, on a base where the same check is green
Signature: queue run 38212559019, merge group on base
The three facts for one re-queue:
Action: auto-merge is re-enabled once, on the same head Generated by Claude Code |
Fixes #15952
Clause-②: no
The scaffold half of #15952: the blank starter of
create-objectstackships a test story. The docs half landed asf868e688ff. This PR carries the card's ask items 2 and 3 and the acceptance line "a freshly scaffolded blank app runspnpm testgreen with the one example test", plus the seat's ruling A on open question 1 (claim comment6117707121).What changes
The blank template (
packages/create-objectstack/src/templates/blank/), ported fromclaude/issue-15952-scaffold-heldat812d8dbf94without its supersededplugin-spec.mdx:note.test.ts: ONE starter test. It boots the project's own stack withbootStackfrom@objectstack/verifyand asserts one business fact through the in-process handle: a note without a title is refused withVALIDATION_FAILEDnamingtitle, and the same note with a title is saved.vitest.config.ts: a 60 s hook timeout for the boot, console intercept off, andOS_REGISTRY_LOG: 'warn'for the scaffolded project's own boots.package.json: atestscript (vitest run), plus two devDependencies:@objectstack/verifyat^17.0.0, the rangetemplate-consistency.test.tsdemands (the current major), restamped at release bysync-template-versions.mjs;vitestat~4.0.0, which isSCAFFOLD_VITEST_RANGE, generated (below).tsconfig.jsonincludes*.ts, sopnpm typecheckchecks the test and the config.README.mdlistspnpm test.The 8 ported files are byte-identical to the held branch except two lines: the vitest range (
^4.0.0to~4.0.0, the terms in6117112916) and one changeset sentence.packages/create-objectstack/vitest.config.ts: only theexcludeofsrc/templates/**. The payload test is never run by this package's own suite..github/workflows/scaffold-e2e.yml: job 1 gets onenpm teststep after validate and build. The scheduled registry canary runsnpm testonly when the published scaffolder declares atestscript.scripts/sync-scaffold-emission-policy.mjs: onePOLICY_STAMPSrow,devDependencies.viteststamped fromSCAFFOLD_VITEST_RANGE. The self-test fixtures carry the third constant. The write run already finds the template clean, because the committed value is the generated value.Open question 1, ruling A: the payload boundary in two gates.
check-registry-log-declared.mjsandcheck-test-source-alias.mjsnow read the boundarycheck-undeclared-dep-imports.mjsalready reads. A directory the package's owntsconfig.jsonexcludes, as a literal entry insidesrc/, is payload and not a test source.tsconfigExcludedDirsfromcheck-undeclared-dep-imports.mjs, where it is already exported. That is one definition with no move and no copy, and the same gate-to-gate importdispatch-gates.mjsalready uses forisTestPath.**/*.test.tsin their tsconfig, and that glob is not payload. On this tree the boundary honours exactly one directory,packages/create-objectstack/src/templates. The registry-log green line now prints it.OS_REGISTRY_LOGor alias lines increate-objectstack's vitest config (option B), and no payload rename (option C).Cross-lane: the three
scripts/files aredomain:spec, declared on #6017 as6117713390.Changeset:
create-objectstackminor, carryingClause-②: no. No exported symbol moves.Measured
All readings below are at
c8cfe2e8c2unless named otherwise.npm install matrix, full scaffolded manifest. The repo-built bin ran
final-notes --skip-install --skip-skills, and the emittedpackage.jsonholds@objectstack/*^17.7.0andvitest~4.0.0. Each row used Node v22.22.0, a fresh copy of the scaffold, a fresh--cachedirectory, andnpm install --no-fund --no-audit.@objectstack/verifyvitestat^4.0.0Cannot read properties of null (reading 'edgesOut')The gates before and after the predicate.
ba4a876ccc(port only)c8cfe2e8c2check-registry-log-declaredpackages/create-objectstack/vitest.config.ts)packages/create-objectstack/src/templatescheck-test-source-aliaspackages/create-objectstack"tests import 5 workspace package(s) that resolve to dist/ with no source alias"Ablations. Each mutation went through
scripts/ablation-replace.mjs: the anchor hit 1 to 0, the blob changed, and the restore read blob == HEAD withgit diff HEADempty.create-objectstack.create-objectstack.tsconfigExcludedDirswas removed. The registry-log self-test went red on its payload list, which readpackages/c/src/**/*.test.ts. The alias self-test stayed GREEN. A glob string used as a literal path prefix matches no file, so that mutation cannot drop a test. The controls guard against a glob-MATCHING predicate, and this mutation does not produce one.^4.0.0.--checkexited 1 with "devDependencies.vitest is "^4.0.0" but the policy declares "~4.0.0"", and the write run restamped it to~4.0.0.create-objectstackvitestexcludewas deleted.vitest list --filesOnlywent from 18 files to 19, the extra one beingsrc/templates/blank/note.test.ts.required: truedeleted fromnote.object.ts:pnpm testexit 1, "AssertionError: promise resolved ... instead of rejecting";Tests, through
os-verify-lock:pnpm --filter create-objectstack test && typecheck: VERDICT command-exit 0, "Test Files 18 passed (18), Tests 265 passed (265)", tsc exit 0.scaffold-ci-script-parity,create-objectstack-wiring-parity,starter-field-consumers): exit 0, "Test Files 3 passed (3), Tests 58 passed (58)".OS_TEST_TIERS=nightlyscaffold-emission-policy.e2e.test.ts: exit 0, "Test Files 1 passed (1), Tests 10 passed (10)".integrationlayer is declared to CI.The Scaffold E2E steps, run locally on a fresh scaffold:
npm run validate("Validation passed"),npm run build("Build complete") andnpm test("Test Files 1 passed (1)"): VERDICT command-exit 0.pnpm installcopy:pnpm testgreen, andpnpm typecheckexit 0.tsc --listFileslistsnote.test.tsandvitest.config.ts.What only CI can show: the GitHub runner's npm for
node-version: '22', the starter boot inside the 60 s hook timeout on a shared runner, and the boot, health and Docker steps after the new test step. The registry canary is schedule-only, and itsnpm testarm stays dormant until a published scaffolder declares atestscript.Gates:
dispatch-gates --commandswith no paths derived 113 commands onc8cfe2e8c2, the same list the claim's 11 paths gave. All 113 ran, and--ranreports "113 derived famil(ies) accounted for — 113 run, 0 NOT-MEASURED (a DERIVED zero)". 112 exited 0 on the first pass.check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET, 9 packages withoutdist/) and exited 0 after a turbo build (73 tasks, 72 cached).Lint (proven narrowing):
**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}, so this diff's lintable files are 6: the 3 scripts, the 2 template TS files and thecreate-objectstackvitest config.pnpm exec eslint --no-inline-config --format jsonread 6 files, with 0 errors and 0 warnings.parserOptions.project), so this diff cannot move a verdict on any untouched file.Acceptance notes
These are observations only. None is filed.
[sql-driver] DATABASE_ERROR ... no such table: _objectstack_sequences. The refused insert the test provokes also logs a WARN with a full stack trace. Both appear on a greennpm test. They were not investigated. Carrier: none.check-registry-log-declared.mjs's header still reads "72 walked, 8 selected". The live green line reads 73 and 10 (packages/cliandpackages/plugins/organizationsjoined before this PR). The header itself says the green line is the census of record. Carrier: none.Generated by Claude Code