Repository navigation
test(qa-scenarios): add the travel_expense mid-tier scenario card - #30600
Merged
objectstack-fleet[bot] merged 3 commits intoNov 5, 2026
Merged
Conversation
A 差旅报销 (travel expense) card for the open scenario library: seven objects (department, employee, travel_standard, trip_request, expense_claim, claim_line, approval_step), a two-step approval, three personas (two row-scoped), a spend report, 120 claims over July-October 2026, ten questions, six operations and four agent actions. Its own test file pins every computed truth against hand-worked values and shows a wrong seed cell or truth spec in a fixture copy goes red. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2ebbZkr2QAEG1x7UC8
Contributor
📓 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): |
…ory, so a new card never edits it The "exactly these cards" check listed card ids by hand, so every mid-tier card PR had to edit the same line and the sibling PRs would conflict in turn. It now asserts one loaded card per .json file in docs/qa/scenarios, with the three control cards among them. README "Adding a card" step 3 now points a new card's truths at its own test/<id>.test.ts. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2ebbZkr2QAEG1x7UC8
…directory The previous commit listed docs/qa/scenarios with readdirSync, which the cross-package test-inputs gate reads as a directory input no declared glob covers (README.md sits beside the cards). The listing was redundant: the loader yields a card or a refusal for every *.json there, and the test before it asserts no refusal. The check now asserts the three control cards are loaded and leaves each mid-tier card to its own test file. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2ebbZkr2QAEG1x7UC8
Contributor
Author
|
domain:devx#2 · marchtian · session_017ihL2ebbZkr2QAEG1x7UC8 席位核对 — ACCEPT ·
|
objectstack-fleet
Bot
deleted the
claude/issue-30476-travel-expense-card
branch
November 5, 2026 18:31
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 田騏 · project thread
Fixes #30476
Clause-②: no
Metadata-protocol: none
维护者速读
library.test.ts一行。docs/qa/scenarios/travel_expense.json的run.questions与run.operations;②packages/qa/scenarios/test/travel-expense.test.ts的EXPECTED_TRUTHS;③packages/qa/scenarios/test/library.test.ts第 102 行(控制卡清单加了本卡)。pnpm --filter @objectstack/scenarios test,预期 4 个测试文件、64 个用例全绿。What changes
docs/qa/scenarios/travel_expense.json(new): the 差旅报销 travel-expense mid-tier card.department,employee,travel_standard(a cap per grade and expense type),trip_request,expense_claim,claim_lineandapproval_step(the two-step approval: department manager, then Finance).employee(own rows) anddept_manager(own department) carry a row scope;finance_officersees every claim but no trip request.$comment, so every truth can be worked by hand.iterateadds travel advances.packages/qa/scenarios/test/travel-expense.test.ts(new): this card's own test file.over_standardexactly when it is above the grade cap.packages/qa/scenarios/test/library.test.ts: one line. The library-wide test asserts the exact set of loaded card ids, sotravel_expenseis added to that list. Its truths are pinned in the card's own file, not here.Tests
pnpm --filter @objectstack/scenarios test: 4 files, 64 tests passed.pnpm --filter @objectstack/scenarios typecheck: exit 0, after building the closure withpnpm --filter '@objectstack/scenarios^...' build.Acceptance notes
File name. The card is
travel_expense.json, nottravel-expense.jsonas the issue spells it. A card'sidmust be a snake_case machine name, and the loader requires it to equal the file's basename, so a hyphenated basename cannot load. The schema was not changed.No schema field for some floor items. Three floor items have no field in the schema:
The card states them in
prompt.detailed(zh and en) and incapabilities, seedsapproval_stepas an expected object, and declares the report underexpect.dashboards. Nothing in the loader grades them.Seven operation kinds, six operations. The issue names seven operation kinds and caps the card at six operations. So
file_and_submit_from_textcovers two of them: entry from free text with lines, and the multi-step chain (file, add two lines, submit, route to the manager).Routed approval step not asserted. The post-state of
file_and_submit_from_textdoes not assert the routed step-1 row. Awherecannot name the new claim's id, andstep 1 · approver e01 · pendingalso matches a seeded row.README step 3.
docs/qa/scenarios/README.md"Adding a card" step 3 says to add a card's truths totest/library.test.ts, but this card's truths live in its own file. The README is unchanged here.Sibling cards. Every sibling mid-tier card has to edit the same
library.test.tsline, so their PRs will conflict on it in turn.Unreachable references.
objectstack-ai/templatesandobjectstack-ai/cloudanswer 403 from this session. The domain is designed from the card text alone, and the rulings are applied as the card states them.Verification
scenarios test + typecheck (head 130acb8)
dispatch-gates --commands (50 commands, local)
All 50 derived commands exit 0. The
--ranreconciliation reads: 50 derived, 50 run, 0 NOT-MEASURED, 0 UNRUN, a derived zero because every line recorded its exit code.Three of them first exited 3 (PREREQUISITE NOT MET: a dist was not built). Each exited 0 after the build it names:
check:doc-formula-expressions, after building@objectstack/formulaand@objectstack/lint;check:lean-entry-closure, after building@objectstack/objectql;check:dual-build-cjs-loads, after a fullturbo run build.Changed lines: 1337 (+1336 / -1, 3 files), under the 3000 threshold.
🤖 Generated with Claude Code