Skip to content

feat(scaffold): the blank template starts with the Starter app's companies and contacts - #37428

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-d9kjuz
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-d9kjuz

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #36945

Clause-②: no
Metadata-protocol: none

维护者速读

  • 开发者用命令行新建项目后,不再带那个和平台「备忘」重名的示例对象,而是直接带上起步应用的「公司」「联系人」源码,菜单里是公司、联系人和平台自带的任务、备忘。
  • 属于「起步应用与平台任务/备忘」专题,让开发者拿到的项目和云端装的起步应用是同一套定义,并有测试防止两边走样。
  • 出错只影响此后新建的项目,已有项目不变;新建脚本的改名规则也扩大到了引用处,可以直接撤回。
  • 无。

What changes

The blank template (packages/create-objectstack/src/templates/blank/):

  • Removed the sample note object, its list view and note.test.ts.
  • Added src/objects/company.object.ts and contact.object.ts, and src/views/company.view.ts and contact.view.ts: the definitions of examples/app-starter (PR feat(examples): starter app — companies and contacts, with the platform's tasks and notes in the menu #37399), with starter_ names spelled blank_. Comments are the template's own (what the org-wide default means, field groups, how to remove the objects), so the shipped-comment rationale pins move from note.object.ts to company.object.ts.
  • src/apps/main.app.ts keeps its identity (blank_main_app, label Main) and its navigation is the Starter's four object entries: companies, contacts, and sys_task / sys_note with requiresObject (the same form as the Starter, until os validate refuses an app menu entry naming the built-in sys_task or sys_note unless it carries requiresObject #37404 lands). The Starter's dashboard entry is not carried: the template ships no dashboard, seed data or translations.
  • starter.test.ts replaces note.test.ts: it boots the project with bootStack and asserts that a company is refused without a name, that a contact's lookup holds its company, and that GET /meta/app/NAME serves the four entries in order.
  • README: a "What this project starts with" section replaces "The sample note object" (what each file is, that Tasks and Notes are the platform's, how to remove companies and contacts), and the Console, Layout, Verify and Next steps sections follow it. The template's objectstack.config.ts / objectstack.manifest.json descriptions (dropped at scaffold time) and the registry line say what the project starts with.

One source of truth: a consistency pin, not a build-time copy (A2). src/blank-template-starter-parity.test.ts parses each template file and the Starter's with the TypeScript compiler and compares the printed definition (the argument of ObjectSchema.create / defineView, and each navigation entry) with comments removed, after spelling the Starter's 'starter_…' literals as 'blank_…'. Formatting and commentary are free; every key and value is held. Its CONTROL case changes one value (maxLength: 120 to 121) and requires the comparison to fail. A copy at build time was not chosen: the template under src/ is what every other test in this package reads and what npm create users get, so it has to hold the files itself.

Scaffolder: every namespaced literal moves, references included (DEVIATION, declared). rewriteObjectNamePrefix used to rewrite name: 'blank_x' literals only, so the old template had to reach its object as Note.name. Company and contact reference each other (the contact's lookup, the company's related list), so imported references would be circular, and the Starter spells references as literals. The rewrite (and its self-check findStaleNamespacePrefixes) now moves every WHOLE quoted literal under the template namespace prefix: 'blank_company', "blank_company" and the backtick form, wherever it stands. A literal that is not a whole namespaced name is left alone: a platform object ('sys_task'), a navigation id ('nav_blank_tasks'), a longer string containing the prefix, a literal under another namespace. New tests in rewrite-identity.test.ts pin both directions (five reference shapes moved; four non-name shapes untouched, byte for byte). Measured on a real scaffold (my-app): every blank_ literal became my_app_, none survived.

Closing summary. After "Environment created!", the scaffolder prints "Your project starts with:" (Companies and Contacts in src/objects/, Tasks and Notes from the platform in the menu of src/apps/main.app.ts), outside the "Next steps:" block that scaffold-next-steps-pm.test.ts reads. The parity test holds those lines to the template tree.

Fence additions, each approved by the zone (o5-P) for this card:

  • packages/cli/test/create-objectstack-wiring-parity.test.ts: the views-barrel line it expects is now the two company / contact lines (the template keeps the generator's default-export barrel shape).
  • packages/cli/test/starter-field-consumers.test.ts: the control helper (withoutPlacement, was withoutGroup) un-places a field from every placement the starter wrote: its group, a field group's fields list (how the Starter places fields), highlightFields, and related-list columns. See Acceptance notes for why the last one is on every object.
  • packages/cli/test/starter-field-consumers.e2e.test.ts (nightly): the strip also removes field groups' fields: [...] lists, so the blank starter keeps a control.
  • scripts/cross-package-test-inputs.mjs + turbo.json: create-objectstack declares examples/app-starter/src/** (with a heldBy witness, the walked root) and examples/app-starter/objectstack.config.ts (the namespace line), so a Starter-only change re-runs the pin instead of replaying a cached green.
  • content/docs/getting-started/your-first-project.mdx and build-with-claude-code.mdx: the tree, the object code block, the Console callout, the curl examples, the "extend the model" block and the agent prompt describe companies and contacts; the validate transcript reads 3 Objects 18 Fields and 3 Views (2 objects and 14 fields measured on a fresh scaffold, plus the guide's ticket).

Two lines in packages/platform-objects, OK'd by the maintainer in the card thread (2026-11-26 08:58Z). managed-api-method-affordance-sweep.test.ts:146 and platform-admin-affordance-standing.test.ts:82 listed the template's note.object.ts as the one scaffolding exemption and pinned it as still existing; they now list company.object.ts and contact.object.ts (commit 973207c). Measured: both sweeps 12/12 passed, check:cross-package-test-inputs exit 0.

Tests

  • create-objectstack: vitest run, 26 files, 396 tests passed; tsc --noEmit exit 0.
  • New: blank-template-starter-parity.test.ts 9 tests; rewrite-identity.test.ts +2.
  • @objectstack/cli unit: create-objectstack-wiring-parity.test.ts and starter-field-consumers.test.ts green (25 tests).
  • A real scaffold (create-objectstack my-app --skip-install --skip-skills, resolved against workspace packages): objectstack validate passed (2 Objects 14 Fields, 1 Apps 2 Views, no warning), objectstack lint all checks passed, tsc --noEmit exit 0, vitest run 3/3 (starter.test.ts).
Ablations
  • Starter test: the scaffolded project's notes menu entry deleted, starter.test.ts red on the menu case (1 failed, 2 passed); restored, 3/3.
  • Parity pin: built-in CONTROL (one value changed in the template's contact object) fails the comparison.
  • starter-field-consumers.test.ts controls: old helper (group key only) on the new template, 12 of 12 blank controls red; the helper with group + field-group lists only, 7 red (the highlighted fields); the full helper, green. Old template (note.object.ts restored in place) with the new helper: 14/14 green. Helper made a no-op: 14 controls red (12 blank + 2 os init -t app).

Acceptance notes

  • Root .github/workflows/scaffold-e2e.yml is governed and not edited (A4). It runs npm test only (lines 143 to 147 and 568 to 570), never a filename, so the rename is safe; two comments there still name note.test.ts (line 139, "The starter's own test (note.test.ts)", and line 562, "older than the starter's note.test.ts"). They are stale prose for whoever next edits that file.
  • The scaffold E2E job installs the generated project from the registry (18.6.0). sys_task / sys_note do not exist there yet, but the two entries carry requiresObject, and starter.test.ts reads the served menu and writes no task or note. The job is still red at validate, for the reason in Landing ops §C.
  • The field-consumer rule credits a related list's columns to the object that DECLARES the list as well as to the listed object: the company's related list of contacts (phone column, the contact's field) keeps company.phone credited. Measured through the control above: a parent field that nothing displays stays silent when a child's related-list column has the same name, and withoutPlacement now strips those columns on every object, which hides it from the control. Carried by field-consumer rule: an object-form relatedLists column name is credited to the declaring object, so an undisplayed parent field with the same name stays silent #37502 (fix the rule, then narrow the helper).
  • packages/cli/src/commands/generate.ts (~294) still cites note.object.ts as the starter's authoring style in a comment, and that comment is now partly false: os g object places a field with a per-field group, while the starter places fields through a group's fields list. That and the other stale note citations (including content/docs/deployment/cli.mdx) are carried by blank template is company/contact now: stale note citations and the generator's "starter style" promise for field placement (family) #37503. packages/cli/src/utils/organization-ownership-inventory.ts keeps blank_note as a census row fixed at its census commit, which is correct.

Landing ops

§C Expected reds on this head, what they cost, and what unblocks them

One red is expected on this head; it is not a required context (scripts/check-required-contexts.mjs REQUIRED_CONTEXTS).

  1. Scaffold E2E · "Scaffold with repo dist", step 7 "Validate and build the generated project". Signature: ✗ ObjectSchema.create('e2e_app_company'): unknown key(s) — color. The job installs the generated project from the registry at ^18.6.0 (also latest; main is in changeset pre mode). 18.6.0 rejects three shapes the Starter's source uses: object color, fieldGroups[].fields, and object-form relatedLists entries. Measured against a real registry install: with those three stripped, validate passes, so nothing else in the template is unreleased.

Fixed in this PR so it does not go red: publish-smoke / packed-tarballs (contract review 7187700473, M1; the claim amended to add scripts/publish-smoke.sh). The smoke's REST CRUD probe read src/objects/note.object.ts and wrote title; in pack mode the project now comes from the repo-built scaffolder, so the file was gone and the smoke would have stopped at "REST CRUD probes" after the next Release run. The probe now drives whichever starter object the scaffolder wrote: company.object.ts with the required name (pack mode, and registry mode once the companies template is published), else note.object.ts with title (registry mode until then), and fails by name when neither exists (commit 1079be7). Measured:

  • registry mode, the whole script: SMOKE_MODE=registry bash scripts/publish-smoke.sh exit 0, Publish smoke passed (registry mode), the probe on smoke_app_note (title): create 201, read 200, update 200, delete 200.
  • the companies branch: the probe section, cut from the script, run against a project scaffolded by the repo-built create-objectstack and booted with objectstack dev --fresh on the workspace packages (a full pack-mode run needs pnpm build of every package, not run here), signed in as the seeded admin: smoke_app_company (name) create 201, read 200, update 200, delete 200.
  • control: the same harness with the probe section as it was before this commit, against the same project, exits 1 with ENOENT … src/objects/note.object.ts.

Cleared at 973207c: the platform-objects gap (the two sweeps and Cross-package test inputs).

Verification

Files to read first: src/rewrite-identity.ts (the widened literal rule, namespacedLiteralRe), src/blank-template-starter-parity.test.ts, src/templates/blank/src/apps/main.app.ts.

Two-minute check: cd packages/create-objectstack && pnpm exec vitest run src/blank-template-starter-parity.test.ts src/rewrite-identity.test.ts, expect every case green, then npx tsx src/index.ts my-app --skip-install --skip-skills in a scratch directory and read my-app/src/apps/main.app.ts: four entries, my_app_company, my_app_contact, sys_task, sys_note.


Generated by Claude Code

…anies and contacts

The sample `note` object goes. The template ships the platform Starter
app's company and contact objects and their views as source, and its menu
lists companies, contacts and the platform's sys_task / sys_note. A
comment-blind AST pin holds each definition equal to the Starter's, modulo
the namespace. Scaffolding now moves every quoted template-namespace
literal, references included, not only `name:` literals.

Claude-Session: https://claude.ai/code/session_01Utp6Cb7GD4hWCpfZKAZgDD
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): create-objectstack, objectstack-blank, touching 26 documentable anchor(s). ⚠️ 9 changed file(s) yielded no anchor (packages/create-objectstack/README.md, packages/create-objectstack/src/templates/blank/.github/workflows/ci.yml, packages/create-objectstack/src/templates/blank/README.md, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

52 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json f71d488d6f4d7181cc6e075eb956f92489fb87ba.

⛔ 15 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 9 changed file(s) yielded no anchor (packages/create-objectstack/README.md, packages/create-objectstack/src/templates/blank/.github/workflows/ci.yml, packages/create-objectstack/src/templates/blank/README.md, …) — pages documenting those are invisible to this run
  • 2 anchor(s) matched too much of the corpus to be a work list: sharingModel (symbol, 49 pages), owner_id (literal, 46 pages)
  • 12 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 18 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json f71d488d6f4d7181cc6e075eb956f92489fb87ba → packageMentionDocs.

Which tree this was computed on

This run read content/docs from b293b2d5dc1e14ab9135e24aa60d64c0109ee227 — the merge of head 4bf5626c8c3c31086a4daee07ab7f5b1dce7997f into base f71d488d6f4d7181cc6e075eb956f92489fb87ba, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin b293b2d5dc1e14ab9135e24aa60d64c0109ee227 && git checkout b293b2d5dc1e14ab9135e24aa60d64c0109ee227
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f71d488d6f4d7181cc6e075eb956f92489fb87ba 4bf5626c8c3c31086a4daee07ab7f5b1dce7997f && git checkout -B drift-repro f71d488d6f4d7181cc6e075eb956f92489fb87ba && git merge --no-ff 4bf5626c8c3c31086a4daee07ab7f5b1dce7997f

node scripts/docs-audit/affected-docs.mjs --json f71d488d6f4d7181cc6e075eb956f92489fb87ba

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs f71d488d6f4d7181cc6e075eb956f92489fb87ba → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…plate's company and contact objects

The blank template no longer ships note.object.ts; the two affordance sweeps
exempt and pin its company.object.ts and contact.object.ts instead.

Claude-Session: https://claude.ai/code/session_01Utp6Cb7GD4hWCpfZKAZgDD
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 973207c · 2026-11-26T09:07Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 973207caad6ea4b0cc064a1d29abc28222145f41
Local-runs: none

PR #37428 (card #36945), declaration face, Clause-②: no. Read: the card body and all 11 card comments (ruling 7183516548, release 7183536185, re-claim 7187337406), the maintainer's own words in the card thread at 2026-11-26T08:58Z (「改」, 「仓库中的对象为什么要等发版本」, 「你可以落地啊」, read in the thread itself), card #37441, the PR body with Landing ops §C, the diff origin/main...973207ca (37 files, +898/−314), the check-runs on the head and the failed job's log. Nothing was built or run.

① Derived judgments

Findings

  • M1 (must-fix) — The PR breaks a second gate that §C does not list: the release candidate's packed-tarball smoke. scripts/publish-smoke.sh lines 1183 to 1211 read $APP_DIR/src/objects/note.object.ts and then POST {"title":"publish smoke"} to that object. In pack mode the project is scaffolded by the repo-built create-objectstack (line 654), so after this PR the file is not there. The script runs under set -euo pipefail (line 118), so the readFileSync throws and the smoke stops at "REST CRUD probes". publish-smoke.yml runs this after every Release run and reports it as the commit status publish-smoke / packed-tarballs on the release branch head; that status is green today (last success 2026-11-26T08:53Z). It is the only gate that drives a fresh packed install through auth and CRUD before a publish, and the next publish is the first 19.0.0-next cut. It is not a required context, so nothing stops the merge. This is read from the script, not run. §C says "One red is expected on this head", and the dev report's A3 says every note reference was removed or moved; both are wrong on this point, and the maintainer's 08:58Z word to land was given on a stated cost of one red. Fix: make the CRUD probe find the starter object in both modes (pack mode gets company.object.ts and a required name; registry mode scaffolds the published 18.6.0 template, which still has note.object.ts and title, until 19.0 GA). The script is not a governed path, so the fix can ride this PR with a fence amendment, or land first on its own card. Either way §C must name it before the PR lands.
  • S1 (should-fix) — §C states the cost of the expected red too narrowly. The job stops at step 7, so steps 8 to 14 are skipped: the template's own starter.test.ts, the boot probe, the skills boundary, the pinned shape and both Docker legs. No other CI job runs starter.test.ts (this package's vitest excludes src/templates/). So until scaffold-e2e: "Scaffold with repo dist" installs the generated project from this checkout's packed tarballs #37441 lands or a 19 prerelease is published, no CI run executes the new template's test or boots a generated project, on this PR or on any later PR that touches packages/create-objectstack/** or docker/**; a second template regression in that window is hidden behind the color refusal. scaffold-e2e: "Scaffold with repo dist" installs the generated project from this checkout's packed tarballs #37441 is pm:queue, p2 and unclaimed. Say this in §C, and move scaffold-e2e: "Scaffold with repo dist" installs the generated project from this checkout's packed tarballs #37441 ahead in the queue.
  • S2 (should-fix) — The field-consumer note needs a card. The rule credits the column names of an object-form relatedLists entry to the object that declares the list, so a parent field that nothing displays stays silent when a child's related-list column has the same name. That is a missed finding at os validate and os lint, with a named probe (the PR's own control: 7 of 12 blank controls stay green until the helper drops the name from every related list). withoutPlacement in starter-field-consumers.test.ts now strips those columns on every object, which keeps the control honest today and also hides the defect from it; the card should narrow the helper when the rule is fixed. Filing is the seat's act at ACCEPT.
  • S3 (should-fix) — The generate.ts comment needs a card too, as one family card and not a single-site one. The comment at packages/cli/src/commands/generate.ts:295 names a file that no longer exists, and its claim is now partly false: the PR body says the style it describes "is unchanged", but os g object places a field with a per-field group: 'details' (pinned in generate-scaffold-validates.test.ts:373 to 386 under "the generators write the starter's style"), and the starter now places every field through a group's fields list. Both spellings are valid; the os generate: generated metadata uses a different authoring style from the scaffold and docs, and four generators trap newcomers #32153 promise of one dialect no longer holds for placement, and someone has to decide which way it goes. Same family, stale only: content/docs/deployment/cli.mdx:1091 and :1103 (a public transcript showing my_app_note (2 fields, user)), init-scaffold-file-name-registry-parity.test.ts:36, platform-object-names.test.ts:42, the header of blank-template-console-disclosure.test.ts (lines 26 to 28) and comments in starter-comments-self-contained.test.ts. The note.object.ts path strings in scripts/check-changeset-no-major.mjs are fixtures that read no file and can stay. The two comments in scaffold-e2e.yml are already carried by scaffold-e2e: "Scaffold with repo dist" installs the generated project from this checkout's packed tarballs #37441.
  • N1 (nit) — The "two-line" platform-objects edit is two sites, each one line replaced by two (+4/−2 over two files).
  • N2 (nit) — namespacedLiteralRe and the self-check findStaleNamespacePrefixes share one pattern, so they are blind to the same shapes. A dotted related-list name ('blank_contact.company', the object.field form the spec allows) would be neither rewritten nor reported. The template has none today, and objectstack validate in the generated project would refuse it.
  • N3 (nit) — The parity pin holds the object file set but not the view file set, and it pins the closing summary by matching index.ts source text, not printed output.

1. Does the generated project equal the Starter's company and contact? Yes, where ruling 7183516548 requires it. Read side by side with starter_ spelled blank_: both objects, both view definitions and the four object menu entries are the same code; the differences are comments and the views' export form. Not carried, and declared: the Starter's dashboard entry, seed data, translations and the app's own name, label, icon and branding. blank-template-starter-parity.test.ts holds this with the TypeScript printer, comments removed.

requiresObject is the right guard for an 18.6.0 install. At tag @objectstack/spec@18.6.0 the key exists on a navigation entry (app.zod.ts:442), sys_task and sys_note do not exist in platform-objects, and validate-object-references.ts answers an unknown platform-prefixed name with a warning, not an error. That matches the dev's measurement (validate passes with 7 warnings once the three shapes are stripped). The guard does not rescue the project: 18.6.0 refuses it earlier.

What a user pays between this landing and the 19.0.0-next publish. A user who runs npm create objectstack pays nothing, because they do not get this template. The template is bundled in the package (template-registry.ts: bundled is the only source), latest is create-objectstack@18.6.0, and that package carries the old note template with matching 18.6.0 pins. create-objectstack and @objectstack/spec are in one fixed group and publish together, so the new template first reaches a user with the 19 packages it needs.

Three costs are real:

  • The getting-started pages on main (your-first-project.mdx, build-with-claude-code.mdx) describe companies and contacts, while npm create objectstack on latest keeps producing the note project until 19.0 GA, not only until the first prerelease. A reader following those pages sees a different tree and different curl targets.
  • Anyone who runs the scaffolder from a checkout of main and installs from npm gets a project that does not load. ObjectSchema.create on 18.6.0 refuses color, then fieldGroups[].fields and object-form relatedLists, so validate, build, test and dev all fail at import. That is exactly the CI job's pairing; no published path produces it.
  • Not measured on 18.6.0: npm test and the boot of the generated project. The dev measured validate only, with the three shapes stripped, and the CI job skips the later steps.

2. The expected red. Scaffold with repo dist is not in REQUIRED_CONTEXTS (11 contexts; none from scaffold-e2e.yml). The job log shows it red at step 7 only, with ✗ ObjectSchema.create('e2e_app_company'): unknown key(s) — color., after a registry install at 18.6.0; steps 1 to 6 passed. That is the reason §C gives. #37441 carries the fix (install from packed tarballs; acceptance: this head green on the job with no template change, plus a red control) and is open and unclaimed. The job has no push trigger, and the nightly leg of the workflow runs only the registry canary, so after the merge the red shows on pull requests that touch packages/create-objectstack/** or docker/**.

Check-runs on the head at 2026-11-26T09:14Z, 73 runs: nothing else is red. Green among the required contexts: Lint & Repo Gates, Build Core, Governed Surface Queue Guard, Lint UI, Live E2E UI, Dogfood Regression Gate. Still running: Test Core shards 1 to 7 and 10 (8 and 9 green; the platform-objects sweeps are in 8), all Test UI shards but 12, Type Check UI, Build & E2E UI, and Type Check · workspace. So TypeScript Type Check, Test Core, Test UI, Type Check UI and Build & E2E UI have no verdict yet. The PR is still a draft.

3. The platform-objects edit. It changes only the SCAFFOLDING_TEMPLATES list in the two sweeps and weakens nothing. The exemption stays an exact path list of files that are template payload and cannot be imported here; it goes from one file to two because the template now has two objects. The sweep still pins both ways (each listed path must exist; walked minus swept must equal the list length). Neither template object declares enable.apiMethods, userActions or a managed marker, so nothing the sweeps judge is taken out of their reach.

4. See S2 and S3: both need cards.

5. Tests that pin the template. The parity pin has a built-in CONTROL that cannot pass vacuously (if the mutation stops applying, the mutated text equals the Starter's and the control goes red) and vacuity guards on both namespaces and on each definition. The rewrite tests pin both directions: five reference shapes moved, four non-name shapes byte-identical. The dev's ablations are stated with counts (starter test 1 failed and 2 passed with the notes entry deleted; field-consumer controls 12, 7 and 0 red for the three helper widths; 14 red with a no-op helper). The nightly strip pattern in starter-field-consumers.e2e.test.ts depends on one-line groups, but a reformat makes its control red, not silent. The weak point is S1: the template's own starter.test.ts runs in no CI on this head.

② Semver level

'create-objectstack': patch is correct. Metadata-protocol: none holds: the diff touches no file under packages/spec, and no key, value or type an author can write changes. Clause-②: no holds: rewriteObjectNamePrefix is internal to a bin package, the wider rewrite applies only while scaffolding a new project, and existing projects are untouched. The changeset body carries both declaration lines and says all three user-visible things (template content, the wider rename, the closing summary). @objectstack/cli and @objectstack/platform-objects change in tests only and need no changeset; Check Changeset is green.

③ Boundary flags

  • Declared deviation, the wider rewrite: accepted. It is what lets the template spell references as the Starter does, and both directions are pinned. N2 is its one blind spot.
  • Fence additions (cli tests, docs pages, cross-package-test-inputs.mjs, turbo.json, the two platform-objects files): each has a claim amendment (7182121876, 7182284580) or the maintainer's 「改」, quoted in re-claim 7187337406 and read in the thread. scaffold-e2e.yml is not edited.
  • The open question of report 7182719215 is answered: ruling 7183516548 (A with D), then the maintainer's 08:58Z word lifted the wait half; the Starter-identical source stands and D stays as scaffold-e2e: "Scaffold with repo dist" installs the generated project from this checkout's packed tarballs #37441. That word answered a one-red cost; M1 was not in front of the maintainer.
  • Out-of-scope findings of the report: the scaffold-e2e.yml comments go to scaffold-e2e: "Scaffold with repo dist" installs the generated project from this checkout's packed tarballs #37441; the other two are S2 and S3.
  • SQL push-down: not applicable. The diff adds no query, no id materialisation and no in-app join.
  • main has moved since the merge base (the Starter's config now reads engines: { protocol: '^19' }). The parity pin reads only the namespace line of that file and the Starter's src/ is unchanged, so the pin holds on the merged tree.

Implemented-by: claude/project-thread-d9kjuz
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: 973207caad6ea4b0cc064a1d29abc28222145f41
REWORK — L1, seat repo:objectstack#5. Contract record 7187700473 (declaration face, TIER_DEFAULT) reads FAIL on M1. The template is Starter-identical as ruled, requiresObject is a correct guard, and the platform-objects edit weakens nothing.

  1. Shape: open draft against main, 37 files (+898/−314), Fixes #36945, Clause-②: no, Metadata-protocol: none, create-objectstack patch. Not governed. The maintainer overrode the wait on the card thread at 08:58Z (「你可以落地啊」, 「改」). At 09:14Z five required contexts were still running.
  2. Premise: an npm create objectstack user pays nothing before the 19 publish. The published 18.6.0 scaffolder still bundles the old template, and the new one ships with the 19 packages in the same fixed group. The one expected red, "Scaffold with repo dist", is not required and is red only for §C's reason (unknown key(s) — color). scaffold-e2e: "Scaffold with repo dist" installs the generated project from this checkout's packed tarballs #37441 carries it.
  3. Owed before ACCEPT:
    • M1. The PR breaks a second gate that §C does not list. scripts/publish-smoke.sh (L1183–1211) reads $APP_DIR/src/objects/note.object.ts and POSTs {"title":…}. In pack mode the project comes from the repo-built scaffolder, so that file is gone and the script (set -euo pipefail) stops at the CRUD probes. That is publish-smoke / packed-tarballs on the release branch, which runs after every Release run and is green today. The first 19.0.0-next cut is due now. Make the probe work in both modes, because registry mode still gets the 18.6.0 note template until 19.0 GA, and add the script to the claim. If a mode cannot be satisfied, list it in §C with a carrier.
    • S1. §C understates the window cost. The red job stops at step 7, so starter.test.ts, the boot probe, the skills, pinned-shape and Docker legs are all skipped, and no other CI job runs the template's test. State that in §C. Moving scaffold-e2e: "Scaffold with repo dist" installs the generated project from this checkout's packed tarballs #37441 up is the maintainer's call; the seat asks.
    • S2. File a card: crediting an object-form related list's columns to the declaring object is a missed os validate / os lint finding, and withoutPlacement now masks it.
    • S3. File a family card: generate.ts's "style is unchanged" comment is partly false (os g object writes per-field group), plus the stale note citations, including content/docs/deployment/cli.mdx:1091.
    • The same reviewer reads the delta.
  4. Accepted deviations (nits, record only):
    • N1: the "two-line" edit is two sites, +4/−2.
    • N2: the dotted-ref blind spot in the rewrite and its self-check.
    • N3: the parity pin holds the object set but not the view set.
  5. Out of scope and where it went:
  6. Landing terms: ungoverned, default tier. Owed: M1 closed, S1–S3 closed or carried, required contexts green, a same-head delta PASS and an ACCEPT. Then the area lands it with --land.

…ct the scaffolder wrote

Pack mode scaffolds with the repo-built create-objectstack, whose blank
template now starts with companies (company.object.ts, name required);
registry mode scaffolds with the published one, which still ships note.object.ts
(title). The probe picks the file present and the field it requires, and
fails by name when neither exists.

Claude-Session: https://claude.ai/code/session_01Utp6Cb7GD4hWCpfZKAZgDD
Co-authored-by: Claude <noreply@anthropic.com>
`os validate` on a fresh blank project plus one generated object now prints
`Data: 3 Objects` (company, contact and the generated control).

Claude-Session: https://claude.ai/code/session_01Utp6Cb7GD4hWCpfZKAZgDD
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 4bf5626 · 2026-11-26T09:46Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 4bf5626c8c3c31086a4daee07ab7f5b1dce7997f
Local-runs: none

PR #37428 (card #36945), declaration face, Clause-②: no. Delta round on the record for head 973207c. Read: the delta 973207ca..4bf5626c (two commits, two files: scripts/publish-smoke.sh and packages/cli/test/create-objectstack-stack-reach.test.ts), the whole diff against origin/main again (39 files, +936/−335), the PR body with the rewritten §C, the two new claim amendments on #36945 (7187718716, 7187834868), cards #37502, #37503 and #37441, the check-runs on this head and the failed job's log. The branch took no merge of main in this round (merge base still ee11fce), so nothing from main touches an earlier finding. Nothing was built or run.

① Derived judgments

Earlier findings

New in this round

The stack-reach pin. create-objectstack-stack-reach.test.ts now expects Data: 3 Objects (company, contact, and the object the test generates) where it expected 2. That is the template's new count and not a loosened assertion: the pattern is still an exact count, and Logic: 1 Flows is unchanged. The file is in the fence by claim amendment 7187834868. The earlier record missed this test because its shard had no verdict at the time of that read.

The expected red. Scaffold with repo dist (job 139810778450) fails at step 7 only, with ✗ ObjectSchema.create('e2e_app_company'): unknown key(s) — color., after steps 1 to 6 passed. That is the single reason §C names; nothing new is in the log. It is not in REQUIRED_CONTEXTS.

Check-runs on this head at 2026-11-26T09:47Z, 71 runs: 58 success, 10 skipped, 1 failure (the expected one), 2 still running: Test Core shards 3/10 and 5/10, both started 09:24Z. So the required context Test Core has no verdict yet. Every other required context is green: Lint & Repo Gates, TypeScript Type Check, Build Core, Governed Surface Queue Guard, Lint UI, Build & E2E UI, Type Check UI, Test UI, Live E2E UI, Dogfood Regression Gate. The PR is still a draft.

Unchanged from the earlier record, re-read on this head: the template's objects, views and four object menu entries are the Starter's code modulo the namespace; requiresObject is the right guard at 18.6.0; an npm create objectstack user gets the published 18.6.0 template and pays nothing before the publish; the platform-objects edit changes only the exemption list and weakens nothing.

② Semver level

'create-objectstack': patch stays correct, with Metadata-protocol: none and Clause-②: no. The delta adds a script fix and a test expectation; neither publishes anything, so the changeset needs no change.

③ Boundary flags

Implemented-by: claude/project-thread-d9kjuz
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: 4bf5626c8c3c31086a4daee07ab7f5b1dce7997f
ACCEPT — L1, seat repo:objectstack#5

  1. Shape: open draft against main, Fixes #36945, Clause-②: no, Metadata-protocol: none, create-objectstack patch. Not governed. Claim amendments 7187718716 and 7187834868 cover publish-smoke.sh and the stack-reach pin.
  2. Premise: the blank template is Starter-identical (company and contact), as the maintainer ruled. The wait was overridden on the card thread at 08:58Z (「你可以落地啊」, 「改」).
  3. Gates: delta record 7188511101 (same reviewer, TIER_DEFAULT, verified on the transcript) reads PASS.
  4. Accepted deviations (nits, record only):
  5. Out of scope and where it went:
  6. Landing terms: ungoverned, default tier. Same-head delta PASS plus this ACCEPT. Area o5-P lands it with --land and closes 命令行空白模板改用起步应用的公司、联系人 #36945.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CY2uhJ1AYNPw5TUSVS

Landing (zone o5-P) · 2026-11-26T09:57Z · ACCEPT 7188671773 at 4bf5626c8c3c31086a4daee07ab7f5b1dce7997f

Probe Reading
check-governed-merges.mjs --pr 37428 NOT governed; +936/-335 ≤ 3000
landing-k.mjs --pr 37428 OK — K = 4 < 15; no new locale pack under a label PR; no shared book moved

Authority: the maintainer lifted the wait in the card thread at 2026-11-26T08:58Z (「你可以落地啊」); re-claim 7187337406.
Expected red: "Scaffold with repo dist" (not in REQUIRED_CONTEXTS), carried by #37441 (§C). Watch after merge: publish-smoke / packed-tarballs on the next Release run (N4).
State: ready + auto-merge armed; #36945 closes on merge (Fixes).

Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… packed tarballs (objectstack-ai#37655)

Fixes objectstack-ai#37441

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户无感:只改了「新建项目」这道检查,新建的项目改为装本仓库当场打出的包,再验证、测试、启动并装进官方镜像里启动。
- 为什么做:替改模板和 Docker 文件的 PR 解决「这道检查被已发布的旧版本卡红」的问题,属于起步应用那批后续收尾。
- 出错会怎样:这道检查不是必过项,出错只会让改模板或 Docker 文件的 PR 上这一项变红,用户碰不到;回退这一个文件即可撤回。
- 要你做什么:席位核对通过后,批准这个 PR(受管的工作流文件,需要你批准)。

## What changes

One file, the `scaffold-local` job ("Scaffold with repo dist") of
`.github/workflows/scaffold-e2e.yml`, under ruling 7194715376 (Q1 A with
C filed separately, Q2 A) and the execution terms of analysis
7194330907.

- **Install from this checkout's packed tarballs.** The job builds the
framework closure the scaffolded project declares (read off its
`package.json`, never a hand list), packs every publishable package with
`scripts/publish-smoke-pack.mjs` (reused read-only, as
`os-create-smoke.yml` does), appends the name-to-tarball map to the
project's own `pnpm-workspace.yaml` overrides and installs with pnpm.
The dependency specs in `package.json` stay as scaffolded. A check after
the install reds by name on any pinned package resolved from the
registry, and on any declared `@objectstack/*` dependency not resolved
from a tarball.
- **Removed:** the `latest` fallback and the `engines.protocol` re-stamp
(card Scope 2).
- **Docker leg, three steps, nothing under `docker/**` or in the
template edited** (Q2 A terms (i)-(v)):
1. `docker/Dockerfile` built as it stands with the PUBLISHED CLI that
the registry's `latest` names (never the candidate's version), then the
release smoke of `docker-publish.yml`: `os --version` must name that
version, and `pg` / `mysql2` must `require()`.
2. The scaffolded Dockerfile's build stage, built unedited with
`--target build`, on a base re-tagged on the runner as itself plus the
tarballs at the path the lockfile names (base image, WORKDIR and tarball
directory are all read from the files, not hardcoded). Its
`node_modules` is then layered onto the step-1 image with `.bin` first
on PATH, tagged as the runtime image the scaffolded `FROM` names; `os
--version` in the layer must name the candidate CLI.
3. The scaffolded Dockerfile, unedited, built whole on top of that
layer, run and health-probed (the existing block).
  Each step's comment states what it proves and what it does not.
- **Timeout** 20 to 45 minutes; a turbo cache step like
`os-create-smoke.yml`'s.
- **Comments:** the two stale `note.test.ts` references now name
`starter.test.ts` (card Scope 4); the pinned-shape step's comment no
longer says the install step carries a fallback; the file header says
Job 1 runs against the packed tarballs.
- Unchanged: the pinned-shape step's commands, both skills steps, the
nightly `Registry canary`.

## Tests

Local replay at head 3ded0a6, the job's own `run:` text extracted
from the YAML and executed under `bash -eo pipefail` with `RUNNER_TEMP`
outside the repo (only the port literal changed, to avoid a shared
container's 8080):

| Step | Result |
|---|---|
| Pack | `packed 113/113`, `Wrote 113 override(s)` |
| Install | `59 package(s) resolved from packed tarballs, 0 from the
registry; all 6 declared @objectstack/* dependencies among them` |
| Validate and build | exit 0 |
| Test (`starter.test.ts`) | `Test Files 1 passed (1)`, `Tests 3 passed
(3)` |
| Boot | `/api/v1/ready` answered `"status":"ready"` |
| Control: `notAnObjectKey: true` added to the company object in a copy
| validate exit 1, `ObjectSchema.create('e2e_app_company'): unknown
key(s) — notAnObjectKey.` |

The Docker steps can run only on CI (no Docker daemon in the dispatch
container). What was measured locally instead:

- The build stage's frozen install, simulated: the Dockerfile's COPY set
in a fresh directory, the tarballs one level up (the in-image path step
2 computes), a fresh pnpm store, the runner's absolute tarball directory
moved away, `corepack pnpm@10` (10.34.9) `install --frozen-lockfile`
exit 0, `os build` exit 0, and that tree's own CLI booted the artifact
to ready (`@objectstack/cli/19.0.0-next.0`). Without the tarballs at
that path: exit 254, ENOENT on the relative tarball path.
- Steps 1 and 2 driven by a stub `docker` on PATH: the derived base
`node:22-slim`, WORKDIR `/app`, tarball directory `../tarballs` to
`/tarballs`, the two generated Dockerfiles, and both version guards red
when the stub answers the wrong version.

## Acceptance notes

- Acceptance probe: the card names PR objectstack-ai#37428's head; that PR merged, so
per claim 7193414418 the probe is this PR's own "Scaffold with repo
dist" run.
- The control was measured by local replay of the job's own validate
step. Running it on CI would need a template edit on this branch, which
the ruling forbids.
- The pinned-shape step's warning string still mentions "the install
step's fallback". Its commands are left byte-identical under card Scope
3; only the comment above them was corrected.
- The file header lines that describe Job 1 sit outside the job block;
they were corrected because they would otherwise state the opposite of
what the job now does (comment-only).
- The workflow's `paths:` filter does not name
`scripts/publish-smoke-pack.mjs`, so a change to the packer alone does
not run this job (`os-create-smoke.yml` does run on it). Left as is: the
trigger is outside the ruled surface.
- In both `os start` blocks, `kill "$SERVER_PID"` stops the `npx`
wrapper and leaves `os start` and its `serve` child running (seen in the
local replay). It has no effect on CI because the VM is discarded.
Pre-existing, and not changed here.
- The timeout of 45 minutes is an estimate. This PR's first run measures
it.

## Verification

Read first:
1. `.github/workflows/scaffold-e2e.yml`, the step "Build the candidate
runtime layer (scaffolded build stage + official image)". This is the
riskiest hunk because it re-tags the build stage's base on the runner
and layers the candidate `node_modules` onto the official image.
2. The same file, "Install generated project (this checkout's packed
tarballs)". The leak and coverage check there is what keeps the job
honest.
3. The same file, "Build official runtime image from this checkout". It
uses the published CLI version, never the candidate's.

Two-minute check: open this PR's "Scaffold with repo dist" check.
Expected: green. The install step should print `0 from the registry`,
step 1 `@objectstack/cli/18.6.0`, and step 2
`@objectstack/cli/19.0.0-next.0`, and the last step's container should
become healthy.

<details><summary>Derived gates (dispatch-gates --commands) at
3ded0a6</summary>

All 38 derived commands exit 0 locally, and `--ran` reconciles `38
derived, 38 run, 0 NOT-MEASURED, 0 UNRUN`. Two reds on earlier heads
were caused by this diff and are fixed: `check-self-test-wired
--self-test` (the packer was spelled with a `$GITHUB_WORKSPACE` prefix
that the invocation census keys as a path with no file behind it) and
`check:pm-dispatch-gates` (its census pins `scaffold-e2e.yml:23` for the
`no-check-families` marker, and a longer header moved it). CI's
check-runs on this PR are the authority.

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_016WV4cyyekQEqLjtrCLLAeV)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

命令行空白模板改用起步应用的公司、联系人

2 participants