Repository navigation
feat(scaffold): new projects run their tests in CI - #35260
Conversation
The bundled template's ci.yml runs `pnpm test` after validate, lint and typecheck. `os init -t app` and `-t empty` declare `test: vitest run`, list vitest, and ship one starter test each (app.test.ts, project.test.ts) that reads the definition, so the CI parity and starter-test pins hold for every scaffolder. The objectstack-project skill's §2 says the CI runs all four. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbWfVxrJ6N3xZaG1Eoe
📓 Docs Drift CheckThis PR changes 2 package(s): 6 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 40 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 50651a592240e6b99dc0d44ec7cc18ce0d7a8947 && git checkout 50651a592240e6b99dc0d44ec7cc18ce0d7a8947
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f4dbcc2153566226f283c79c73255369c2c97587 bffdcfc9cdd53804a136f77f74579d20ac0df295 && git checkout -B drift-repro f4dbcc2153566226f283c79c73255369c2c97587 && git merge --no-ff bffdcfc9cdd53804a136f77f74579d20ac0df295
node scripts/docs-audit/affected-docs.mjs --json f4dbcc2153566226f283c79c73255369c2c97587
|
|
epic:#35205#2 · os-warren · session_01JQwxbWfVxrJ6N3xZaG1Eoe Contract reviewServed-tier: Read: card #35218 (body and its 3 comments), PR #35260 (body, 9 files, 58 check-runs on the head), the net diff, and the cited code in the tree at the head. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
S2 (should-fix) — the skill no longer tells an
S1 (should-fix) — the N1 (nit) — N2 (nit) — Implemented-by: VERDICT: PASS |
- S1: the starter-test file's budget is re-measured for ten spawns (local 11.6 s -> 16.4 s against eight, scaled from the 14.9 s CI reading) and declared at 30. - S2: the skill tells every project to add `@objectstack/verify` where it is missing, not only a project without a `test` script. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbWfVxrJ6N3xZaG1Eoe
|
epic:#35205#2 · os-warren · session_01JQwxbWfVxrJ6N3xZaG1Eoe Contract reviewServed-tier: Delta review of the record on ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentS1: closed The line now declares Is a local ratio an honest reading? The grammar asks for a measured CI reading, and this is an estimate built on one, not a CI reading at ten spawns. It is honest for three reasons. The line says so in its own words, so no reader takes 21.0 s for a measurement. The grammar lets a budget rise only by a PR that re-measures and says why, and this one does both. And the declared number does not depend on the method: any CI reading from 16.0 s to 24.0 s rounds to 30, and both the dev's estimate (21.0 s) and the plain spawn-count scaling in the earlier record (18.6 s) fall inside that range. The local figures themselves are the dev's and were not reproduced here. If the scheduled window later reads the file above 24.0 s it will be listed against its budget, which is the grammar working as designed. S2: closed The sentence now reads "Add vitest, the N1 and N2 from the earlier record are unchanged: accepted deviation and follow-up. No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
epic:#35205#2 · os-warren · session_01JQwxbWfVxrJ6N3xZaG1Eoe 维护者速读(席位终稿,head
|
Requested by Warren · project thread
Fixes #35218
Clause-②: no
Metadata-protocol: none
维护者速读
pnpm test。npm create objectstack模板的ci.yml在 validate、lint、typecheck 之后加一步pnpm test;os init -t app和-t empty加上test: vitest run、vitest开发依赖和一个样板测试(app.test.ts、project.test.ts,只读项目定义,不启动引擎)。技能objectstack-project§2 改成「脚手架 CI 四步都跑」。os init的模板要声明 CI 跑的每个脚本,且声明了test就必须带一个能过的样板测试(空测试集必须失败,不能用--passWithNoTests)。os init -t app/empty新项目多装一个 vitest。回滚即 revert。packages/cli/src/commands/init.ts(app/empty 两个模板);packages/create-objectstack/src/templates/blank/.github/workflows/ci.yml;skills/objectstack-project/SKILL.md§2 第一段。pnpm --filter @objectstack/cli exec vitest run test/scaffold-test-script-passes.test.ts test/scaffold-ci-script-parity.test.ts通过(需先构建 cli 的依赖);pnpm --filter create-objectstack exec vitest run src/template-ci-workflow.test.ts通过。skills/**,Tier H,需 os-zhuang 在 GitHub 上 Approve。What changes
create-objectstack):.github/workflows/ci.ymlrunspnpm testaftertypecheck;template-ci-workflow.test.tsnow requires theteststep besidevalidate,lintandtypecheck.os init(packages/cli/src/commands/init.ts): theappandemptytemplates declaretest: 'vitest run'andvitest(the sharedSCAFFOLD_VITEST_RANGE), and ship one starter test each, shaped like theplugintemplate'spackage.test.ts: importing the config runsdefineStack(), and the test asserts the manifest type (and, forapp, that every objectsrc/objectsexports is handed to the stack). The comment points at@objectstack/verifybootStackfor tests that need the engine. Theemptydescription says it now carries one starter test.init-scaffold-authoring-rules.test.tspicks the templates that emit an object file (it used "has anysrcFiles", whichemptynow has with no object);generate-scaffold-wiring.test.ts's twoemptycases assert no file undersrc/rather than no file at all.scaffold-test-script-passes.test.tsderives its roster fromTEMPLATESand now runsappandemptytoo; its header's spawn count is updated.objectstack-project§2 says a scaffolded project's CI runs all four checks, an older scaffold may lack thepnpm teststep, and a project adds vitest, thetestscript and@objectstack/verify(forbootStack) where missing. 2901 tokens against its ceiling of 2901 (row unchanged).content/docs/deployment/cli.mdxtemplate table,emptyrow.Contract review
Round 1 on ef3f4b5: PASS with two should-fixes (the test budget, and the skill's
@objectstack/verifysentence), both fixed in bffdcfc; delta review on bffdcfc: PASS, nothing open.Tests
@objectstack/cli(after building its workspace deps), everyinit*andscaffold*test file: 302 passed, 2 skipped; the two*-mcp-stdio-early-initialize.integrationfiles need a builtpackages/cli/distand fail to load on the base tree the same way locally.scaffold-test-script-passes.test.ts:os init -t app,-t pluginand-t emptyeach pass their emittedtestscript in a sandbox; the empty-suite control fails as required.create-objectstack: 25 files / 381 tests pass.check:role-word,check:skill-links,check:skill-compatibility,check:skill-identifier-liveness,check:skill-frame-sync;check:scaffold-emission-policy; changeset gates.Acceptance notes
@objectstack/skillsships the skill (feat(skills): objectstack-project, a process skill for metadata-app projects #35221, merged); a freshly scaffolded app runs its tests in CI and its AGENTS.md points at the skill (this PR + feat(skills): objectstack-project, a process skill for metadata-app projects #35221). The third, trimming hotcrm'sdocs/PRIORITIES.md, belongs to hotcrm's rollout (Priorities rollout 5/6: file the platform cards in objectstack hotcrm#2661), as feat(skills): objectstack-project, a process skill for metadata-app projects #35221 stated.scaffold-test-script-passes.test.tsnow spawns ten times instead of eight. Its budget is re-declared at 30: measured locally at 11.6 s with eight spawns and 16.4 s with ten (x 1.41), applied to the 14.9 s CI reading, about 21.0 s, x 1.25, rounded up. Any CI reading from 16 s to 24 s gives the same 30.Fixes #35218closes the card on merge. Its third "Done when" item, hotcrm'sdocs/PRIORITIES.md, is hotcrm's own work under Priorities rollout 5/6: file the platform cards in objectstack hotcrm#2661, not this repository's.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbWfVxrJ6N3xZaG1Eoe