Repository navigation
test(qa-scenarios): add the asset_lifecycle mid-tier scenario card - #30695
Conversation
The open library's 资产全生命周期 (asset lifecycle) scenario: eight objects (department, employee, asset_category, asset, checkout, repair_order, disposal_request, depreciation_entry), 120 assets bought June-September 2026, a scrap approval routed to the asset's department manager, monthly straight-line depreciation, three personas (two row-scoped), ten questions, six operations and six agent actions. The seed follows the arithmetic rule in the card's $comment. Its own test file pins every computed truth, over all rows and per persona, against hand-worked values, checks the seed's internal consistency, and shows a wrong seed cell and a wrong truth spec in fixture copies go red. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czx7zatyA1s7R4yPhB
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
domain:devx#3 · os-elon-musk · session_016WV4cz3RTQjLh7hZBLzgtZ 席位核对 · ACCEPT ·
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 42160413666 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:devx#3 · os-elon-musk · session_016WV4czx7zatyA1s7R4yPhB Queue ejection triage · not this PR's
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 42161973653 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Elon · project thread
Fixes #30481
Clause-②: no
Metadata-protocol: none
维护者速读
docs/qa/scenarios/asset_lifecycle.json的run.questions与run.operations;②packages/qa/scenarios/test/asset-lifecycle.test.ts的EXPECTED_TRUTHS及旁边的手算注释;③ 同一文件里「seed internally consistent」用例(折旧、账面价值、资产状态与单据对得上)。pnpm --filter @objectstack/scenarios test,预期 5 个测试文件、70 个用例全绿。What changes
docs/qa/scenarios/asset_lifecycle.json(new): the 资产全生命周期 asset-lifecycle mid-tier card.department,employee,asset_category(useful life, straight-line method),asset(the main object, with roll-upaccumulated_depreciationand formulabook_value),checkout(checkout and return, with the return condition),repair_order,disposal_request(the scrap approval, routed to the manager of the asset's department) anddepreciation_entry(one per asset per month, posted by a scheduled flow).employee(the assets they hold, their own checkouts, repairs and scrap requests; no cost, book value, depreciation, budget or home address) anddept_manager(their department; no home address) carry a row scope;asset_adminsees every asset but no asset budget.$comment, so every truth can be worked by hand.iterateadds transfers between departments.packages/qa/scenarios/test/asset-lifecycle.test.ts(new): this card's own test file.Why
The card is one of the six mid-tier scenarios ruled on objectstack-ai/cloud#3600 (Q1 = v3, 「同意这9个场景」). It gives the asset domain a scenario whose answers, permission boundaries and write outcomes are graded by code only.
Tests
pnpm --filter @objectstack/scenarios test: 5 files, 70 tests passed (64 before this PR).pnpm --filter @objectstack/scenarios typecheck: exit 0, after building the closure withpnpm --filter '@objectstack/scenarios^...' build;tsc --listFileslists the new test file. Both read at head0ffa47e2a6.Acceptance notes
asset_lifecycle.json, notasset-lifecycle.jsonas the issue spells it: a card'sidmust be a snake_case machine name equal to the file's basename. test(qa-scenarios): add the travel_expense mid-tier scenario card #30600 made the same call.test/library.test.tsnames only the three control cards and the README's "Adding a card" step already sends a mid-tier card's pins to its own file. So this PR adds two files and edits none, and it cannot conflict with the sibling cards.receive_and_issue_from_textcovers two of them: entry from free text with lines (three monitors on one delivery) and the multi-step chain (register them, then check one out). The workflow step ismanager_approves_scrap; its progress query is the questiondr_0005_waiting_on, asked about a different request so its truth stays a fact of the seed.wherecannot name a created row's id, so the new checkout is matched byemployeepluschecked_out_on; the test proves no seeded checkout has that pair, and that the three delivered serials are new.asOf.overdue_loaners_by_departmentfiltersdue_on lt "2026-10-31", the card'sasOf; the window operators only name ranges that end onasOf.prompt.detailed(zh and en) andcapabilities, seedsdisposal_requestas an expected object, and declares the report underexpect.dashboards. Nothing in the loader grades them.approvals.dynamic-approver-routingis a checklist id; the rest follow the descriptive namestravel_expense.jsonuses.packages/qa/scenariosis"private": trueand the diff touches no published package, so this PR carries no changeset and asks forskip-changeset, as test(qa-scenarios): add the travel_expense mid-tier scenario card #30600 did.Verification
scenarios test + typecheck (head 0ffa47e)
Run after merging
mainand a whole-treepnpm build(118 of 118 turbo tasks).dispatch-gates --commands (50 commands, local, head 0ffa47e)
All 50 derived commands exit 0 on head
0ffa47e2a6. The--ranreconciliation reads: 50 derived, 50 run, 0 NOT-MEASURED, 0 UNRUN, a derived zero because every line recorded its exit code.The first run, on the pre-merge head
11193506f5, had 47 exit 0 and 3 exit 3 (PREREQUISITE NOT MET, nothing measured). Each cleared once its prerequisite was in place:check-plugin-teardown-shape.mjs --self-test, aftergit fetch --unshallow origin main(its fixture is a pinned commit a shallow clone lacks);check:lean-entry-closureandcheck:dual-build-cjs-loads, after the whole-tree build.Changed lines: 1294 (+1294 / -0, 2 files), under the 3000 threshold (
dispatch-gates.mjsreading).Human Minimum
packages/specholds no runtime logic. (No schema touched.)pnpm lintpasses. (No formatter ran, and eslint on the new test file exits 0; the repo-widepnpm lintis left to CI'sLint & Repo Gates.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.pnpm lint, left to CI as in item 3.)Generated by Claude Code