Skip to content

feat(scenarios): order_to_cash's verified build is a committed fixture beside its card - #37911

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-e18mr2
Nov 27, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-e18mr2

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

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)。评测方面,新开的容器现在不用搭建就能跑两张卡的问数轮。
  • 风险与回滚:只有 fixture、文档、一个测试和两张输入登记表(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 for order_to_cash, byte for byte the dist/objectstack.json the scratch run below wrote after its Build half and before its iterate turn. sha256 5d1696c818d542480819ddb67b970337e01ee94c224c99479f8cc9319797fcea, 152,377 bytes, manifest.engines.protocol ^19.
  • docs/qa/scenarios/builds/order_to_cash.provenance.json (new): card sha256 fb53e5cf…, runner b620c4b2, packages workspace @ b620c4b2, driver claude-code-cli 2.1.332 on the subscription login, opus at high with the served model id claude-opus-5-5 beside the alias (L2 note N5), and how the snapshot was identified.
  • docs/qa/scenarios/builds/travel_expense.provenance.json: cardSha256 re-pinned from 212abedb… to a6ae8aa6…, with an amended entry (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.claim marked "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 at b620c4b2 reads 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 each builds/<id>.json it pins:
    • a provenance file beside it that names this build and this card;
    • the provenance sha256 equal to the file's own;
    • cardSha256 equal to the card file in the tree;
    • each amended entry's shape;
    • a protocol range the load-time handshake admits for this tree's PROTOCOL_VERSION (checkProtocolCompat);
    • and that the directory holds a build for every dataset card (the loader's cards with run.datasetQuestions).
      The failure messages say what to do: an amended entry 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#test inputs) and scripts/cross-package-test-inputs.mjs (the scenarios row and its heldBy) declare docs/qa/scenarios/builds/*.json. Without this a build edit would not re-run the suite, and check:cross-package-test-inputs refuses 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:
    • the --template path is absolute ("$(git rev-parse --show-toplevel)/docs/qa/scenarios/builds/<id>.json"), with why: pnpm --filter runs the runner in packages/qa/scenarios/, where the repo-relative path names nothing (readFileSync(args.template), src/runner/cli.ts:628) (N4);
    • the card-edit re-pin rule;
    • the new test.
  • .claude/skills/scenario-eval/SKILL.md (net 0 lines):

L2 notes (6986428648):

Tests

  • The build (one live run, no retry needed). Command: 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 ….
    • Run at b620c4b2c6; the working tree also held this PR's docs and test edits, none of them in a packed file. Exit 0.
    • Build 174/174, author success, 178/300 turns, 33m 51s, served claude-opus-5-5 at effort high.
    • Seed 619/619. Run-问数 11/12, Run-operations 6/6 (1 platform half not measured), datasets 4/5. Iterate · Build 186/186 (23 turns).
    • Notional author cost $16.70 over 2 turns (subscription login, not billed).
  • Which snapshot is the verified build. A poller copied dist/objectstack.json every time its content changed (4 copies).
    • Re-scored with scoreCardArtifact + rollupSourceCharges on the namespaced card: the last two pre-iterate copies both read 174/174.
    • changeSize from 5d1696c8 to the post-iterate copy equals the record's iterate change size exactly (12 items). From the earlier 93434753 it does not. So 5d1696c8 is the build the runner verified.
  • Done-when: an ask round on the committed file, no build step. Command: 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.
  • 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.ts 11/11 after; typecheck clean.

Acceptance notes

  • No changeset, labelled skip-changeset, a deviation from the claim's file surface. The package publishes dist, README.md and CHANGELOG.md, and the diff touches none of them:
    • builds/ is not packed (scripts/pack-library.mjs copies docs/qa/scenarios/*.json one level deep);
    • test/ is not in files[];
    • the README edited is docs/qa/scenarios/README.md, not the package's.
  • Beyond the claimed surface: turbo.json, scripts/cross-package-test-inputs.mjs and scripts/check-ci-filter-parity.mjs (self-test count only). The N6 test reads builds/, and the cross-package gate refuses an undeclared input. None of the three files is a governed surface.
  • The fixture is pretty-printed as objectstack build writes it (5,340 lines), kept byte-exact because the provenance and every round's record name its sha256.

Verification

  • Gate list derived on c53622d4: node scripts/pm/dispatch-gates.mjs --commands gives 77 commands; all 77 exited 0, each exit code captured before any pipe. --ran reconciliation: 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 at c53622d4; typecheck clean.
  • Changed lines about 5,500 against the 3,000 human-merge threshold: OVER, as dispatch-gates reports.
Local gates (77, each exit 0)
node scripts/check-adr-links.mjs :: exit 0
node scripts/check-adr-links.mjs --self-test :: 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-declaration-mirrors.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-issue-citations.mjs :: exit 0
node scripts/check-plugin-teardown-shape.mjs :: exit 0
node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 0
node scripts/check-self-test-wired.mjs :: exit 0
node scripts/check-self-test-wired.mjs --self-test :: exit 0
node scripts/check-self-test-workflow-commands.mjs :: exit 0
node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0
node scripts/check-whole-set-label-write.mjs :: exit 0
node scripts/check-whole-set-label-write.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/docs-audit/check-affected-docs.mjs :: exit 0
node scripts/docs-audit/check-drift-comment.mjs :: exit 0
node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0
node scripts/pm/check-harness-current.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:bash32-floor :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:cli-command-ids :: 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:entry-guard :: 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:nul-bytes :: exit 0
pnpm check:objectql-double-limit :: exit 0
pnpm check:org-identifier :: exit 0
pnpm check:page-declaration-shape :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:platform-object-tenancy-census :: exit 0
pnpm check:pm-dispatch-gates :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-record-recognisers :: exit 0
pnpm check:pm-settings-deny-roster :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:ratchet-remedy-authority :: 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:scripts-symbol-anchors :: exit 0
pnpm check:skill-frame-sync :: 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:vouch-for-reference-callers :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgWYbeKh6ewAziS6nrf

…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
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 27, 2026
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests labels Nov 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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): node scripts/docs-audit/affected-docs.mjs --json 0a3ea67c2c02adbced1c43eda0f252eac3568123 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c53622d4fee261fdc86640ab3ddaf13899a641a0
Local-runs: none
Scope: .claude/skills/scenario-eval/SKILL.md + packages/qa/scenarios/test/verified-builds.test.ts, docs/qa/scenarios/README.md, docs/qa/scenarios/builds/order_to_cash.provenance.json, docs/qa/scenarios/builds/travel_expense.provenance.json
Rule-change-verified: none

Read: card #34920 (body and all 11 comments), the PR body and file list, the net diff against main, and the 74 check-runs on this head. Nothing was built, run or re-run. The sha256 figures below are hashes of the head's own blobs (git show), which is a read of the tree. The 5,341-line build was read for shape only (top-level keys, manifest, a scan for paths and credentials: none).

The remainder of the diff (docs/qa/scenarios/builds/order_to_cash.json, turbo.json, scripts/cross-package-test-inputs.mjs, scripts/check-ci-filter-parity.mjs) is the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

  • Accept-set of docs/qa/scenarios/builds/: right. The new test admits a build only with a provenance beside it that names the build and the card, a sha256 equal to the file's, a cardSha256 equal to the card in the tree, well-formed amended entries, and a protocol range the handshake reads as ok. On this head all hold:
    • order_to_cash.json hashes to 5d1696c8…fcea, 152,377 bytes, as its provenance says; its card hashes to fb53e5cf…7e02, also at the runner sha b620c4b2, which is on main and is this PR's merge base.
    • travel_expense.json hashes to cc035a91…709d (unchanged); its card hashes to a6ae8aa6…5ac9, the re-pinned value.
    • Both manifests declare engines.protocol ^19; PROTOCOL_VERSION is 19.0.0.
  • Dataset cards: right. Exactly two cards carry datasetQuestions (order_to_cash, travel_expense), and builds/ holds exactly those two.
  • Public surface: none changes. pack-library.mjs copies docs/qa/scenarios/*.json one level deep, the loader reads the directory non-recursively, and files[] is dist, README.md, CHANGELOG.md. builds/ and test/ are not shipped.
  • Gate verdicts. Test Core (10 shards and the roll-up), the Type Check family, the Lint families (the filter-parity self-test whose count moved 23 to 24 runs among them), Check Changeset, PR-body guards and Governed Surface Queue Guard all concluded success. No check-run failed.

② Semver level

Clause-②: no — agreed. No changeset with skip-changeset matches what the diff publishes, which is nothing: no file under the package's files[] changes, and builds/ is outside what the packed library copies. The claim listed a changeset; dropping it is the correct reading of the tree, and Check Changeset passed on the label.

③ Boundary flags

  • Deviation 1, no changeset: accepted, see ②.
  • Deviation 2, three files outside the claim (turbo.json, scripts/cross-package-test-inputs.mjs, scripts/check-ci-filter-parity.mjs): accepted as a consequence of the claimed pin test. A test that reads builds/*.json needs the glob declared or a build edit does not re-run the suite. None of the three is a governed surface. They are the lane seat's ACCEPT.
  • open_questions: none raised.
  • SQL push-down: not applicable. The diff holds no query, no id materialisation and no in-app join.
  • Rule change. The two changed hunks in the skill are a status note replaced by a check step, and a narrowing of wording. Neither alters what an agent may do without the maintainer, what a round does or in what order, or what must go to him. The set of cards an ask round runs is still §1's rule (the cards carrying datasetQuestions), unchanged. Verified none. The PR body carries no Rule-change: line yet; it needs Rule-change: none for the queue guard to have something to compare. That is a body edit and does not move the head.
  • Over the human-merge line. 5,508 changed lines: Tier H whatever this record says.
  • Not measured at this head, for the seat:
    • The card's Done-when names both dataset cards. The PR ran the ask round on order_to_cash only; travel_expense rests on docs(scenarios): commit the dataset cards' verified builds as ask-round fixtures #35222 and two later amendments. The new test pins its protocol range, not that it still installs.
    • The amended entry records travel_expense at Build 140/141 on the current scorer (master-detail-inline-edit). Ask rounds do not score Build, so no ask reading moves, but the fixture no longer passes Build at the current runner and nothing tracks that yet. It needs a card.
    • Both fixtures pin ^19. The skill's ask-round example passes --create-version VERSION; a round that names an 18.x release there is refused at install. The PR's own ask round ran --packages workspace.

④ Design judgment

.claude/skills/scenario-eval/SKILL.md (two lines)

packages/qa/scenarios/test/verified-builds.test.ts against the README section and the skill

  • "pins both sha256s": yes, both are recomputed from the files, not read from a second copy.
  • "a build for every dataset card": yes, and the dataset cards come from the loader (run.datasetQuestions), the same set §1's grep reads.
  • "a protocol range that admits the tree's own": yes, through checkProtocolCompat, the handshake the install uses. A build with no range reads no-range and fails, which is stricter than the sentence and safe.
  • The failure messages state the README's remedies correctly (an amended entry for a hand edit; re-score and re-pin for a card edit; a new build when the reading changes).

docs/qa/scenarios/README.md

  • The absolute-path sentence holds: readFileSync(args.template) at src/runner/cli.ts:628 resolves against the package directory pnpm --filter runs in.
  • The card-edit re-pin rule matches what the travel_expense provenance does in this diff and what the test's message prescribes.

The two provenance files

  • order_to_cash.provenance.json: every field the README lists is present, plus the served model id beside the alias. Its figures match the tree where the tree can answer (both sha256s, the runner sha).
  • travel_expense.provenance.json: the claim that the masterDetail mark does not reach the scorer holds in the code. records-forms.master-detail-inline-edit in src/score/scenario-tags.ts reads the build's own master_detail fields and field groups, never the card's mark; the mark is read by prompts.ts and loader.ts only. fix(scenarios): name a card's master-detail as one in the build prompt, not as a lookup #37781 changed one line of the card. So the re-pin without a new build is right.

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 runner, built or score in a provenance is not checked by anything, and cannot be without a live run.

No must-fix, no should-fix.

  • N1 (nit) — the test's dataset-card case asserts builds EQUALS the dataset cards, so it also refuses a build for a card with no dataset. Its title, the README sentence and the PR body state one direction only, and §5 of the skill now reads as if any verified build --template installs lives in builds/. A template-mode build for a control card (§1, "not routine") would fail a case whose name does not say why. No effect on any current fixture or round.
  • N2 (nit) — the README says an amended entry names the sha256 it replaced (from) or the card sha256 it replaced (cardFrom). The test's amended case checks on, card, what and why only, and its Provenance type omits both keys, so an entry naming neither passes. All three entries in the tree carry one.

Implemented-by: claude/project-thread-e18mr2
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head c53622d · card #34920 · area s2-eval · 2026-11-27T11:18Z

L1 checklist

  • Shape and checks. All 74 check-runs on the head concluded success or skipped. Draft, mergeable clean.
  • Contract review at CONTRACT_REVIEW_TIER. 7216905999 at this head: PASS, No must-fix, no should-fix., Rule-change-verified: none; nits N1 (the dataset-card test also refuses a build for a card with no dataset, stated one way only) and N2 (the test does not check that an amended entry names from or cardFrom) accepted as deviations: no current fixture is affected. The seat adopts it.
  • Fixtures. Both builds and both cards hash to their provenance; travel_expense is re-pinned without a new build because the fix(scenarios): name a card's master-detail as one in the build prompt, not as a lookup #37781 card line does not reach the Build score (140/141 with and without it).
  • Done-when. order_to_cash: an ask-only round on the committed file installs, seeds 619/619 and answers 11/12, operations 6/6. travel_expense: the same bytes were installed by the eval area's ask probe today (9/13, operations 6/6, datasets 5/5).
  • Deviations accepted. skip-changeset: builds/ and test/ are outside the package's files[], nothing published changes. turbo.json, scripts/cross-package-test-inputs.mjs and scripts/check-ci-filter-parity.mjs register the new test's inputs; none is governed.
  • Out of scope, filed. travel_expense's build now fails master-detail-inline-edit under today's scorer: scenarios: travel_expense's committed verified build now fails master-detail-inline-edit ("0 edited inline") under today's scorer #37917.
  • Declarations. Clause-②: no, Metadata-protocol: none, Rule-change: none. Fixes #34920 is right.
  • Governance. .claude/** plus 5,508 changed lines (a 5,341-line build fixture): over the human-merge line, Tier H.

Tier: H. Landing: hand-off to the maintainer follows this record.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Tier H hand-off · 2026-11-27T11:20Z · head c53622d · approver os-zhuang

维护者速读

  • 改了什么: 场景卡评测「订单到回款」(order_to_cash)的已验证构建作为固定文件入库,放在卡旁边,评测的问数日轮从此可以直接装它,不用每轮重搭。
    • 构建由 opus/high 一次搭成:Build 174/174,Seed 619/619,用入库文件跑问数轮 11/12。
    • 旅行报销(travel_expense)的 provenance 刷新了卡的指纹(卡的改动不影响 Build 计分)。
    • 新增一个测试,钉住每张带问数题的卡都有入库构建、指纹与文件一致。scenario-eval 技能里两行过时说明改正。
  • 影响: 只影响内部评测,不发布任何包。
  • 请你留意: 这个 PR 有 5,508 行,几乎全是 5,341 行的构建 JSON,超过 3,000 行的人工合并线,所以要你来合;另外动了 .claude/**(只改两行说明,不改规则)。复审时发现旅行报销那份构建在今天的计分器下有一项不过,已另立卡 scenarios: travel_expense's committed verified build now fails master-detail-inline-edit ("0 edited inline") under today's scorer #37917,不影响问数日轮。
  • 审核: 契约审核(最高档)PASS(7216905999),没有必须改或建议改的项。席位 L1 ACCEPT 在本评论前一条。
  • 要你做什么: 需要你批准后才能合并。撤回这一次合并即恢复原样。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 27, 2026 11:23
@os-zhuang
os-zhuang enabled auto-merge November 27, 2026 11:23
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit 006840d Nov 27, 2026
84 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-e18mr2 branch November 27, 2026 11:53
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scenarios: the verified builds the ask rounds run on are committed fixtures beside their cards

3 participants