Repository navigation
Commit 3f4cb21
docs(scenarios): running the cards in a Claude Code cloud session (#31200)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XCH6tjGjMxCiQjwNSFKg84N)_
Fixes #31161
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`packages/qa/scenarios/README.md` 新增一节「Running the cards in a
Claude Code cloud session」(28 行,仅文档):只需 objectstack 仓;`claude`
用订阅登录(跑批器拒绝 API key,`ANTHROPIC_API_KEY` / `ANTHROPIC_AUTH_TOKEN` 须
unset);权限模式不用 Auto;后台命令上限 2 小时,每条命令跑一张 `starter` 卡;先 `pnpm --filter
'@objectstack/scenarios^...' build`;npm 可达;成本是会话的订阅额度。
- 为什么改:维护者在卡上的原话「前面的建议都同意,立卡」;七条内容由 epic 席位实测,本 PR 照录,并对照 `origin/main`
核对了能从树上回答的部分。
- 风险与回滚:只改私有包 `@objectstack/scenarios` 的 README,不发布、不改代码;回滚即还原本 PR。
- 先看:`packages/qa/scenarios/README.md` 新节(位于 `## Running the cards —
@objectstack/scenarios/runner` 之前,避开 #31185 在文末与 #31147 在命令块处的改动)。
- 两分钟验证:在 GitHub 上打开该 README
的新节,预期七条要点加一个四行命令块;`--only`、`--create-version` 与拒绝条件可在
`src/runner/cli.ts` / `src/runner/driver.ts` 对上。
- 需要你做的:无,席位落地。
## What changes
`packages/qa/scenarios/README.md` gains a section, **Running the cards
in a Claude Code cloud session**, under its own heading: the card's
seven bullets (Repository, Login, Permission mode, Time, Build first,
Network, Cost) and a four-line command block (`unset` the two API
variables, `claude auth status`, install + closure build, one `starter`
card with `--only`). Docs only; no code.
## Tests
None owed: a README in a private package, no behaviour changed, so no
test and no ablation (os-dev: docs are not ablated).
## Acceptance notes
What the tree answers, checked on `origin/main` 13c6d8f (and unchanged
at the merged head):
- **Build command**: `pnpm --filter '@objectstack/scenarios^...' list
--depth -1` selects 17 workspace packages, `@objectstack/spec` and
`@objectstack/types` among them, the package itself not; the build ran
exit 0 here (3 min 17 s under the lock).
- **Login refusals** (`src/runner/driver.ts` `assertSubscriptionLogin`,
`API_BILLING_ENV`): the live driver refuses a non-empty
`ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN`, a `claude auth status`
reporting no login, and an `authMethod` matching an API key; the README
says the first two and the third, as the card does. `authMethod` comment
names `oauth_token`, as the card does.
- **Flags cited**: `--only` and `--create-version` exist in
`src/runner/cli.ts`; the scaffold default is `npx -y
create-objectstack@latest` (`src/runner/project.ts`), so "generated apps
install from npm" holds; `bootDev` takes a free port (`freePort`), which
is why two commands in parallel do not collide.
- **One difference from the card, Build first.** The card names one
failure, `Failed to resolve entry for package @objectstack/types`. On a
fresh worktree of 13c6d8f (install only, no build) that is what the
**suites** answer (`vitest run test/runner/units.test.ts`);
`run-scenarios` itself, which runs `src/` through tsx, stops earlier
with `ERR_MODULE_NOT_FOUND` on `@objectstack/spec/dist/api/index.mjs`
(run with `--driver recorded:` on a missing file, so no model and no
network). The README names both. Neither error text lives in the tree
(they are Vite's and Node's).
- **Not answerable from the tree, carried as the card states** (the epic
seat's measurements): the Auto-mode classifier refusal, the 2-hour
background-command cap, the 20–30 min `starter` build, the default
network setting reaching npm, and the subscription quota as the cost.
- **Placement**: before `## Running the cards —
@objectstack/scenarios/runner` rather than at the end of the file,
because #31185 appends at the end and #31147 edits the command block and
the paragraph after the mode table; neither hunk is adjacent to this
one.
## Verification
Gate union derived by `node scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack` (41 families for this diff), run on
head `fd84fc7b` (the `origin/main` merge; the README diff is the same 28
lines), reconciled with `--ran`:
- **40 run, exit 0 each** (closure built first: `pnpm --filter
'@objectstack/scenarios^...' build`, VERDICT command-exit 0). `--ran`:
"41 derived famil(ies) accounted for — 40 run, 1 NOT-MEASURED".
- **NOT MEASURED: `pnpm check:dual-build-cjs-loads`**, reason: exit 3
PREREQUISITE NOT MET, it loads every package's built `dist/` and only
the scenarios closure was built; CI's `Lint & Repo Gates` runs it on a
full build.
- `node scripts/check-plugin-teardown-shape.mjs --self-test` needed `git
fetch --depth=1 origin 621a487` for its pinned fixture on this shallow
clone, then exit 0.
- CI families (every required check) are read from this PR's check-runs,
not re-run here.
`pnpm lint` scoped: the package has no `lint` script, so the root eslint
ran on it (`node --stack-size=4000 node_modules/eslint/bin/eslint.js
packages/qa/scenarios --no-inline-config`), exit 0.
`skip-changeset`: `@objectstack/scenarios` is `private: true` and the
diff touches nothing else.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5o8Cp9Bu11Ex4Q1P1g)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent a5638b6 commit 3f4cb21
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
97 | 125 | | |
98 | 126 | | |
99 | 127 | | |
| |||
0 commit comments