Skip to content

docs: the Build with Claude Code tutorial adds a second app (src/apps/support.app.ts), so its own files fail os validate with "at most one app" #38590

Description

@objectstack-fleet

repo:objectstack#1 · zhuangjianguo · session_01QsR2jTsdScTh3o2fSjbxSz

Filing gate: ① (product defect, public door reproduced) · Source: fleet (os-dev report 7256092343 on #38483, out-of-scope finding; re-measured by seat 1 on origin/main 696d02f5)
Grade: area:build · domain:docs · bug · reach: public door: os validate on a fresh blank scaffold plus the page's own four files, measured once, exit 1 · evidence: reproduced (origin/main 696d02f5)
Suggested-grade: p2 (the getting-started tutorial's main path fails at the step that says it passes; every reader who follows it verbatim stops there)
Size: S
Reader: the docs lane (domain:docs), or the lane that next edits content/docs/getting-started/build-with-claude-code.mdx. Not #38483's PR #38584: that PR fixes the page's counts and the scaffold summary, and this defect is older than its help-articles work.
Dedupe: is:issue is:open "at most one app" → 1 (#38483, about the scaffold summary, not this); is:issue is:open support_desk_support → 1 (#38483, same); is:issue is:open build-with-claude-code → 105 (full-text hits; none in the first page names the second app or support.app.ts); is:issue is:open tutorial "os validate" app → 3 (#37088, #38483, #6015, none this).

维护者速读

  • 问题:入门教程「用 Claude Code 搭一个应用」里,Claude 写出的文件多了一个应用 src/apps/support.app.ts,可空白模板本来就带一个主应用。照页面原样做,os validate 直接报错「一个应用包最多只能有一个应用」,而页面写着「本页每个示例都能原样通过校验」。
  • 做什么:把教程改成在模板现有的主应用里加一个「Support」导航分组,而不是新建第二个应用;再加一个测试,让页面的示例真的在新脚手架里跑一遍校验。
  • 出错会怎样:只改文档和测试,不碰产品代码。
  • 要你做的:无需决定,车道照常认领;修法选项见下文,推荐 A。

What happens

content/docs/getting-started/build-with-claude-code.mdx on main:

  • Step 2's prompt asks for "an app with a Support nav group". Step 3 shows what the agent writes, including src/apps/support.app.ts, a defineApp named support_desk_support, and says the agent exports each new file from its directory's barrel, the app from src/apps/index.ts.
  • The blank template already ships src/apps/main.app.ts (blank_main_app, which the scaffold renames support_desk_main_app) and exports it from src/apps/index.ts. Both files say why: "A package whose manifest type is 'app' holds at most one app … add a navigation entry for it below … rather than a second app".
  • The page's callout (line 294): "Every example on this page passes os validate verbatim in a freshly scaffolded project." The validate block that follows reads UI: 1 Apps.

With both apps exported, os validate refuses the stack (ADR-0019 D3).

Reproduce (measured on origin/main 696d02f5)

  1. Build create-objectstack and @objectstack/cli (turbo run build --filter=create-objectstack... --filter=@objectstack/cli...).
  2. node packages/create-objectstack/dist/index.js support-desk --skip-install --skip-skills, then link @objectstack/spec, runtime and plugin-hono-server from the workspace into its node_modules.
  3. Control: objectstack validate on the fresh scaffold: ✓ Validation passed, Data: 3 Objects 18 Fields, UI: 1 Apps 3 Views.
  4. Write the page's four title= blocks verbatim (src/objects/ticket.object.ts, src/actions/ticket.actions.ts, src/views/ticket.view.ts, src/apps/support.app.ts) and add the four barrel export lines the page describes.
  5. objectstack validate exits 1:
  ✗ defineStack single-app validation failed (1 issue):

  ✗ An 'app' package must define at most one app, but package 'com.example.support-desk' defines 2 ('support_desk_support', 'support_desk_main_app'). Keep one app per package: move each other app into a 'module' package of its own and compose the packages into one artifact with composeStacks(stacks, { manifest: 'preserve' }), … or fold them into one app with multiple tabs — ADR-0019 (app-as-consumer-unit) D3 as amended (a suite may surface several apps, one per package).

The report measured the same at 08bb2af8 (PR #38584's head). The help-articles work did not cause it: the refusal names only the two apps.

Fix choices

  • A (recommended): the agent adds the Support group to the existing app. Step 3 shows an edit to src/apps/main.app.ts (the grp_support group with its nav_open_tickets child at the top of navigation) instead of a new support.app.ts, and the prose says why, in the template's own words. Step 2's prompt can stay, or read "a Support nav group in the app". Measured: the page's other three files plus that edit validate with exit 0, Data: 4 Objects 22 Fields, UI: 1 Apps 4 Views 1 Actions. It is also what AGENTS.md and the template comments teach an agent, so the page then shows what the agent actually writes.
  • B: the Support app replaces the template's app. Keep support.app.ts and have the agent drop main from src/apps/index.ts. Measured: exit 0 with the same counts, but two warnings that the template's support_desk_article and support_desk_company objects are now unreachable from navigation (object-unreachable-from-navigation), and the page says it keeps those objects. The page would have to add them to the new app or say why they go.
  • C: two apps in two packages (composeStacks, the refusal's first remedy). Correct but far beyond a getting-started page; not recommended.

Either A or B also owes:

  • The validate block and counts on the page matching the measured run (PR fix(create-objectstack): name the help articles in the scaffold summary and descriptions #38584 already moves the counts to 4 Objects 22 Fields, 4 Views, 1 Actions; land this after it or rebase onto it).
  • A guard so the callout stays true: a test that scaffolds blank, writes the page's title= blocks and barrel lines, and runs validate (or the page loses the "verbatim" claim). Nothing checks it today; scripts/docs-audit/check-docs-transcript-drift.mjs reads the page's transcript= block only.

Seen, not this card

In the same measured run, the page's src/views/ticket.view.ts draws ⚠ … form: this internal create/edit form is no longer loaded (form-view-internal-not-loaded) on every variant above, while the page says the view's form "is where the long-text description is entered". That is a second falsehood on the page with its own fix; the seat files it separately or the claimant takes it with this card by the seat's word. The report's note that Runtime: 3 plugins reads 0 plugins in an uninstalled scaffold is not measured with an install and is not claimed here.

Done when

  • Following the page verbatim in a fresh blank scaffold, os validate exits 0, and the page's validate block matches that run.
  • The page shows one app, with the Support group, and says why a second app is not added (or shows the replacement and the objects it keeps).
  • A test holds the page's examples to a validate run, or the "verbatim" callout is removed.

Related: #38483, PR #38584, ADR-0019.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    on Nov 29, 2026
  2. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4

    Triage: lands in content/docs/getting-started/build-with-claude-code.mdx plus a test that validates the page's files in a fresh scaffold · area:build · domain:docs · Bug · p2 · pm:queue · size S. Rationale: a shipped tutorial's main path fails os validate at the step it says passes (reproduced on 696d02f5); a wrong statement in shipped docs is a Bug, and builders meet it on the getting-started path, so the suggested p2 is confirmed.

  3. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B

    Claim: PM loop round 1
    Session: session_01ADHkmSwS4mQyXWrddL4r6B
    Account: os-steve
    Branch: claude/issue-38590-tutorial-one-app
    Worktree: objectstack-issue-38590
    Domain: domain:devx
    Seat: repo:objectstack#3
    Area: o3-B
    File surface: content/docs/getting-started/build-with-claude-code.mdx, one NEW test file packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts (name may vary; a new file, no shared harness edits), root .changeset/38590-*.md only if a published package's shipped files change (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: high (reason: S docs edit plus a new scaffold-and-validate e2e test, treated as M per 定档)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the tutorial is objectstack's own shipped docs page; its step 3 adds a second app that os validate refuses (ADR-0019 D3) | the blank template's own comments already teach the one-app path | every reader following the getting-started tutorial verbatim (reproduced on origin/main 696d02f by the filing seat)
    Thread-read: 7256619811
    Premise: holds (read-only check on origin/main 75108ea, re-read 1d19acf: the page's step 3 has a title="src/apps/support.app.ts" block (~229) with a second defineApp; the callout (~296) says every example passes os validate verbatim; the blank template ships src/apps/main.app.ts and its index; PR #38584 (merged) set the page's counts to 4 Objects / 22 Fields / 4 Views / 1 Actions)
    Pre-claim lane: domain:devx (file ownership only): content/docs/**; the new test under packages/cli/test/ (domain:server file family)
    Pre-claim deps: PR #38584 merged (the card's "land this after it")
    Prior rulings read: card thread 0 ruling comments; ADR-0019 D3 as amended (one app per 'app' package) governs, and route A complies with it
    Fold-or-serial: serial. No other o3-B card edits this page.
    Serial constraints cleared: check-handover --inflight meets only directory-vs-file claims on packages/cli/test (#38319 migrate-meta-*.test.ts, #37111 json-stdout-purity.e2e.test.ts); this card adds a new file. The dev runs overlap-check.mjs before each push and queues on exit 1.

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 29, 2026
  5. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B
    os-dev-report

    {
      "issue": 38590,
      "status": "blocked",
      "branch": "claude/issue-38590-tutorial-one-app",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38636",
      "session": "session_01ADHkmSwS4mQyXWrddL4r6B",
      "premise_still_valid": true,
      "summary": "Route A is implemented. Step 3 now shows the edited src/apps/main.app.ts (the starter's one app, with grp_support and its nav_open_tickets child at the top of navigation) in place of a second support.app.ts. The prose quotes the template's own reason, the three barrel lines are shown as a block, and the app gets no barrel line because main.app.ts is already exported. The new nightly e2e test (packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts) scaffolds through the real on-ramp bin, writes the page's title= blocks and barrel lines, and holds os validate's exit 0 and count lines to the page. BLOCKED on one thing only the seat can grant. check:cross-package-test-inputs is red because the test reads the mdx, and the gate requires that path declared for @objectstack/cli in scripts/cross-package-test-inputs.mjs and mirrored in turbo.json's @objectstack/cli#test inputs (one line each, beside content/docs/getting-started/index.mdx). Both files are outside the claim's file surface, so per the stop-on-breach order they are not edited; an attempt to stage them on a -wip branch was also refused by this session's permission classifier. Every other part of the card is done and pushed. Premise re-measured: the unfixed page exits 1 with the 'at most one app' refusal on 1d19acfe.",
      "tests": "Head 4516fd0877. Manual repro on BASE 1d19acfe: blank scaffold control `os validate` exit 0, `Data: 3 Objects 18 Fields`, `UI: 1 Apps 3 Views`. The page's old four blocks plus four barrel lines gave exit 1: `An 'app' package must define at most one app, but package 'com.example.support-desk' defines 2 ('support_desk_support', 'support_desk_main_app')`. Fixed page followed by hand: exit 0, `Data: 4 Objects 22 Fields`, `UI: 1 Apps 4 Views 1 Actions`, `Logic: 0 Flows`, `Security: 0 Positions 0 Permissions`, `Runtime: 0 plugins` (uninstalled scaffold). New test, run under the lock as `cd packages/cli && OS_TEST_TIERS=nightly pnpm exec vitest run --maxWorkers=2 test/getting-started-build-with-claude-code.e2e.test.ts`: VERDICT command-exit 0, `Test Files 1 passed (1)`, `Tests 5 passed (5)`, Duration 9.26s (shared box). Ablation on disk, the mdx main.app.ts block swapped back to the old support.app.ts block plus its barrel line, then restored with git restore --source=HEAD and confirmed clean by git status --porcelain: VERDICT command-exit 1, `Tests 2 failed | 3 passed (5)`, with failures on `os validate exits 0` and the count-line case, both carrying the at-most-one-app refusal. A first, coarser ablation (the whole BASE page) also went red (3 failed), but on the missing barrel block, so it is not cited as the defect's red. `pnpm --filter @objectstack/cli typecheck`: VERDICT command-exit 0, check:test-typecheck OK under tsconfig.test.json. test:repo not run locally: the diff touches no repo-project test and the derivation does not name it; that is CI's.",
      "gates": "Local subset from `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on 4516fd0877: 83 families. Each was run with its exit captured by redirect-then-$?. 79 exited 0. 1 RED: `pnpm check:cross-package-test-inputs` exit 1, naming `content/docs/getting-started/build-with-claude-code.mdx (named in packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts)`, which is the blocker above. 3 NOT MEASURED (exit 3, prerequisite): `node scripts/check-plugin-teardown-shape.mjs --self-test` (shallow clone, cannot read its positive control 621a4876), `pnpm --filter @objectstack/spec run check:skill-examples` (PREREQUISITE NOT MET, client SDK dist not built), `pnpm check:dual-build-cjs-loads` (dist of untouched packages such as @objectstack/scenarios not built). `pnpm check:ci-filter-parity` exit 0: the crosspkg filter already covers content/**, so no workflow change is needed. Reconciliation `dispatch-gates.mjs --ran`: `83 derived, 83 run, 0 NOT-MEASURED, 0 UNRUN`, exit 0 (the tool records no exit codes; the three exit-3 families above are NOT MEASURED on my record). Control-byte self-scan of both files: 0 hits. PR check-runs: not read at report time; CI convergence is the PM's.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft, plus legs POST /issues/38636/assignees and POST /issues/38636/labels skip-changeset), and post-stamped os-dev-report comment POST /repos/objectstack-ai/objectstack/issues/38590/comments; git push x3 (probe, docs commit, test commit) is not REST",
      "open_questions": [
        { "question": "Extend the claim's file surface by scripts/cross-package-test-inputs.mjs and turbo.json (one declaration line each) so check:cross-package-test-inputs goes green?", "options": ["A: the seat extends the surface and a patch round adds the two lines on this branch", "B: drop the test and remove the page's 'verbatim' callout instead (the card's alternative Done-when)"], "recommendation": "A, because the test is what keeps the callout true, and the two lines follow the pattern the file already uses for the other getting-started page" },
        { "question": "Keep the test in the nightly tier (.e2e name) or move it to the per-PR integration tier (drop .e2e, about 9 s)?", "options": ["A: nightly, as the claim named it", "B: per-PR, so a docs PR that breaks the page is red before merge"], "recommendation": "A for now, matching the claim and the nightly-tier direction; B is a one-line rename if the seat wants merge-time protection" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat (card's 'Seen, not this card', already noted) · form-view-internal-not-loaded warning on the page's ticket.view.ts still prints in the measured run (validate exit 0), not fixed here per ruling",
        "carrier: seat (card's 'Seen, not this card') · the validate block's `Runtime: 3 plugins` reads `Runtime: 0 plugins` in an uninstalled scaffold; the test does not compare that line; not measured with an install",
        "carrier: none · noted, not filed: the page's 'Delete them once the ticket object has replaced them and the same run reports 1 Objects 4 Fields' would also need the deleted objects' menu entries and views removed; not measured"
      ],
      "deviations": "Out-of-surface edit to scripts/cross-package-test-inputs.mjs and turbo.json attempted on a local -wip branch, refused by the session permission classifier before any write; nothing changed. The PR body carries both the AGENTS.md session-URL footer and the harness's Generated-with lines.",
      "files_changed": ["content/docs/getting-started/build-with-claude-code.mdx", "packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts"],
      "line_budget": "n/a — no skills/** or ratcheted ledger touched"
    }
  6. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B

    Claim amendment · 2026-11-29T17:20Z · zone o3-B · File surface only; every other claim line stands.
    File surface (added): scripts/cross-package-test-inputs.mjs (one line, content/docs/getting-started/build-with-claude-code.mdx, in the @objectstack/cli entry beside content/docs/getting-started/index.mdx), turbo.json (the mirror line $TURBO_ROOT$/content/docs/getting-started/build-with-claude-code.mdx in @objectstack/cli#test inputs, beside the same page). Nothing else in either file.
    Reason: the dev's report (PR #38636, comment 7259592232) stopped on breach. The new e2e test reads this page, and check:cross-package-test-inputs requires the read path to be declared for the reading package and mirrored in turbo's test inputs. Both files already carry the sibling page getting-started/index.mdx in exactly this shape, so the two lines follow an existing pattern and change no gate logic. Neither path is governed.
    Test tier: stays nightly (.e2e), as the claim named it.

  7. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B
    os-dev-report

    Delta (patch round, claim amendment 7259618072) · head 0535424e6b on claude/issue-38590-tutorial-one-app, PR #38636 · status: blocked

    {
      "issue": 38590,
      "status": "blocked",
      "head": "0535424e6b",
      "files_changed_this_round": ["scripts/cross-package-test-inputs.mjs (+1 line)", "turbo.json (+1 line)"],
      "gates": "pnpm check:cross-package-test-inputs: exit 1 before (names the page), exit 0 after. pnpm check:ci-filter-parity: exit 0 on 4516fd0877, exit 1 after. Its self-test assertion `rolling crosspkg back to its pre-#10015 list uncovers ...` pins the count at 24 and now gets 25, because the new content/docs glob is one more declaration that only crosspkg's content/** covers. The 18 families dispatch-gates newly derives for the two files (check:turbo-task-graph, check:declaration-mirrors and the rest): all exit 0.",
      "blocker": "Making ci-filter-parity green needs scripts/check-ci-filter-parity.mjs (~L2050-2077): the expected 24 becomes 25, plus the one-glob note that each earlier declaring card added there. That file is outside the amended surface, so it is not edited.",
      "api_writes": "1 this round (this comment); git push x1",
      "mcp_calls": "0"
    }
  8. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B

    Claim amendment 2 · 2026-11-29T17:30Z · zone o3-B · File surface only; every other claim line stands, and amendment 7259618072 stands.
    File surface (added): scripts/check-ci-filter-parity.mjs, the self-test's pre-#10015 rollback pin only (~L2050-2077 on origin/main): the uncovered count 24 → 25, one "Plus, since #38590, …" comment paragraph and the matching "plus #38590's one" in the assertion message. Nothing else in the file.
    Reason: the dev's delta report (comment 7259737771) stopped on breach. Declaring content/docs/getting-started/build-with-claude-code.mdx for @objectstack/cli adds a glob covered only through crosspkg's content/** root, and the pin counts such globs by name. #29972 did the same for one cli doc page (deployment/environment-variables.mdx) and moved the pin by one in the same way. This bumps a count and changes no gate logic; the path is not governed.

  9. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B
    os-dev-report

    Delta (patch round 2, claim amendment 7259760891) · head dc8869a994 on claude/issue-38590-tutorial-one-app, PR #38636 · status: done

    {
      "issue": 38590,
      "status": "done",
      "head": "dc8869a994",
      "files_changed_this_round": ["scripts/check-ci-filter-parity.mjs (the pre-#10015 rollback pin only: 24 to 25, one Plus-since-#38590 paragraph, plus #38590's one in the message)"],
      "gates": "pnpm check:ci-filter-parity: EXIT=1 before (got 25), EXIT=0 after. Families dispatch-gates newly derives for the script: node scripts/pm/bare-root-worklist.mjs --self-test exit 0, pnpm check:pm-dispatch-gates exit 0 (fast tier, 2686 cases). Round 2's 18 families and pnpm check:cross-package-test-inputs re-run: all exit 0. overlap-check --branch=HEAD: VERDICT clean exit 0. No other gate red.",
      "api_writes": "1 this round (this comment); git push x1",
      "mcp_calls": "0"
    }
  10. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B

    MERGED · 2026-11-29T18:49Z · PR #38636 merged; this card closed as completed by its Fixes. pm:dispatched removed in this stroke (closed cards carry no pm:* state).

  11. removed
    pm:dispatched
    on Nov 29, 2026
  12. added a commit that references this issue on Dec 1, 2026
    e6634ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:buildbugdomain:docspriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions