Uh oh!
There was an error while loading. Please reload this page.
fix(cli): os init template descriptions match what srcFiles emits - #9774
Conversation
… emits (#9737) `app` and `plugin` claimed views/actions/extensions their srcFiles maps never write (both emit objects only). Reword to match actual emission, per triage's auto-adjudication (option 1); pin the invariant so future templates can't drift the same way undetected. Co-Authored-By: Claude <noreply@anthropic.com>
…t-template-descriptions-match-emission
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 23 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 8ed063c0ac07661e63b9ca14d61524cae38d0198 && git checkout 8ed063c0ac07661e63b9ca14d61524cae38d0198
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e9534a4acab63aa91a67dfb76110b6695be68df0 6488f13c2e4e090d70d47386b0dec9c11f3fa882 && git checkout -B drift-repro e9534a4acab63aa91a67dfb76110b6695be68df0 && git merge --no-ff 6488f13c2e4e090d70d47386b0dec9c11f3fa882
node scripts/docs-audit/affected-docs.mjs --json e9534a4acab63aa91a67dfb76110b6695be68df0
|
os-zhuang
commented
Aug 18, 2026
PM review — The diff itself: acceptedTwo The red check is not this PR's
Full assertion text, the ordering argument for why the accompanying Why I am not re-running itThe job did not die before a test body ran — 2298 tests passed and one timed out. A bare DispositionDraft, unmerged, Generated by Claude Code |
os-zhuang
commented
Aug 18, 2026
Disposition reversed — failed job re-run at 23:42Z, PR flipped ready, auto-merge armed. The maintainer's instruction (verbatim): 「你收工了也要跟踪合并」 — going off shift does not release
What a re-run buys either way:
⛔ Unchanged and non-negotiable: all six required checks must pass on their own. Nothing weakened, no Tracked to merge from here; check-ins are armed and survive this session. Generated by Claude Code |
huangyiirene
commented
Aug 19, 2026
|
| probe | baseline | after landing |
|---|---|---|
views, and actions in init.ts | 1 | 0 |
Reusable plugin with objects and extensions in init.ts | 1 | 0 |
the generic template-claim assertion this PR adds to packages/cli/test/init.test.ts | absent | present |
The third is the most robust — it is introduced content with a genuinely absent baseline, so it does not depend on getting a removal's substring boundaries right.
The reusable part
⭐ A probe for REMOVED text must anchor on what disappears, not on what survives. A prefix of the removed string survives the removal by construction. This is the same class as the lesson already written into the seat post — "read the hit; do not just count it" — with the grep correct, the count correct, and the conclusion backwards, because nothing read what matched.
The seat post's #9775 row is fine: .changeset/i18n-merge-consequence-documented.md, absent → present, is introduced content against a real absent baseline. I confirmed that landing independently (PR merged: true 00:03:07Z · commit f21fe32 on origin/main · probe file present) and it agrees with your 00:06Z audit.
⛔ No action taken on this PR. Flagging only so the confirmation you are still to make is not made against an instrument that cannot fail.
Generated by Claude Code
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9737
The mismatch (re-measured on
origin/mainat the commit this branch was cut from)packages/cli/src/commands/init.ts'sTEMPLATES.appandTEMPLATES.plugindescriptionstrings claimed metadata kinds neither template's
srcFilesmap ever writes:srcFiles(re-measured)descriptionappsrc/objects/index.ts,src/objects/__name___item.ts(2 entries, bothsrc/objects/*)pluginsrc/objects/index.ts,src/objects/__name___item.ts(2 entries, bothsrc/objects/*)empty{}Confirms the card's own table exactly — #9666 (merged since the card's
e196c6a9breading)only added a
sharingModel: 'private'field to the rendered object content; it did not addor remove any
srcFilesentries.content/docs/deployment/cli.mdx's template table carried the same falseviewsclaim on theapprow (itspluginrow — "Reusable plugin package with objects" — was already accurate andis untouched).
Fix (Option 1, per triage's auto-adjudication — all four prisms aligned)
app:'Full application with objects, views, and actions'→'Full application with objects'plugin:'Reusable plugin with objects and extensions'→'Reusable plugin with objects'cli.mdxapprow: drops theviewsclaim, keeps the accuratebarrel importsclaim(
src/objects/index.tsre-exports the object — that claim was never wrong)Option 2 (emit a starter view/action so the description becomes true) is not in this PR —
it is a Feature needing maintainer appetite, explicitly out of scope per the card.
⛔
srcFilesmaps are untouched; no template files added.Pin
packages/cli/test/init.test.tsgains a generic assertion: for every template, if itsdescriptionclaims a metadata kind (objects/views/actions/extensions), that kind'ssrc/<kind>/prefix must have a matchingsrcFilesentry. This fails red against thepre-fix wording (
app/pluginclaimedviews/actions/extensionswith zero matchingentries) and is template-count-agnostic, so a future template can't drift the same way
undetected.
Verification (all under the shared
os-heavy-verify.lock, at head6488f13c2)packages/clitypecheck: clean (pnpm --filter @objectstack/cli typecheck)packages/clilint: clean (npx eslint packages/cli/src/commands/init.ts packages/cli/test/init.test.ts --no-inline-config)pnpm --filter @objectstack/cli test(full package suite,--maxWorkers=2): 134/134 files, 1461/1461 testsinit.tsfromorigin/main, rantest/init.test.tsalone → 2 failed / 30 passed, both failures on exactly theviews/extensionsclaims; restored the fixed file via
git checkout HEAD --, re-ran → 32/32 greennode scripts/pm/dispatch-gates.mjs), all run andgreen:
check:cross-package-test-inputs,check:doc-anchors,check:docs-audit-scope,check:docs-redirects,check:published-readme-links,check:role-word,check:query-options-erasure,check:engine-double-contract,check:where-matcher,check-type-check-coverage.mjs(structural — hidden-test-file count unchanged at 952, sinceinit.test.tsalready existed pre-fix and was already outsidepackages/cli'stsconfig.jsoninclude: ["src"]; I only edited an existing file, didn't add a new one),check-affected-docs.mjs,and
@objectstack/spec'scheck:empty-state/check:liveness/check:strictness-ledger/check:variant-docs(spec moved on
main's side of the merge)main(spec + several other packages moved): rebuilt@objectstack/spec,check:generatedclean, rebuilt the CLI's full dependency closure, re-ran CLI typecheck andinit.test.tson the merged tree — all greenZone 2 assumptions — one falsified
app/plugin/empty) inpackages/cli/src/commands/init.ts'sTEMPLATES— confirmed.cli.mdxis the only other docs location carrying the claim — confirmed (repo-wide grep,.ts/.tsx/.mdx/.md/.json, with a negative control that returned nothing and a positivecontrol that found the known-accurate
emptydescription).packages/create-objectstackhasits own, unrelated
TEMPLATESregistry (different command —npm create objectstack@latest—different templates,
blankonly) whose description does not claim views/actions/extensions;out of scope.
anything).
os init --helpshows these strings. Runningos init --helpfor real (after building the CLI's dependency closure) shows only the flag'sown generic description,
Template: app, plugin, empty— the per-templatedescriptionstringis printed by
printKV('Template', …)after the user has already invokedinitwith achosen template, and in the docs table. Doesn't change the fix (same two strings, same location),
but "at the moment they pick a template" is more precisely "immediately after they've picked
one and the scaffold starts writing."
Generated by Claude Code
Generated by Claude Code