Repository navigation
feat(scenarios): order_to_cash's verified build is a committed fixture beside its card - #37911
Conversation
…e, pinned to its provenance and card docs/qa/scenarios/builds/order_to_cash.json is the dist/objectstack.json a passing scratch run built before its iterate turn (opus/high, served claude-opus-5-5, workspace @ b620c4b): Build 174/174, Seed 619/619. Its provenance records the served model id beside the alias (L2 note N5). travel_expense's provenance re-pins cardSha256 to the card as #37781 left it (an amended entry, cardFrom): the masterDetail mark reaches the prompt and the loader, not the scorer, so the build reads the same against both card texts. test/verified-builds.test.ts pins each build to its provenance sha256, its card's sha256, a build per dataset card and a protocol range the tree admits (N6); turbo.json and the cross-package input table declare builds/*.json. README: the --template path is absolute (N4) and the re-pin rule is stated; scenario-eval SKILL.md: the fixture sentence names --template (N2), the ask command no longer says order_to_cash waits. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgWYbeKh6ewAziS6nrf
📓 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): |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Read: card #34920 (body and all 11 comments), the PR body and file list, the net diff against The remainder of the diff ( ① Derived judgments
② Semver levelClause-②: no — agreed. No changeset with ③ Boundary flags
④ Design judgment
The two provenance files
Tried to break it: a build edited without its provenance, a card edited without a re-pin, a build with no provenance, a build whose card is gone, a dataset card with no build, and a stale protocol range are each refused by one of the test's cases. A wrong No must-fix, no should-fix.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head c53622d · card #34920 · area s2-eval · 2026-11-27T11:18ZL1 checklist
Tier: H. Landing: hand-off to the maintainer follows this record. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Tier H hand-off · 2026-11-27T11:20Z · head c53622d · approver 维护者速读
|
…ll-ups, so a payment capped at its invoice's open balance loads (objectstack-ai#37950) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuWUUzJ4EEzDD7fb56jyq1TP)_ Fixes objectstack-ai#35654 Clause-②: no Metadata-protocol: none ## 维护者速读 - 是什么:评测跑器往应用里灌示例数据时,不再写入「自动汇总」类字段的值(比如发票的已付金额,它本该由付款记录加出来),改由平台按付款自己算。 - 为什么:订单回款这张评测卡把每张发票的已付金额终态直接写进去。一个做得很对的应用(已付金额 = 付款合计,并且付款不得超过未付余额)在灌数据时就会把已付清发票的 66 笔付款当成超付拒掉,评测因此冤枉正确的应用。 - 评测卡本身和上一个 PR 入库的验证构建都没改;只有把这类字段做成自动汇总的应用才受影响,做成普通数字字段的照旧收到卡上的值。发票号、订单号这类自动编号照样写入,因为问题里会引用它们。 - 出错会怎样:只影响评测跑器灌数据这一步,最坏是某张卡的汇总字段起始值不对,可直接撤回。 - 要你做的:无。 ## What changes `packages/qa/scenarios/src/runner/seed.ts` gains `rollupFields(artifact)`: the fields a built artifact declares `type: 'summary'`, per object, read through the scorer's artifact reader (the same shape as `derivedFields`). `packages/qa/scenarios/src/runner/orchestrate.ts`: - `seedRowBody` takes the object's roll-ups and leaves their card values out of the row, returning them as `leftOut` (`object.field`). - `seedApp` takes `rollups` (per object) after `required`, and records the left-out columns in the run record's `seed.leftOut` (new optional field on `RunHalf['seed']`, absent when nothing was left out, so a card with no roll-up keeps its record's bytes). - Both seed calls in the run half (first seed and the fresh-copy reseed) pass `rollupFields(built)`; `restoreSeededRows` re-inserts a seeded row with the same body. `packages/qa/scenarios/src/export/screenshots.ts`: the gallery screenshot boot passes the artifact's roll-ups too, so it seeds the same rows the run does. Why only roll-ups, not every computed type (`derivedFields`: formula, summary, autonumber): - A roll-up is the case the card's end state breaks. The seed path is a system write, which stores a roll-up value it is sent as written (measured on objectstack-ai#34986, report 7022810829), so a child rule that reads the parent's open balance sees the end state before the child that makes it. - A left-out `count` / `sum` roll-up starts at 0 on insert (`packages/objectql/src/engine-insert.ts`, objectstack-ai#5749 / objectstack-ai#34672) and each admitted child adds to it, also inside one batch (`summary-batch-accumulation.ts`), so the parent ends at the card's value. - An autonumber must stay: order_to_cash's committed build declares `name` an autonumber (`INV-{YYYY}-{0000}`), and the card's questions cite `INV-1058`. A first cut that left out every `derivedFields` column also dropped `name` on invoices, payments and orders; the test caught it. - A stored field with an `expression` (the committed build's `balance`, `status`, `amount`) is recomputed by the engine from the row anyway, so it needs nothing here. The card is unchanged: every one of its 95 invoices states `amount_paid` equal to the sum of its payments (asserted in the new test), and every sales order's `total_amount` equals the sum of its lines. So its `cardSha256` and the committed build from objectstack-ai#37911 are untouched, and a build that stores `amount_paid` as a plain number is still sent the card's value. ## Tests `packages/qa/scenarios/test/runner/orchestrate.test.ts` gains a `[objectstack-ai#35654]` block against the real card and the committed build (`docs/qa/scenarios/builds/order_to_cash.json`), with a double that runs the build shape the card names: `amount_paid` a roll-up of payments, a payment capped at the invoice's open balance, a roll-up value sent stored as written. - the committed build's invoice roll-up is `amount_paid` (and `derivedFields` also lists the autonumber `name`, which stays sent); the card states each invoice's `amount_paid` as the sum of its payments; - with the build's roll-ups, all 72 payments load, `seed.leftOut` is `demoorder_invoice.amount_paid` and `demoorder_sales_order.total_amount`, every invoice ends at the card's `amount_paid`, and `INV-1058` keeps its name; - control: sent the end state, the cap refuses 66 payments, all on `demoorder_payment`, with the rule's message; - `restoreSeededRows` re-inserts a removed invoice without its roll-up value. Ablation: with the `src/` change stashed, the three new behaviour tests fail and the control passes. <details><summary>runs</summary> - `npx vitest run test/runner/orchestrate.test.ts` (in `packages/qa/scenarios`): 180 passed. - Whole package: 1384 passed, 14 skipped, 1 failed: `test/runner/packages.test.ts` "every install ran the workspace's pinned pnpm" — fails identically on `main` f926dfa in this container (the stash run), so not this change. `test/build/*` passed after `pnpm --filter @objectstack/scenarios build`. - `npx tsc --noEmit -p .` in `packages/qa/scenarios`: clean. - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`: 64 derived, 62 exit 0, 2 exit 3 NOT MEASURED (`check-plugin-teardown-shape.mjs --self-test` did not reach its verdict here; `check:dual-build-cjs-loads` needs every package built). Left to CI. </details> ## Verification Two-minute check: `cd packages/qa/scenarios && npx vitest run test/runner/orchestrate.test.ts -t 35654` prints 4 passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgTDPAaiTGidYohtQcg <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgTDPAaiTGidYohtQcg --> Co-authored-by: Claude <noreply@anthropic.com>
Requested by Sales · project thread
repo:objectstack#2 · os-sales · session_01L6bhgWYbeKh6ewAziS6nrf
Fixes #34920
Clause-②: no
Metadata-protocol: none
Rule-change: none
维护者速读
order_to_cash(订单到收款)卡的已验证构建作为 fixture 提交进仓库:docs/qa/scenarios/builds/order_to_cash.json,与一次通过的 scratch 搭建在迭代前写出的dist/objectstack.json逐字节一致,旁边是出处文件。新增一个测试,钉住每份构建与它的出处文件、卡文件、协议版本的对应关系。travel_expense的出处文件里卡的 sha256 过期了,这次一并刷新。travel_expense一张卡有入库构建。11-25 那次通过的构建从没交出来,而且卡和 runner 后来都改了,所以按 Sales 08:40Z 在决策卡上的选择(「本专区自己搭」),在本线程重跑了一次 opus/high 搭建:Build 174/174,Seed 619/619,一次通过。builds/不随@objectstack/scenarios发出(打包脚本只读docs/qa/scenarios/一层的*.json)。评测方面,新开的容器现在不用搭建就能跑两张卡的问数轮。turbo.json、跨包测试输入表),回滚就是还原这个 PR。⚠ 改动 5,500 行左右,其中 fixture 自己 5,340 行,超过 3,000 行线,要你批准或合并。fixture 刻意保持原样不压缩,因为出处里的 sha256 证明的就是这份文件。sha256sum docs/qa/scenarios/builds/order_to_cash.json,应为5d1696c818d5…,与出处文件一致;pnpm --filter @objectstack/scenarios exec vitest run test/verified-builds.test.ts,11 项全过。.claude/**(Tier S)的 L2 审核通过后,由于超过 3,000 行,需要你批准或合并;交接由席位负责。What changes
docs/qa/scenarios/builds/order_to_cash.json(new): the verified build ask rounds install fororder_to_cash, byte for byte thedist/objectstack.jsonthe scratch run below wrote after its Build half and before its iterate turn. sha2565d1696c818d542480819ddb67b970337e01ee94c224c99479f8cc9319797fcea, 152,377 bytes,manifest.engines.protocol^19.docs/qa/scenarios/builds/order_to_cash.provenance.json(new): card sha256fb53e5cf…, runnerb620c4b2, packages workspace @b620c4b2, driverclaude-code-cli 2.1.332on the subscription login,opusathighwith the served model idclaude-opus-5-5beside the alias (L2 note N5), and how the snapshot was identified.docs/qa/scenarios/builds/travel_expense.provenance.json:cardSha256re-pinned from212abedb…toa6ae8aa6…, with anamendedentry (cardFrom). The card edit between them is fix(scenarios): name a card's master-detail as one in the build prompt, not as a lookup #37781's single line,claim_line.claimmarked"masterDetail": true. That mark reaches the build prompt and the loader, not the scorer, so the build is unchanged and keeps its sha256. Measured: the build re-scored atb620c4b2reads Build 140/141 against the card both with and without the mark, no roll-up charge. The one failing check,master-detail-inline-edit("0 edited inline"), fails either way. It comes from a scorer change since the 11-18 build (135/135 then), not from this card edit, and ask rounds do not score Build. It is reported to the seat, not fixed here.packages/qa/scenarios/test/verified-builds.test.ts(new, L2 note N6). For eachbuilds/<id>.jsonit pins:sha256equal to the file's own;cardSha256equal to the card file in the tree;amendedentry's shape;PROTOCOL_VERSION(checkProtocolCompat);run.datasetQuestions).The failure messages say what to do: an
amendedentry for a hand edit, a re-score and re-pin for a card edit, a new build when the reading changes.turbo.json(@objectstack/scenarios#testinputs) andscripts/cross-package-test-inputs.mjs(the scenarios row and itsheldBy) declaredocs/qa/scenarios/builds/*.json. Without this a build edit would not re-run the suite, andcheck:cross-package-test-inputsrefuses it.scripts/check-ci-filter-parity.mjs's self-test counts the newly declared glob (23 → 24), in the same shape as Scenario library T1a: scenario-card schema + loader (private packages/qa package) and 9 open seed cards under docs/qa/scenarios/ #30289's and Scenario scorer: narrow the bare-name Build check and the build prompt's naming rule to bucket-1 types and positions (ADR-0150 hand-off, with or before #31669) #31729's entries.docs/qa/scenarios/README.md§ Verified builds:--templatepath is absolute ("$(git rev-parse --show-toplevel)/docs/qa/scenarios/builds/<id>.json"), with why:pnpm --filterruns the runner inpackages/qa/scenarios/, where the repo-relative path names nothing (readFileSync(args.template),src/runner/cli.ts:628) (N4);.claude/skills/scenario-eval/SKILL.md(net 0 lines):--template) instead of every round (N2);ls builds/instead of recalling (N1).L2 notes (6986428648):
Tests
run-scenarios --only order_to_cash --modes scratch --packages workspace --author-model opus --author-effort high --ask-model haiku --ask-effort medium --no-iterate-run --work … --out … --record ….b620c4b2c6; the working tree also held this PR's docs and test edits, none of them in a packed file. Exit 0.success, 178/300 turns, 33m 51s, servedclaude-opus-5-5at effort high.dist/objectstack.jsonevery time its content changed (4 copies).scoreCardArtifact+rollupSourceChargeson the namespaced card: the last two pre-iterate copies both read 174/174.changeSizefrom5d1696c8to the post-iterate copy equals the record's iterate change size exactly (12 items). From the earlier93434753it does not. So5d1696c8is the build the runner verified.run-scenarios --only order_to_cash --modes ask --template "$(git rev-parse --show-toplevel)/docs/qa/scenarios/builds/order_to_cash.json" --packages workspace --ask-model haiku --ask-effort medium. Exit 0.template.install{ok: true, status: 200},installMode: unmanaged. Build readssupplied,no authoring turns.claude-haiku-5-5at medium.travel_expense's side of the Done-when was met by docs(scenarios): commit the dataset cards' verified builds as ask-round fixtures #35222.pnpm --filter @objectstack/scenarios test: 45 files, 1395 tests passed (before the test's dataset-card read moved to the loader);test/verified-builds.test.ts11/11 after;typecheckclean.Acceptance notes
skip-changeset, a deviation from the claim's file surface. The package publishesdist,README.mdandCHANGELOG.md, and the diff touches none of them:builds/is not packed (scripts/pack-library.mjscopiesdocs/qa/scenarios/*.jsonone level deep);test/is not infiles[];docs/qa/scenarios/README.md, not the package's.turbo.json,scripts/cross-package-test-inputs.mjsandscripts/check-ci-filter-parity.mjs(self-test count only). The N6 test readsbuilds/, and the cross-package gate refuses an undeclared input. None of the three files is a governed surface.objectstack buildwrites it (5,340 lines), kept byte-exact because the provenance and every round's record name its sha256.Verification
c53622d4:node scripts/pm/dispatch-gates.mjs --commandsgives 77 commands; all 77 exited 0, each exit code captured before any pipe.--ranreconciliation:77 derived, 77 run, 0 NOT-MEASURED, 0 UNRUN, the zero DERIVED from the recorded codes.pnpm --filter @objectstack/scenarios test: 45 files, 1395 tests passed atc53622d4;typecheckclean.Local gates (77, each exit 0)
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgWYbeKh6ewAziS6nrf