Skip to content

feat(scenarios): publish @objectstack/scenarios with an objectstack-scenarios CLI (npx), carrying the open cards only - #31221

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-78z461
Nov 7, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-78z461

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #31172

Clause-②: yes
Metadata-protocol: none

维护者速读

  • 改了什么:@objectstack/scenarios 去掉 private,随 @objectstack/* 发版列车一起发布,带一个命令 objectstack-scenarios。npx @objectstack/scenarios run … 就是今天的 run-scenarios,参数、默认值和拒绝规则完全相同;包里只带开放卡库(docs/qa/scenarios/*.json 与能力区清单),构建时拷进 dist/library/。
  • 为什么改:维护者原话「把执行器发布成一个独立的命令行工具,同意」。外部团队和其他 agent 工具不用克隆平台仓库就能跑卡片。不是 os 子命令,裁决 D 不变。
  • 风险与回滚:新增一个公开包和一个命令,已有包的行为不变;最大的风险是私有卡片随包外泄,所以打包测试对 tarball 做白名单:除了 package.json、与 docs/qa/scenarios/ 逐字节相同的卡片、与能力区逐字节相同的清单,任何 JSON 出现都红。回滚即 revert 本 PR(发版前没有任何东西发布出去)。
  • 先看:packages/qa/scenarios/test/build/packed-tarball.test.ts(打包白名单与命令冒烟)、packages/qa/scenarios/src/runner/library.ts(装在 npm 里时去哪读卡库)、packages/qa/scenarios/scripts/pack-library.mjs(只拷两个目录)。
  • 两分钟验证:pnpm --filter @objectstack/scenarios build && pnpm --filter @objectstack/scenarios exec vitest run test/build/packed-tarball.test.ts,预期 10/10 通过(打包、解包、用纯 Node 跑 objectstack-scenarios,读到包内 9 张卡,--packages workspace 与 API key 登录都被拒)。
  • 需要你做的:无,席位落地。

What changes

  • The package is published (packages/qa/scenarios/package.json): private removed, publishConfig.access: public, files: ["dist", "README.md", "CHANGELOG.md"], engines.node >=22, all copied from the nearest published sibling (@objectstack/verify). It joins the changesets fixed group (.changeset/config.json), so it versions with the train; nothing is bumped by hand (it stays 0.1.0 in the tree until the release's changeset version). The description now says what it is: published, with the CLI and the open library.
  • The command line, a thin wrapper. bin.objectstack-scenarios is bin/objectstack-scenarios.js (the create-objectstack pattern): it imports the BUILT dist/bin.js and nothing else. src/bin.ts (runCli) dispatches run to the runner CLI's own main with every following argument unchanged, plus help and version. The runner is imported lazily, for run only, and the build keeps it out of dist/bin.js: a tsup esbuild plugin (binLoadsBuiltCli) turns that import into one of a separate built entry, dist/cli.js (.cjs for the CJS build), so help and version load dist/bin.js alone (1.5 KB; measured 30 ms, against about 1.2 s warm for the runner's graph). runner/cli.ts is not restructured; it changes in two places: where it finds the repository (below), and one refusal (next bullet).
  • The open library as package data. The build's new step scripts/pack-library.mjs copies docs/qa/scenarios/*.json and docs/qa/platform-checklist/areas/*.json (one level, regular files, nothing else) into dist/library/, keeping the repository's layout. The package's turbo.json adds both directories to the build's inputs, so a card edit invalidates the cached build the release would otherwise replay ($TURBO_EXTENDS$ keeps the root inputs; measured with turbo run build --dry=json: 25 docs/qa inputs, 9 cards + 16 areas).
  • Where the runner reads the library (src/runner/library.ts, locateLibraryRoot): in a checkout it is the repository, as before; installed from npm it is dist/library/. A checkout is recognised by the package sitting at packages/qa/scenarios of a pnpm workspace holding docs/qa/scenarios (compared by real path), so an install inside some other workspace is never read as one. cli.ts uses it instead of findUp(pnpm-workspace.yaml), which from an npm install would have found the user's workspace or thrown. From npm, --out defaults to ./scenario-runs (not into the package), and no framework commit is stamped (the package may sit in someone else's git repository). libraryOf is unchanged: the shipped copy is the open library, any --cards directory the overlay.
  • --packages workspace is refused from npm (cli.ts, right after the library root is located): workspace mode (feat(scenarios): run-scenarios --packages published|workspace; the gallery exporter refuses workspace records #31188) builds and packs a checkout's packages, and an installed package has none, so the run stops with that reason before it creates a work directory, builds or packs anything. published (the default) is unchanged.
  • README: "Running from npm" (prerequisites, the cards it carries, where records go, the package source, not an os command); the intro and build paragraphs no longer say "private, unpublished".
  • Changeset .changeset/31172-publish-scenarios-cli.md, patch, with both declaration lines. Corrected from minor in 9742af04: with Metadata-protocol: none the launch-window level rule (ruling A on changeset levels: minor only when the metadata protocol changes (added / narrowed / semantic), patch otherwise; release notes grouped by what the reader must do (maintainer ruling A, 2026-10-21) #25105) grades it patch, and Check Changeset refused minor.
  • packages/spec/llms.txt: its package-ecosystem section counts the published packages and check:llms-txt re-derives the count from the workspace, so it moves 74 → 75. Not the expected surface; named here because the gate makes it this PR's. The file ships in @objectstack/spec, which is in the same fixed group, so it goes out with the next release either way.

Public surface (Clause-②: yes), measured on the built entry declarations

Read with the TypeScript checker (getExportsOfModule) over dist/*.d.ts after a full build of this head:

Subpath Exports Values Type-only
@objectstack/scenarios (dist/index.d.ts) 79 55 24
@objectstack/scenarios/score 38 17 21
@objectstack/scenarios/score/full 56 25 31
@objectstack/scenarios/runner 165 118 47
@objectstack/scenarios/export 68 39 29

These five subpaths existed (private) and are unchanged by this PR except that they are now on npm (./runner and ./export count what #31188 added to them on main). New: the objectstack-scenarios command (run, help, version). dist/bin.js (runCli, USAGE, CliIo) and dist/cli.js (the runner CLI) are not exports keys, so a consumer cannot resolve them; library.ts is not re-exported from ./runner.

Tests

  • test/build/packed-tarball.test.ts (new, 10 cases): pnpm pack from the package directory (the tarball pnpm publish uploads), then the tarball extracted into a project of its own with each runtime dependency linked to the workspace build.
    • The manifest is public, names the bin, and has no workspace: range left.
    • Every card of docs/qa/scenarios/ and every area of docs/qa/platform-checklist/areas/ is in dist/library/, byte for byte.
    • No other JSON anywhere in the tarball: an allow-list of package.json, those cards and those areas. A card from anywhere else, wherever it lands, fails this case.
    • Every shipped card is origin: generic.
    • No TypeScript source (only .d.ts/.d.cts), and no src/, test/ or scripts/.
    • dist/bin.js imports fs, path and url and nothing else statically, and reaches the runner only through import("./cli.js").
    • The packed bin under plain Node: --help (exit 0), version (the packed version), no command (exit 2); run --only no_such_card loads the shipped library from INSTALL/dist/library/docs/qa/scenarios with no refusal and exits 2 with exactly that one line; run --packages workspace exits 1 on the refusal and creates no work directory; with a stand-in claude on a subscription login and ANTHROPIC_API_KEY set, run --only service_desk exits 1 on "ANTHROPIC_API_KEY is set" and scaffolds nothing.
    • Budgets. The three run cases each spawn Node over the runner's whole graph once: about 1.1 to 1.5 s each here, 5.7 s and 6.5 s cold on a CI Test Core runner (run 42400730182, where vitest's 5 s default timed them out). Each gets an explicit 30 s (RUN_SPAWN_BUDGET_MS), as built-consumer.test.ts budgets its own spawn of that graph. The help/version case is three spawns of dist/bin.js alone (123 ms here) and keeps the default. The whole file reads 5.1 s here.
  • test/runner/library.test.ts (new, 6 cases): locateLibraryRoot reads the checkout from the sources, the packed copy from an installed package, never another workspace that holds a docs/qa/scenarios and a packages/qa/scenarios, and refuses an installed package with no library; runCli prints usage, refuses no/unknown command with exit 2, and hands run's arguments to the runner CLI unchanged (--bogus, --modes nightly refused by parseArgs). The file imports src/runner/cli.ts itself, so the lazy import's transform is paid in the file's import phase, not inside a case.
Ablations (each restored: blob == HEAD, git diff HEAD empty)

All through scripts/ablation-replace.mjs (anchor x1 → x0, replacement x0 → x1); 1 and 2 on commit 2d69cfb4, 3 on 2eb91a69, 4 on 149e988b.

  • Ablation 1, the copy widened (pack-library.mjs DIRS gains docs/qa/platform-checklist): the inner script rebuilt the package (pack-library ran, dist/library/docs/qa/platform-checklist/ then held areas and coverage.json) and ran packed-tarball.test.ts → 1 failed | 7 passed, the failure being "carries no other JSON: a card from anywhere but docs/qa/scenarios is refused". Restored, and the package rebuilt afterwards (dist/library/docs/qa/platform-checklist/ holds areas only).
  • Ablation 2, the checkout test loosened (library.ts: the real-path comparison of packages/qa/scenarios with the package replaced by an always-true String("ABL2").length > 0): library.test.ts → 1 failed | 5 passed, the failure being "never reads another pnpm workspace holding a docs/qa/scenarios as the checkout". The suite imports src/, so no dist leg.
  • Ablation 3, the runner bundled back into the bin (tsup.config.ts: esbuildPlugins: [binLoadsBuiltCli].slice(0, 0)): rebuilt, dist/bin.js then carried 19 static @objectstack/* imports (196 KB); packed-tarball.test.ts → 1 failed | 8 passed, the failure being "keeps the runner out of the bin". Restored, rebuilt.
  • Ablation 4, the workspace refusal disarmed (cli.ts: its condition ANDed with an always-false String("ABL4").length < 0): rebuilt, ablation-dist-preflight found the marker in dist/cli.js and dist/cli.cjs; packed-tarball.test.ts -t 'refuses --packages workspace' → 1 failed, the run reaching workspace mode and dying on fatal: not a git repository instead of the reason. Restored, rebuilt, preflight --absent: marker absent from all 81 built files, tree clean.
  • The API-billed refusal the smoke test pins is the runner's existing behaviour, which this diff does not change, so it is not ablated.

Acceptance notes

  • The private overlay cannot reach the tarball by construction and is refused if it does. The overlay (objectstack-ai/cloud#3603) lives outside this repository; pack-library.mjs copies two named directories of this repository, one level deep; and the packaging test refuses any JSON that is not byte-identical to an open card or area. It runs in Test Core on every PR and in the merge queue, so a leak is red before it can merge, rather than at publish. The triage audit's ⚠️ asked for a check in the publish job itself; this PR does not edit release.yml (the release pipeline is outside the claimed surface): the release publishes from a commit whose Test Core ran this test.
  • The bin is a wrapper, not a second CLI. run passes its arguments through; help names the flags and points at the README instead of copying the flag table, so Scenario runner: --model / --author-model / --ask-model, with the served model recorded per turn #31160's --model flags (and any later flag) appear in run without touching bin.ts.
  • Interaction with feat(scenarios): run-scenarios --packages published|workspace; the gallery exporter refuses workspace records #31188 (--packages, merged as 86e9ef0a). Merged into this branch (no rebase), as the order's serial note asked. published (its default) works from npm unchanged; workspace is refused there (What changes). Its exporter rule (refusing workspace records) is in ./export and needs nothing here. Its workspace mode packs every non-private @objectstack/* package, so it packs this one too (76).
  • dist/bin.js has no top-level effect (it only exports runCli); bin/objectstack-scenarios.js is the published entry. dist/cli.js keeps cli.ts's own self-run guard, which compares argv[1] with its module URL, so it never fires under the bin.
  • dist/bin.cjs and dist/cli.cjs are emitted because the package's build emits both formats for every entry; nothing reads them.
  • The framework record field reads unknown for a run from npm; the packages a run used are stated by feat(scenarios): run-scenarios --packages published|workspace; the gallery exporter refuses workspace records #31188's packages field.
  • Out of scope, untouched: customer-facing acceptance cards, an os subcommand (ruling D on Scenario library T2b: capability-tag checks in the ported scorer + os lint --eval reads scenario cards #30291 stands), any release action.

Verification

All on head 149e988b (after merging origin/main 065bba72, which carries #31188 as 86e9ef0a), worktree objectstack-issue-31172; git merge-tree against origin/main 733efbd4 is clean.

  • Full build of ./packages/** and ./examples/** under the verify lock (turbo run build --concurrency=2): Tasks: 82 successful, 82 total, VERDICT command-exit 0.
  • Package suite, after pnpm --filter '@objectstack/scenarios...' build: pnpm --filter @objectstack/scenarios typecheck && pnpm --filter @objectstack/scenarios test → Test Files 27 passed (27), Tests 527 passed (527), VERDICT command-exit 0 (tsc --noEmit, whose include covers test/**).
  • Lint scoped to the package: node --stack-size=4000 node_modules/eslint/bin/eslint.js packages/qa/scenarios --no-inline-config → exit 0.
  • Derived gates: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack → 77 commands, all 77 exit 0, including check-changeset-no-major, check:changeset-fixed, check:published-files, check:manifest-repository-directory, check:turbo-task-graph, check:llms-txt and check:dual-build-cjs-loads (after the full build). --ran: 77 derived famil(ies) accounted for — 77 run, 0 NOT-MEASURED. Run beyond the derivation, exit 0 each: check:published-readme-exports, check:published-readme-links, check:package-naming, check-published-list-mirrors.mjs.
  • Check Changeset locally, with this body as the event (GITHUB_EVENT_PATH): exit 1 on minor, exit 0 on patch ("a non-protocol change at patch").
  • Earlier rounds: on 2d69cfb4, check:llms-txt red on the count (fixed in c8b7eaf2); on 9742af04, CI Test Core timed out three spawn cases (fixed in 2eb91a69, see Tests).
  • Dogfood battery: n/a (no ! in the title, no (narrowing) arm).
  • Live model run: none (paused by the maintainer); the bin is exercised from the packed tarball up to the driver's login check.
The 77 derived gates, as run
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-adoption.mjs :: exit 0
node scripts/check-comment-mask-adoption.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-console-intercept-disarm.mjs :: exit 0
node scripts/check-console-intercept-disarm.mjs --self-test :: exit 0
node scripts/check-dev-prereqs.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-issue-citations.mjs :: exit 0
node scripts/check-osv-exemptions.mjs :: exit 0
node scripts/check-osv-exemptions.mjs --self-test :: exit 0
node scripts/check-plugin-teardown-shape.mjs :: exit 0
node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/docs-audit/check-affected-docs.mjs :: exit 0
node scripts/docs-audit/check-drift-comment.mjs :: exit 0
node scripts/osv-base-relative.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm --filter @objectstack/spec run check:empty-state :: exit 0
pnpm --filter @objectstack/spec run check:liveness :: exit 0
pnpm --filter @objectstack/spec run check:llms-txt :: exit 0
pnpm --filter @objectstack/spec run check:strictness-ledger :: exit 0
pnpm --filter @objectstack/spec run check:variant-docs :: exit 0
pnpm check:changeset-fixed :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:issue-citations :: exit 0
pnpm check:keyed-text-bounds :: exit 0
pnpm check:lean-entry-closure :: exit 0
pnpm check:logger-receiver-detach :: exit 0
pnpm check:manifest-repository-directory :: exit 0
pnpm check:merge-driver :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:objectql-double-limit :: exit 0
pnpm check:org-identifier :: exit 0
pnpm check:override-consistency :: exit 0
pnpm check:page-declaration-shape :: exit 0
pnpm check:platform-object-tenancy-census :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:registry-log-declared :: exit 0
pnpm check:rest-log-spy-declared :: exit 0
pnpm check:slot-lookup :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:system-context-census :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:turbo-task-graph :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:vendor-export-contract-resolve :: exit 0
pnpm check:vouch-for-reference-callers :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm check:workspace-manifest-cycles :: exit 0

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (Only llms.txt prose in spec.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes (scoped to the package; the repo-wide run is CI's).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (llms.txt is hand-kept; nothing generated reads it.)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English (the 维护者速读 block is the lane's Chinese summary).
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

…cenarios bin

Drop private, add the bin (a thin dispatcher over the runner CLI, run from
dist/), copy the open card library into dist/library at build time, and let
the runner read it when no checkout is around. Pack the package in a test:
only the open cards and capability areas ship, and the packed bin runs.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nGqwL3Ag8M8TdoRiC
@objectstack/scenarios is published now, so the workspace publishes one more
package than the package-ecosystem section said.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nGqwL3Ag8M8TdoRiC
@github-actions github-actions Bot added size/l dependencies Pull requests that update a dependency file 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 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/scenarios, @objectstack/spec, touching 17 documentable anchor(s). ⚠️ 6 changed file(s) yielded no anchor (packages/qa/scenarios/README.md, packages/qa/scenarios/bin/objectstack-scenarios.js, packages/qa/scenarios/package.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

19 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 065bba721e4ba180c6bdbbf2c5fb787d49bac596.

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

What this run could not see
  • 6 changed file(s) yielded no anchor (packages/qa/scenarios/README.md, packages/qa/scenarios/bin/objectstack-scenarios.js, packages/qa/scenarios/package.json, …) — pages documenting those are invisible to this run
  • 5 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 63 of 226 client-bound route-ledger rows — the other 163 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 163: 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; 104 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 — 171 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 065bba721e4ba180c6bdbbf2c5fb787d49bac596 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 4038ec7671497ba5f367ae96fd7ebe045e94fee5 — the merge of head 149e988b3ca2d98395b92638c7143bb3fd9af102 into base 065bba721e4ba180c6bdbbf2c5fb787d49bac596, 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 4038ec7671497ba5f367ae96fd7ebe045e94fee5 && git checkout 4038ec7671497ba5f367ae96fd7ebe045e94fee5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 065bba721e4ba180c6bdbbf2c5fb787d49bac596 149e988b3ca2d98395b92638c7143bb3fd9af102 && git checkout -B drift-repro 065bba721e4ba180c6bdbbf2c5fb787d49bac596 && git merge --no-ff 149e988b3ca2d98395b92638c7143bb3fd9af102

node scripts/docs-audit/affected-docs.mjs --json 065bba721e4ba180c6bdbbf2c5fb787d49bac596

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

Metadata-protocol is none, so the launch-window rule grades the entry
patch; minor is earned by a metadata-protocol change only.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nGqwL3Ag8M8TdoRiC
…built CLI lazily

The bin bundled the runner's whole graph, so help and version paid about a
second warm and several cold (CI timed three spawn cases out at 5 s). The bin
now imports the runner CLI only for run, pointed by the build at a separate
dist/cli.js entry; the run spawn cases get a measured 30 s budget.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nGqwL3Ag8M8TdoRiC
Workspace mode builds and packs a checkout's packages; a package installed
from npm has no checkout, so run refuses the mode before it makes anything.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nGqwL3Ag8M8TdoRiC
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:devx#3 · os-project-manager · session_01FEkQ5njkh3xbcDN6EtSfw7

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 149e988b3ca2d98395b92638c7143bb3fd9af102
Local-runs: none

Face: declaration. The committed tree holds no published spec schema and no governed path; the PR body and the changeset both carry Clause-②: yes and Metadata-protocol: none. Inputs read: card #31172 (body and all five comments, newest os-dev-report 6711888045), PR #31221 (body, 14-file list, three-dot diff against main at the merge base 065bba72), and the 71 check-runs on this head. Every completed check-run concluded success or skipped (the skips are label- or path-gated jobs: Pack Smoke opt-in without needs:pack-smoke, Build Docs, UI lanes, the 18.x harness); none is failure, neutral or cancelled. Test Core 8/8 shards plus the aggregate, Check Changeset (both the push run and the edited run), Lint and Repo Gates, Governed Surface Queue Guard, Validate Package Dependencies and PR-body guards are green. Those conclusions are the gate verdicts; nothing was built, run or re-run here. The committed tree was read with git show and git grep at the head only.

① Derived judgments

Each accept-set and public-surface change the diff implies, named right or wrong:

  1. Private to published (packages/qa/scenarios/package.json): private: true removed; publishConfig.access: public, files: [dist, README.md, CHANGELOG.md], engines.node 22 or later are byte-for-byte the fields of packages/verify/package.json, and engines matches the root manifest. Right. CHANGELOG.md does not yet exist in the package (same as every first release in this train: npm skips a missing files entry and changeset version writes it); informational only.
  2. exports keys unchanged: ., ./export, ./runner, ./score, ./score/full, the five the PR body table names. The two new build entries bin (src/bin.ts) and cli (src/runner/cli.ts) are not exports keys, so dist/bin.js and dist/cli.js resolve for no consumer; src/runner/index.ts re-exports eleven modules and neither cli.js nor library.js; src/export/index.ts does not re-export export/cli.ts. The PR body's public-surface claim is right.
  3. The objectstack-scenarios bin (bin.objectstack-scenarios to ./bin/objectstack-scenarios.js): the entry imports only ../dist/bin.js (built JavaScript, card ask 4). runCli dispatches run to the runner's own main with the remaining argv untouched (card ask 1: today's run-scenarios options, no second flag table), help/--help/-h and version/--version/-v exit 0, no or unknown command exits 2 with the usage on stderr. The file sits outside files[], which is fine: npm and pnpm pack always include the bin target, and packed-tarball.test.ts asserts bin/objectstack-scenarios.js is in the tarball. The tsup plugin binLoadsBuiltCli externalises exactly ./runner/cli.js imported from bin.ts to ./cli.js (or ./cli.cjs), so help/version never load the runner graph; shims: true is set, so the import.meta.url in both .cjs emissions is shimmed and check:dual-build-cjs-loads (which parses every dist/**/*.cjs) is green. The runner CLI's self-run guard compares argv[1] with its own module URL, so it never fires under the bin. Right.
  4. The packaged card library under dist/library (scripts/pack-library.mjs): copies exactly two directories of this repository, docs/qa/scenarios and docs/qa/platform-checklist/areas, one level deep, regular .json files only, after rmSync of the target, and exits 1 if either is empty. The private overlay (cloud#3603) has no path in this repository, so nothing can reach the copy by construction, and packed-tarball.test.ts refuses any JSON that is not package.json or byte-identical to an open card or area, and pins every shipped card origin: generic (card ask 2). src/runner/library.ts locateLibraryRoot recognises a checkout only when the package sits at packages/qa/scenarios of a pnpm workspace holding docs/qa/scenarios, compared by real path, else answers the packed copy or throws when it is absent; libraryOf (unchanged) therefore reads the shipped copy as open and any --cards directory as the overlay. cli.ts now uses it in place of findUp(pnpm-workspace.yaml), defaults --out to ./scenario-runs off a checkout, stamps no framework commit off a checkout, and refuses --packages workspace off a checkout before mkdirSync of the work or out directory. The exporter CLI (src/export/cli.ts) still uses findUp, but it is reachable from npm through no exports key and no bin, so nothing is owed. Right.
  5. What files[] ships: dist (the five subpath entries, bin.js, cli.js, their .cjs, .d.ts, sourcemaps without sourcesContent, and dist/library/**), README.md, and the bin target; the tarball test pins no .ts source, no src/, test/ or scripts/, no workspace: range left in the manifest. Right.
  6. .changeset/config.json: @objectstack/scenarios added to the fixed group after @objectstack/verify, so it versions with the @objectstack/* train and nothing is bumped by hand (check:changeset-fixed green). Right.
  7. packages/spec/llms.txt 74 to 75: packages/spec/scripts/check-llms-txt.ts re-derives the package-ecosystem count against the real non-private @objectstack/* workspace packages, so publishing this one moves it by exactly one; the gate is green on this head. Right, and correctly named in the PR body as gate-derived fallout outside the claimed surface.
  8. packages/qa/scenarios/turbo.json: adds both library directories to the build's inputs with $TURBO_EXTENDS$, so a card edit invalidates the cached build the release would otherwise replay; the root @objectstack/scenarios#test task already depends on the package's own build and lists the same globs, so dist/ exists before packed-tarball.test.ts runs (check:turbo-task-graph, check:cross-package-test-inputs, check:ci-filter-parity green). Right.
  9. Card ask 3 (runner rules kept): the API-billed refusal is untouched pre-existing driver code and is smoke-pinned from the packed bin; --packages published stays the default; the exporter's workspace refusal is feat(scenarios): run-scenarios --packages published|workspace; the gallery exporter refuses workspace records #31188's and lives in ./export. Right.

② Semver level

The changeset .changeset/31172-publish-scenarios-cli.md grades @objectstack/scenarios at patch and carries both declaration lines. Under AGENTS.md §3 the level follows the kind alone: Metadata-protocol: none takes patch, a feat: and a widening alike; check-changeset-no-major.mjs refuses none with minor on any package ("A minor is earned by a change to the metadata protocol and by nothing else"). The diff adds no authorable key, value or metadata type (a package becoming public, a bin, package data and a repository-vs-install path switch), so none is the right kind and patch the right level; Check Changeset is green on this head and was red on the earlier minor. The card's ask 5 said minor; the repo rule supersedes the card's wording and the dev's deviation names it. Clause-②: yes is right: the diff widens the public surface (a published package and a command) and removes nothing a consumer or author could reach, so no (narrowing) arm applies; yes with no arm is a permitted form. Nothing moves @objectstack/spec's schema, so no ADR-0087 disposition is owed.

③ Boundary flags

From the os-dev-report comments (6711207780 round 1, 6711888045 round 2, newest):

  • packages/spec/llms.txt outside the claimed surface — answered: gate-derived (①7), one count line, named in the PR body; accepted as same-class fallout.
  • Changeset minor to patch — answered (②): the gate's rule, not a dodge; Check Changeset green.
  • PR body not PATCHed by the dev — answered: the body on the PR is the round-2 body (cites 149e988b, patch, 10 tarball cases, the seat trailer as its last line, and the body-reading edited run of Check Changeset is green).
  • Triage ⚠️ asked for a tarball check in the publish job; release.yml not edited — answered, with a should-fix: the leak check is the Test Core allow-list, which runs on every PR and in the merge queue, so a leak is red before a release commit exists; the release pipeline is outside the claimed surface and the Publish Smoke workflow already smokes the release candidate's tarballs after Release. A release-time npm pack --dry-run guard for this package is a follow-up card if the maintainer wants it, not a condition of this PR.
  • Test budget: three run spawn cases at an explicit 30 s each; no file test-budget header; CI file reading NOT MEASURED — answered: scripts/measure-test-shard-timings.mjs requires a header only when the measurement window reads the file above the 10 s line; it reads 5.1 s locally and Test Core is green on this head. If a later window lists it, the header is the refresh lane's, as the report says.
  • Round-1 out-of-scope finding, node dist/bin.js run tripping the runner's self-run guard — answered: gone in round 2, dist/bin.js has no top-level effect and the guard lives in dist/cli.js, whose argv[1] under the bin is bin/objectstack-scenarios.js.
  • open_questions: [] in both rounds; security_findings: none; the premise (private: true, no bin on main) still holds on the merge base.

Nothing escalates. Should-fix only (non-blocking, follow-up carriers): the release-time tarball guard above.

Implemented-by: claude/project-thread-78z461
Reviewed-by: session_01FEkQ5njkh3xbcDN6EtSfw7

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:devx#3 · os-project-manager · session_01FEkQ5njkh3xbcDN6EtSfw7

席位核对

Verdict: ACCEPT · head 149e988b3ca2d98395b92638c7143bb3fd9af102 · card #31172 · report 6711888045 · contract review 6712007221 (PASS).

  • Shape: draft → main, Fixes #31172; 14 files, +619/-25. check-governed-merges --pr 31221: 0 of 14 paths governed, ordinary queue landing.
  • Card's ask, read in the diff: @objectstack/scenarios drops private: true and gains the publish fields (byte-identical to packages/verify/package.json) and a bin. exports keys are unchanged (5 subpaths); dist/bin.js and dist/cli.js are not reachable through them. pack-library.mjs copies exactly the two repo directories one level deep, and the --packages workspace refusal comes before any mkdirSync.
  • CI timeout fix: the packed-tarball tests timed out on CI because the bin bundled the whole runner graph. The bin now imports the runner lazily, and the test budgets are measured (below the 10 s header trigger).
  • Gates: check-runs on this head: 58 success, 11 skipped (label/path-gated), 0 failed, 0 pending, including all eight Test Core shards and Check Changeset on both the push and edited runs.
  • Changeset: patch. With Metadata-protocol: none the launch window grades even a newly published package as patch, and the gate refused minor. Clause-②: yes (additive, nothing removed); the contract review above is PASS on this head.
  • Accepted fallout: the llms.txt package count 74 → 75 and the fixed group entry are both gate-derived.
  • Not sent back (follow-up if wanted): triage asked for a tarball leak check in the publish job. release.yml is outside the claimed surface; the allow-list runs in Test Core on every PR and in the merge queue, and Publish Smoke covers the release candidate. A release-time npm pack --dry-run guard would be its own card.
  • Landing: under 「按照 pm-dispatch 规则复核过的都授权」 (2026-10-25T11:35Z) and 「你应该使用 pm-dispatch 技能审核和落地pr」 (2026-11-07T16:59Z): pr_ready + automerge_enable now.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 7, 2026 19:31
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 7, 2026 19:31
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit fba4c00 Nov 7, 2026
70 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-78z461 branch November 7, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/l 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.

Publish @objectstack/scenarios as a standalone CLI (npx), with the public cards and never the private overlay; not an os subcommand (ruling D stands)

1 participant