Skip to content

fix(cli): os init -t app places its item fields through the group's fields list, as os g object does - #38176

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-8u7sjp
Nov 28, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-8u7sjp

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Fixes #37615

Clause-②: no
Metadata-protocol: none

维护者速读

  • 新建应用项目的开发者用命令行模板建项目后,示例对象里字段归入「详情」分组的写法,和生成对象命令、新手模板现在是同一种;页面上显示的分组不变。
  • 属于「新手只遇到一种写法」这条线:之前命令行还在教另一种写法,照抄的人和编程助手会学到两套。
  • 只改新项目生成出来的示例文件,已有项目不受影响;有问题直接撤回即可。
  • 无

What changes

Tests

  • New packages/cli/test/init-item-field-placement.test.ts: renders the template's item object and pins (1) no per-field group: line, and (2) the details group's fields list names exactly the declared fields, in order, and sits after the field map.
Readings at 1e34fc9 (base origin/main 581ae76)
  • Premise at 581ae76: git grep -n "group: 'details'" -- packages/cli/src → 3 hits, all init.ts (1080, 1084, 1094); generate.ts:353-354 already writes the fields list.
  • New pin: Test Files 1 passed (1), Tests 2 passed (2). Ablation: init.ts restored to 581ae76 with the pin in place → Tests 2 failed (2), both tests red; fix restored after.
  • @objectstack/cli unit project (vitest run --project unit --maxWorkers=2, under the verify lock): Test Files 447 passed (447), Tests 6419 passed (6419), VERDICT command-exit 0.
  • Integration layer for this surface, run locally on the probe (same init.ts bytes): OS_TEST_TIERS=nightly starter-field-consumers.e2e.test.ts + generate-scaffold-gates.e2e.test.ts → Test Files 2 passed (2), Tests 73 passed (73) (real os init -t app, then os validate / os lint, with the strip-the-placement control). The rest of the integration layer is CI's.
  • pnpm --filter @objectstack/cli typecheck exit 0 (tsc --noEmit + check:test-typecheck OK).
  • dispatch-gates --ran at 1e34fc9: 70 derived, 70 run, 0 NOT-MEASURED, all exit 0. check-plugin-teardown-shape --self-test, check:dual-build-cjs-loads and check:i18n-coverage first answered exit 3 (prerequisite: pinned commit / package builds) and exit 0 once those were in place.
  • overlap-check.mjs: VERDICT clean exit 0, 0 open PR heads touch the changed files.

Acceptance notes

  • Other per-field group: 'details' sites in the tree (examples/app-showcase/src/data/objects/semantic-zoo.object.ts, packages/metadata-protocol test fixtures) are not newcomer scaffolds and are left as they are.

Verification

Read first (by risk):

  1. init.ts: the item object template, around the fieldGroups block after fields.

Two-minute check: pnpm --filter @objectstack/cli exec vitest run test/init-item-field-placement.test.ts passes; put init.ts back to 581ae76 and both tests turn red.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibypsynz3Cc6Yp3SXFZ

…ields list

The app template's item object wrote a field group with no fields list
and `group: 'details'` on each field, while `os g object` and the
create-objectstack starter list a group's fields in the group itself,
after the field map. The item now does the same, so a new project meets
one placement style. Both spellings mean the same placement.

A pin renders the template and asserts no per-field `group`, and that
the details group lists every declared field.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibypsynz3Cc6Yp3SXFZ
@github-actions github-actions Bot added size/s 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 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/cli, touching 2 documentable anchor(s).

18 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 9dca1097bd8f843c630cd491d2c8af20e1c678cb.

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

What this run could not see
  • 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 — 40 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 9dca1097bd8f843c630cd491d2c8af20e1c678cb → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 9482bfb56592117140fd85bb5cfedb8df0315815 — the merge of head 1e34fc99a9a85bcc7d7ecd17ff60362813816aaa into base 9dca1097bd8f843c630cd491d2c8af20e1c678cb, 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 9482bfb56592117140fd85bb5cfedb8df0315815 && git checkout 9482bfb56592117140fd85bb5cfedb8df0315815
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9dca1097bd8f843c630cd491d2c8af20e1c678cb 1e34fc99a9a85bcc7d7ecd17ff60362813816aaa && git checkout -B drift-repro 9dca1097bd8f843c630cd491d2c8af20e1c678cb && git merge --no-ff 1e34fc99a9a85bcc7d7ecd17ff60362813816aaa

node scripts/docs-audit/affected-docs.mjs --json 9dca1097bd8f843c630cd491d2c8af20e1c678cb

⚠️ 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 9dca1097bd8f843c630cd491d2c8af20e1c678cb → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1
2026-11-28T05:57Z

L1-a: ACCEPT at 1e34fc99a9

  • Face: L1 only. The PR changes one CLI template string in packages/cli/src/commands/init.ts, adds a pin test and a patch changeset for @objectstack/cli. It declares Clause-②: no and Metadata-protocol: none, and touches no spec or governed path.

  • The two spellings really do place fields the same way. resolveFieldGroupMembership (packages/spec/src/data/field-group-layout.ts) reads a group's fields list first, then a field's group. So fields: ['name', 'description', 'status'] puts the same three fields into Details, in the same order, as the three group: 'details' did.

  • "validate and lint report nothing new" holds. field-no-consumers (packages/lint/src/validate-field-consumers.ts) credits the synthesized layout through deriveFieldGroupLayout, which uses the same membership resolution. So a listed field counts as displayed, exactly as a group-placed one did.

  • The pin reads the rendered template, not the source text. It asserts:

    • no per-field group is left;
    • the list equals the declared fields, in order;
    • fieldGroups comes after the field map.

    It fails on the 581ae76a template.

  • Card scope. Fixes #37615 matches the claim (7234242384): item 1 is delivered, and item 2 was split to docs:19.0 正式发布后删掉入门页两处「18.6.0 today」提示(从 #37615 拆出) #38159.

  • Changeset prose. The changeset's sentences match the diff, including "a project scaffolded by an earlier release keeps working unchanged".

  • CI at this head: 38 success, 16 skipped, 0 failed. mergeable_state is clean.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

Landing · 2026-11-28T06:00Z · zone o3-build (seat card thread)
Head-sha: 1e34fc99a9a85bcc7d7ecd17ff60362813816aaa

  • L1 ACCEPT 7234998532 at this head (L1-a). L1 only: Clause-② no, Metadata-protocol none; the new placement yields the same groups and order (resolveFieldGroupMembership reads the group's fields first), and field-no-consumers accepts it.
  • Claim 7234242384 (item 1 only; item 2 is docs:19.0 正式发布后删掉入门页两处「18.6.0 today」提示(从 #37615 拆出) #38159). Report 7234675647.
  • check-governed-merges.mjs --pr 38176: NOT governed, +69 / −14.
  • K: 13 < 15, counted by hand (git rev-list --first-parent --count from the merge base to origin/main).
  • Checks at this head: 38 success, 16 skipped, 0 failed. mergeable_state clean.
  • Action: ready for review and auto-merge (queue).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 28, 2026 06:00
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 46114686643 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (2/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/approval-decide-over-mcp.dogfood.test.ts > an approver's agent decides a pending approval request over MCP (#32442) > ⭐ a member on no slate is refuse
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    @objectstack/dogfood:test:  FAIL   isolated  test/approval-decide-over-mcp.dogfood.test.ts > an approver's agent decides a pending approval request over MCP (#32442) > ⭐ [#33690] the approver's call d
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    @objectstack/dogfood:test:  FAIL   isolated  test/approval-decide-over-mcp.dogfood.test.ts > an approver's agent decides a pending approval request over MCP (#32442) > ⭐ [#33690] the submitter's recal
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    @objectstack/dogfood:test:  FAIL   isolated  test/mcp-system-object-action-exposure.dogfood.test.ts > [#27681, #27900] sys_user identity actions over MCP: what each bucket's declaration lets an agent 
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    @objectstack/dogfood:test:  FAIL   isolated  test/mcp-system-object-action-exposure.dogfood.test.ts > [#27681, #27900] sys_user identity actions over MCP: what each bucket's declaration lets an agent 
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 44 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Merged via the queue into main with commit 7960019 Nov 28, 2026
55 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-8u7sjp branch November 28, 2026 08:30
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/s 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.

review follow-ups of PR #37595: os init field placement dialect, and the 18.6.0 callouts to remove at 19.0

2 participants