Skip to content

docs(scenarios): commit the dataset cards' verified builds as ask-round fixtures - #35222

Merged
os-zhuang merged 2 commits into
mainfrom
claude/project-thread-5wdenh
Nov 18, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/project-thread-5wdenh

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

repo:objectstack#5 · os-bill · session_01Utp6CZs6tgpbjk88Q7EEPs

Refs #34920 (item: travel_expense fixture)

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:把 travel_expense 的已验证构建作为 fixture 提交进仓库:docs/qa/scenarios/builds/travel_expense.json(与 objectstack build 输出逐字节一致)和旁边的出处文件(sha256、卡的 sha256、runner sha、包版本、搭建模型与 effort)。卡库 README 新增〈Verified builds〉一节;scenario-eval 技能把问数日轮的 --template 指向入库路径,并写明“构建是 fixture、运行产物不进树”。
  • 为什么改:维护者裁决「两件都同意:构建提交进仓库,[Decision] Should the framework's dataset tools return the next step and the citation line themselves, so the MCP door gets what the product's agent gets #34894 选 A」。问数日轮量的是 MCP 门,不是搭建;每天得用同一份构建,云容器又是临时的,每轮重建既花钱又给读数加噪声。
  • 风险与回滚:不动任何包、不发布;loader 与打包脚本都只读 docs/qa/scenarios/ 一层的 *.json,builds/ 既不是卡也不随包发出。回滚即删 builds/ 与两处文档行。⚠ 改动行数 3,229(fixture 本身 3,181 行),超过 3,000 行线:按 AGENTS.md §7(c) 需维护者或授权批准落地。fixture 刻意保持逐字节原样不压缩,因为记录里的 sha256 证明的正是这份构建。
  • 先看:docs/qa/scenarios/README.md〈Verified builds〉;.claude/skills/scenario-eval/SKILL.md §1、§4、§5 三处;docs/qa/scenarios/builds/travel_expense.provenance.json。
  • 两分钟验证:sha256sum docs/qa/scenarios/builds/travel_expense.json,预期 5fe6f452d36f…,与出处文件一致。
  • 需要你做的:L2 契约审核通过后(.claude/** 为 Tier S),因超 3,000 行由你批准或合并;席位负责交接。

What changes

  • docs/qa/scenarios/builds/travel_expense.json: the verified build the ask round installs, byte for byte the dist/objectstack.json a passing scratch run wrote after its Build half and before its iterate turn.
  • docs/qa/scenarios/builds/travel_expense.provenance.json: sha256 5fe6f452d36fe56a0ecf0f8c782394076953baeb99ef2499763991e119a29989, card sha256, runner ec227fc7, packages published 18.6.0, driver claude-code-cli 2.1.327 on the subscription login, authoring model opus at effort high.
  • docs/qa/scenarios/README.md: the layout lists builds/; a new section, Verified builds, states what the fixture is, how a round uses it (--modes ask --template docs/qa/scenarios/builds/ID.json, no build step), that a round never writes it and that it changes only by PR.
  • .claude/skills/scenario-eval/SKILL.md (net +1 line): §1 and the §4 ask-round command name the committed path; §5 states the distinction: records, recordings and logs stay out of the tree, the verified build a round runs on is a fixture and is in it.
  • No runner change: --template F already exists and records the file's sha256 (packages/qa/scenarios/README.md, template and ask modes).

Tests

  • Scratch run (the build): run-scenarios --only travel_expense --modes scratch --author-model opus --author-effort high --ask-model haiku --ask-effort medium --create-version 18.6.0 --no-iterate-run, runner ec227fc7, exit 0. Build 135/135, Seed 757/757, Run-问数 7/13, Run-operations 4/6, Run · datasets 4/5, Iterate · Build 149/149.
  • Which snapshot is the verified build: every distinct dist/objectstack.json the run wrote was snapshotted. Re-scoring 5fe6f452 against the card (scoreCardArtifact on the namespaced, rebased card) gives a score identical to the run record's Build half, no roll-up charge, buildPassed true; and changeSize from it to the final (post-iterate) artifact equals the record's iterate change size (14 items). The previous snapshot 29bf182b (the authoring agent's own last build) gives 15 and a different score object, so it is not the one the runner verified.
  • Ask round on the committed file, no build step (the Done-when, for this card): run-scenarios --only travel_expense --modes ask --template "$(git rev-parse --show-toplevel)/docs/qa/scenarios/builds/travel_expense.json" --ask-model haiku --ask-effort medium --ask-repeats 1 --create-version 18.6.0 at 236af336, exit 0. The record's template is {"file":"travel_expense.json","sha256":"5fe6f452…a29989"}; Build and Build · author read supplied, Author cost no authoring turns. Install unmanaged, 200 (no managed fallback needed). Seed 757/757, Run-问数 10/13, Run-operations 4/6, Run · datasets 3/5, guardrail injection_as_data pass, 25 ask turns all served claude-haiku-5-5 at effort medium, nominal ask cost $0.19 (subscription login, not billed).

Acceptance notes

  • The fixture is pretty-printed as the build writes it (3,181 lines). It is kept byte-exact on purpose; minifying would get under the 3,000-line line but change the sha256 the records name.
  • The provenance names the requested model alias (opus) and effort; the served model of the authoring turn is in the run record, which stays out of the tree.
  • order_to_cash did not verify, so it is not in this PR. Same runner, packages and author config: Build 169/170, the one miss the roll-up charge security-rollup-source-unreadable (demoorder_invoice.amount_paid sums demoorder_payment.amount, which demoorder_sales_rep cannot read); Seed 553/619, the build's own validation rule refusing 66 demoorder_payment rows ("A payment may not exceed the invoice's open balance"), the shape of order_to_cash build 1: its own authored validation rule refuses 66 of its demoorder_payment seed rows (payment may not exceed the invoice's open balance); build 2 refuses 0 #34986. Its fixture waits on that card.
  • Card dates: the runner rebases a card's dates to the run day; the build carries no card dates, so the same fixture serves every day's round.

Verification

  • Gate list derived on 236af336: node scripts/pm/dispatch-gates.mjs --commands gives 21 commands; all 21 exited 0, each exit code captured before any pipe. --ran reconciliation: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED (a DERIVED zero).
  • Not run locally: pnpm --filter @objectstack/scenarios test. No file under packages/ changed, and the loader (readdirSync of the card directory, *.json) and scripts/pack-library.mjs (one level deep, regular .json files) never read builds/; CI's Test Core runs it.
  • Changed lines 3,229 (+3,224 / −5) against the 3,000 human-merge threshold: OVER, as dispatch-gates reports.
Local gates (21, each exit 0)
node scripts/check-adr-links.mjs [+ --self-test]
node scripts/check-closing-keyword-parity.mjs [+ --self-test]
node scripts/check-comment-mask-corpus.mjs
node scripts/ci/plan-test-core-shards.mjs --self-test
node scripts/pm/check-harness-current.mjs --self-test
pnpm --filter @objectstack/lint run check:doc-formula-expressions
pnpm check:adr-anchors · check:agent-test-spelling · check:ci-filter-parity · check:cross-package-test-inputs
pnpm check:doc-authoring · check:driver-memory-census · check:gitlink-declared · check:nul-bytes
pnpm check:pm-governed-merges · check:pm-settings-deny-roster · check:refd-timer-probe · check:skill-frame-sync
pnpm check:watch-hint-literal

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CZs6tgpbjk88Q7EEPs


Generated by Claude Code

…und's fixture

The daily ask round installs a dataset card's verified build with
`--modes ask --template`; it now reads it from the tree:
docs/qa/scenarios/builds/<id>.json, byte for byte the dist/objectstack.json
a passing scratch run built before its iterate turn, with a provenance
sidecar (sha256, card sha256, runner sha, packages, authoring model/effort).
The scenarios README documents the directory; scenario-eval names the
committed path and the fixture/run-product distinction.

order_to_cash follows when its scratch build verifies.

Claude-Session: https://claude.ai/code/session_01Utp6CZs6tgpbjk88Q7EEPs
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 18, 2026
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation labels Nov 18, 2026
…vel_expense fixture

order_to_cash's verified build is not committed yet (it waits on #34986),
so the example names the fixture that exists.

Claude-Session: https://claude.ai/code/session_01Utp6CZs6tgpbjk88Q7EEPs
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 0a40d3a15c065fdefb31103dd8893c71d7b1b583
Local-runs: none
Scope: .claude/skills/scenario-eval/SKILL.md + docs/qa/scenarios/README.md, docs/qa/scenarios/builds/travel_expense.json, docs/qa/scenarios/builds/travel_expense.provenance.json
Security-touching: no

PR #35222 (draft, Refs #34920 (item: travel_expense fixture)), rules face: the one governed path is the scenario-eval skill. Read for this record: card #34920 with every comment (claim 6984134425, dev report 6985513722), the ruling it carries (comment 6953792719 on #34687, the maintainer verbatim: 「两件都同意:构建提交进仓库,#34894 选 A」, recorded as "the verified builds the ask rounds run on are committed into the repository as fixtures beside their cards. Records, recordings and logs stay out of the tree as before"), the PR's file list and its net diff against main at this head, the head's check-runs, and the cited code on main (merge-base ec227fc; the diff touches no file under packages/, scripts/ or turbo.json). The second half of the ruling (#34894, option A) is a different decision and has no text in this diff.

① Derived judgments

  • Governed rule text (the hits file): right. Three hunks. §1 says where the ask round's F lives (docs/qa/scenarios/builds/ID.json, pointing at the README's Verified builds section) and adds 「只经 PR」 to the existing "a changed build is named in Reading" rule. §4 turns the ask-round example into a runnable command on the committed travel_expense fixture, absolute path through git rev-parse --show-toplevel. §5 adds the one sentence the card asked for: 「轮所装的已验证构建不是运行产物而是 fixture,在树里(docs/qa/scenarios/builds/),只随 PR 改,⛔ 轮不写它」. Each is the ruling's consequence; none changes what a round measures, how it is configured, how it is recorded or where findings go.
  • Loader accept-set: unchanged, right. loadScenarios reads the card directory non-recursively and keeps names ending .json (packages/qa/scenarios/src/loader.ts:168-171). The entry builds is a directory name without that suffix, so neither the fixture nor its provenance is ever offered to the card schema. The runner's default card directory goes through the same function (packages/qa/scenarios/src/runner/cli.ts:394), as do the library tests.
  • Published surface: unchanged, right. pack-library.mjs copies two directories one level deep, regular .json files only (packages/qa/scenarios/scripts/pack-library.mjs:11-12, :28, :37-38): builds is skipped on both conditions (no .json suffix, not a regular file), and README.md was never copied. The package's files are dist, README.md and CHANGELOG.md (packages/qa/scenarios/package.json:105-109). The packed-tarball test uses the same one-level filter and goes red on any other JSON in the tarball (packages/qa/scenarios/test/build/packed-tarball.test.ts:55, :122-125). The build's turbo inputs are docs/qa/scenarios/*.json, one level (turbo.json:721, packages/qa/scenarios/turbo.json:8), so a fixture change does not rebuild the package.
  • So the README sentence "The loader and the packed library read this directory one level deep, so builds/ is neither a card nor shipped" is true in code, at the lines above.
  • Runner contract the skill and the README lean on: right, no runner change needed. --template F is read with readFileSync and never written (cli.ts:469-470). The record's top-level template is the file's basename and sha256 (packages/qa/scenarios/src/runner/summary.ts:70-72, cli.ts:365-371 and :472). Ask mode installs the supplied build with no authoring turn, no score and no iterate (packages/qa/scenarios/README.md:313 and :315-322). A template whose namespace is not the card's is skipped (packages/qa/scenarios/src/runner/orchestrate.ts:2021-2024), which is why the skill keeps one command per card.
  • Fixture integrity, read off the head's blobs (git show piped to sha256sum and to a JSON parse; nothing built, run or re-run): builds/travel_expense.json hashes to 5fe6f452d36fe56a0ecf0f8c782394076953baeb99ef2499763991e119a29989, equal to the provenance file's sha256. It is 93,382 bytes, 3,182 lines with no newline at the end of the file, so it was not reformatted on the way in, and it parses as JSON. Its manifest namespace demotravel is demo plus the card's code travel, and its three datasets (claim_lines, reimbursement, trip_plan) carry the measures the card's expect.datasets declares. The provenance file parses as JSON; its cardSha256 9d0c7dad107579b8e77d0c7924ec8c44ebf0bb446d3f3f0a526c32828eca262a equals the sha256 of docs/qa/scenarios/travel_expense.json at this head and on main; its runner ec227fc is the merge-base. builds/ holds exactly these two files.
  • Not measured by this review: that these bytes are the scratch run's verified pre-iterate build (the run record is outside the tree; the dev report gives the re-score evidence), and the fresh-container ask run on the committed file (dev report). No check-run exercises either.
  • Check-runs on this head: every run completed, each success or skipped. Test Core, every Lint leg, every Type Check leg, Governed Surface Queue Guard, PR-body guards and Check PR Size read success; Check Changeset is skipped under the skip-changeset label.
  • The security line reads no. No changed hunk of the skill or the README teaches permission, sharing, credential, token or authentication behaviour. The fixture is an app build the runner installs as data: it carries the demo app's three permission sets, their row-level rules and one ask-surface skill as build content, which is what the round measures and not instruction to any fleet agent. The provenance login: oauth_token is the login kind, not a secret. A targeted scan of the fixture (not a line-by-line read) found no key, token, password, URL, e-mail address or absolute path, and no network, process, eval or require call in its hook and action sources. The line is inert on this PR: .claude/** is the claude-tree row, Tier S with no low-risk arm (scripts/pm/check-governed-merges.mjs:1376), and the paths-filled template prints no such line. If the seat reads "teaches" as covering security configuration carried inside a fixture, this line is the one value to change; nothing lands on it either way (see ③).

② Semver level

  • Nothing published changes: no file under packages/, no schema, no shipped JSON (① shows builds/ and the README never reach the tarball). The skip-changeset label is right, and the body's Clause-②: no and Metadata-protocol: none are right.

③ Boundary flags

  • Dev report 6985513722, open_questions: empty. security_findings: none; agreed, see ①.
  • Deviation 1 (worked on the card-thread branch, no extra worktree): process only, no effect on the diff.
  • Deviation 2 (provenance names the requested alias opus and effort high, not the served model id): accepted deviation, N5 below.
  • Deviation 3 (signed trailer in the PR body): prose, nothing to judge.
  • Deviation 4 (no reviewer request sent): right to leave with the seat. Landing: the PR is 3,232 changed lines (3,226 added, 6 removed), over the 3,000-line threshold of the AGENTS.md merge rule (c), so it lands the Tier H way, on an authorized APPROVED review and then the owning seat, or by the maintainer's merge or enqueue, whatever this record says. It is a draft with no auto-merge armed, as it must be.
  • Partial landing: the body's Refs #34920 (item: travel_expense fixture) is a non-closing keyword, and the claim (6984134425) named this route beforehand. The card stays open for order_to_cash; its Done-when (both dataset cards, no build step) is met for one of the two at this head.
  • Out-of-scope findings in the report: the order_to_cash seed refusals go to order_to_cash build 1: its own authored validation rule refuses 66 of its demoorder_payment seed rows (payment may not exceed the invoice's open balance); build 2 refuses 0 #34986 (open). The roll-up charge goes to "the epic filer"; I found no open card that carries it. For the seat to confirm a carrier; the skill's §4 note names order_to_cash build 1: its own authored validation rule refuses 66 of its demoorder_payment seed rows (payment may not exceed the invoice's open balance); build 2 refuses 0 #34986 alone (N3).
  • Author: the PR's user.login is objectstack-fleet[bot]; no outside author to name.
  • SQL push-down: the diff holds no code; nothing to check.

④ Design judgment

.claude/skills/scenario-eval/SKILL.md (hits), judged against the ruling, the card's Scope bullets, the rest of the skill, lanes/eval.md and the runner on main. The skill is internal (metadata.internal: true), so no eval prompt applies; the scenario it is accepted against is the card's Done-when.

  • Faithful to the ruling, no widening of substance. "Committed … as fixtures beside their cards" is docs/qa/scenarios/builds/, inside the file surface the card allowed. "Records, recordings and logs stay out of the tree as before" is the unchanged §5 sentence, now followed by the distinction. The card's "changes only by a PR … a daily round never writes it" is 「只随 PR 改,⛔ 轮不写它」 and §1's 「换了构建(只经 PR)」. The card's "--template reads it from the tree; the record names its sha256" is §1 and §4 plus the §5 Environment rule that already existed (build file name and sha256 from the record's template).
  • No contradiction inside the skill. §0's 「卡、runner、评分器都在本仓」 now holds for the build as well. §0's runner pin covers the fixture, which sits in the same checkout and so moves only between rounds; when it moves, the record's sha256 shows it and §1 has Reading name it. The Guardrails line 「⛔ 不开 PR … 立卡交车道」 composes with the new sentence: the seat neither writes nor PRs the fixture, so a refresh is a card to the lane.
  • No contradiction with lanes/eval.md. ⑤ (ask mode on the dataset cards, local app, subscription login, no cloud repository) and the boundary (no os-dev, no product code, no PR) stand as they were; the charter needs no line for this.
  • Tried to break it. Can a round write F? No: the runner only reads it, --out is elsewhere and the install goes into a blank host of its own. Does the §4 example work from the package directory? Yes: the shell expands the substitution in the caller's working directory before pnpm changes directory, and the path is absolute, which the runner README asks for (packages/qa/scenarios/README.md:248, :599). Does the §1 grep for dataset cards or control cards pick up a fixture? No: both globs are one level. What happens for order_to_cash, whose fixture does not exist? A command on the missing path stops at cli.ts:469 before any card runs, and the §4 note says only travel_expense is runnable until the file is committed.

docs/qa/scenarios/README.md, the Layout lines and the Verified builds section (implementing). Sentence by sentence: the purpose sentence matches lanes/eval.md ⑤; the provenance sentence matches the committed file field for field; "builds nothing; its record names the file's sha256" and "A round never writes it" match the runner lines in ①; "it changes only by a PR, when the card or the runner changes" is the card's own wording; the loader and packed-library sentence is true in code. Two imprecisions are N1 and N4.

docs/qa/scenarios/builds/travel_expense.json and travel_expense.provenance.json (implementing). They agree with what the skill and the README say about them, as far as the tree can show: see the integrity line in ①. The provenance records every item the card's Scope lists (sha256, runner sha, the model that built it) plus the card's sha256, the package source and the driver.

No must-fix, no should-fix.

Nits, none of which changes what a round does. All sit off the prose faces, so they are accepted deviations or follow-up cards, not fixes on this head:

  • N1 (nit) — §1 gives F as docs/qa/scenarios/builds/ID.json for both cards it lists, and the README says "each dataset card's verified build is a fixture here" right after naming order_to_cash and travel_expense. At this head builds/order_to_cash.json does not exist, and the only disclosure is the bash comment in §4. No wrong action follows (the runner stops on the missing path, and the skill's general not measured rule covers the record). It closes by itself when the order_to_cash fixture lands under scenarios: the verified builds the ask rounds run on are committed fixtures beside their cards #34920; a clause in §1 would be the better place until then.
  • N2 (nit) — §5 says 「轮所装的已验证构建」, broader than the ruling's "the verified builds the ask rounds run on". Read literally it also covers a --modes scratch,ask round, which installs that run's own scratch build (a run product), and an ad-hoc template-mode F. The seat can neither commit nor open a PR, so nothing follows from the wider reading; 「问数日轮所装的」 would match the ruling and the README.
  • N3 (nit) — the §4 note 「order_to_cash 的构建等 order_to_cash build 1: its own authored validation rule refuses 66 of its demoorder_payment seed rows (payment may not exceed the invoice's open balance); build 2 refuses 0 #34986」 names one of the two blockers the PR's own evidence reports (the seed refusals; the other is the roll-up charge, Build 169/170). The operative condition is 「入库前」, the file's presence, so the pointer cannot mislead a round; scenarios: the verified builds the ask rounds run on are committed fixtures beside their cards #34920 is the card that actually carries the fixture.
  • N4 (nit) — the README writes the flag as --template docs/qa/scenarios/builds/ID.json, a repository-relative path. Under pnpm --filter the runner resolves it against packages/qa/scenarios (cli.ts:469). The skill's example, which is what the seat runs, passes the absolute path.
  • N5 (nit) — the provenance author.model is the requested alias. The card asks for "the model that built it", and the skill's own §2 standard is the served model, checked on the scorecard. The served id exists only in a run record in the card thread's container. Cheap now and impossible later: post the served id on the card thread while that record exists, and fold it into the provenance with the order_to_cash PR.
  • N6 (nit) — nothing pins the fixture. No test compares builds/ID.json with its provenance sha256, or cardSha256 with the card, so a card edit leaves a stale fixture green and the README's "when the card or the runner changes" has no detector. The place for it is packages/qa/scenarios, outside this card's fenced surface (held by scenarios: a build-over-the-draft-door mode, and with it a measured answer to how much hosted rule text is still needed #34780). Follow-up card for devx: a library test pinning the three (bytes to provenance, cardSha256 to the card, namespace to the card), and a runner switch that writes out the verified pre-iterate build so the next fixture is not snapshotted by hand.
  • N7 (nit) — the PR title is plural ("the dataset cards' verified builds") for one fixture and becomes the squash subject; the body's figures (3,229 lines, skill net +1) predate the second commit (3,232, net +2). Prose only.

Outside the diff, for whoever next edits these files: the §1 start-condition bullet is always met now (#34911 and #34882 both merged on 2026-11-17), and its rationale sentence describes the earlier project-files build of travel_expense, not the committed fixture; docs/qa/scenarios/README.md line 14 still calls the package "private, not published" while the new section speaks of its packed library. Neither is this PR's.

Implemented-by: claude/project-thread-5wdenh
Reviewed-by: session_01Utp6CbUb7TcZK1XUAddUmQ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

维护者速读

席位核对 — ACCEPT · repo:objectstack#5 · head 0a40d3a15c065fdefb31103dd8893c71d7b1b583 · 2026-11-18T17:33Z

@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 18, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 18, 2026 17:43
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 18, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

落地 — repo:objectstack#5 · head 0a40d3a15c065fdefb31103dd8893c71d7b1b583 · 2026-11-18T17:44Z

probe reading
approval os-zhuang APPROVED on 0a40d3a1 (review 5962019228), the head the seat record 6986394231 and the contract review 6986374098 pin
K 0 first-parent commits on main since PRBASE ec227fc7 (< 15)

Seat lands on the authorized approval: pm:awaiting-merge off, pr_ready + automerge_enable in this stroke. On MERGED #34920 stays open for the order_to_cash fixture (#34986).

@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 18, 2026
Merged via the queue into main with commit 3e4d531 Nov 18, 2026
53 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-5wdenh branch November 18, 2026 17:58
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…d; run --template warns on a stale cardSha256 (objectstack-ai#37339)

Fixes objectstack-ai#36491
Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户无感:只影响内部场景评测工具,差旅报销的已验证构建记录改成指向现在这张卡,评测跑在不匹配的记录上时会先提示一句。
- 属于场景卡评测的固定样本维护,替每日问数评测解决"记录指向旧卡"的问题。
- 出错时只是多一行或少一行提示,评测照常打分;改动可直接撤回。
- 无

## What changes

- `docs/qa/scenarios/builds/travel_expense.provenance.json`:
`cardSha256` `29162eef…` ->
`212abedb6b59a5ac0c6921c25bdcc4dc057cbc25e866a9cd2ed962920368a00d`, the
sha256 of the raw bytes of `docs/qa/scenarios/travel_expense.json` on
`dbc1765a24`. That is the hash the loader computes (`loader.ts`
`fileSha256`, `createHash('sha256').update(bytes)`) and every run record
stamps (`CardStamp`); there is no canonical form. The issue body names
`a8a67be3…`; the card moved again since (objectstack-ai#36503 to `68eb89a9…`, objectstack-ai#36617
to `212abedb…`).
- `packages/qa/scenarios/src/runner/cli.ts`:
`templateProvenanceWarning(path, card)` reads `F.provenance.json` beside
the `--template F` file; when it names the same card with another
`cardSha256` (or none, or is not JSON), `run` prints a `warning:
template provenance:` line before the card runs. It never refuses; a
missing provenance or one for another card says nothing. It lives in the
CLI entry, not the `./runner` export, so the published import surface is
unchanged.
- `packages/qa/scenarios/README.md`: one sentence under "Template and
ask modes".
- Changeset: `@objectstack/scenarios` patch.

## Acceptance notes

- **Provenance honesty.** The build was authored from card `9d0c7dad…`
(the card when objectstack-ai#35222 committed it). Practice since objectstack-ai#35764 and objectstack-ai#36065
has been to refresh `cardSha256` on a card edit with the build
untouched, so the field reads as "the card this fixture is current
against", while objectstack-ai#36617's body reads it as "the card at build time". This
PR follows the practice. Measured to back it: between `9d0c7dad…` and
`212abedb…` only the card's `prompt` and `run` keys differ; `expect` and
`iterate` are byte-identical (top-level `JSON.stringify` compare). A
scratch `scoreGraph(artifactToEvalGraph(build), expect)` re-score gives
61/61 on both the `29162eef…` card and the current one. So the
`verified` scores still hold for the current card, but `built`/`author`
describe a run made against an older prompt (the step-two routing prose
from objectstack-ai#35098 and the record-triggered flow prose from objectstack-ai#36617 are not in
it). The provenance still does not record that, and this PR does not add
a field for it.
- **Other provenances.** `builds/` holds one provenance, so there are no
others to refresh.
- **Not in this PR: a fixture pin.** I wrote a test that reads
`docs/qa/scenarios/builds/` and holds each `cardSha256` equal to its
card. That turns the next stale card edit into a red CI run, not only a
run-time warning. `check:cross-package-test-inputs` refused it because
the radius is undeclared, and declaring it means editing
`scripts/cross-package-test-inputs.mjs` and the root `turbo.json`, both
outside this card's file surface. I left it out.
- **Open PR objectstack-ai#37314** changes
`docs/qa/scenarios/builds/travel_expense.json` (`protocol ^18 -> ^19`)
without touching the provenance. Once it lands, the provenance's
`sha256` (`4ab7e603…`) no longer matches the build file, and no
`amended` entry records the change. That PR does not overlap these
files.

## Verification

First read (by risk):
1. `packages/qa/scenarios/src/runner/cli.ts`,
`templateProvenanceWarning`: when it stays silent and when it warns.
2. `docs/qa/scenarios/builds/travel_expense.provenance.json`: the
one-line hash change.

Two-minute check: `sha256sum docs/qa/scenarios/travel_expense.json`
prints `212abedb6b59a5ac…`, the same value the provenance now holds.

<details><summary>Tests and gates (head 0d4f42e)</summary>

- `os-verify-lock.sh -c "pnpm --filter @objectstack/scenarios build && …
typecheck && … test"` on `af13a9a6a5` (the test/src tree of the final
head): VERDICT command-exit 0; Test Files 43 passed (43), Tests 1342
passed (1342).
- Ablation (committed first, restored with `git checkout HEAD --`, `git
diff HEAD` empty, blob hash matched): `scripts/ablation-replace.mjs`
replaced `if (provenance.cardSha256 === card.sha256) return undefined;`
with `return undefined;` (anchor 1 -> 0).
`test/runner/template-provenance.test.ts` then went 2 failed / 4 passed,
the two warning cases red.
- `node scripts/pm/dispatch-gates.mjs --commands` on `af13a9a6a5`: 65
commands, all run; `--ran` reconciliation: 65 derived, 65 run, 0 UNRUN.
Non-zero: `check:dual-build-cjs-loads` exit 3 PREREQUISITE NOT MET
(needs a whole-workspace build, so NOT MEASURED locally; CI runs it).
`check:dts-closure` exit 1 in the batch because `plugin-audit` dist was
half-built in this shared tree; after `pnpm --filter
@objectstack/plugin-audit build` it exits 0. On `0d4f42ec49` (changeset
declaration lines only) the changeset family ran again:
`check-changeset-no-major`, `check-empty-changeset`,
`check-adr-0087-registration`, `check:changeset-gate-self-tests` and
`check:nul-bytes` all exit 0.
- `scripts/pm/overlap-check.mjs`: VERDICT clean exit 0. objectstack-ai#37314's file
list does not intersect this diff.
</details>

---

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…e beside its card (objectstack-ai#37911)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuDKEKdacsmHCLbg9139FUsL)_

repo:objectstack#2 · os-sales · session_01L6bhgWYbeKh6ewAziS6nrf

Fixes objectstack-ai#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 objectstack-ai#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 objectstack-ai#30289's and objectstack-ai#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):
- §5's fixture sentence names what installs the build (`--template`)
instead of every round (N2);
- the §4 ask-round comment drops "order_to_cash's build waits on objectstack-ai#34986"
and has the reader `ls builds/` instead of recalling (N1).

L2 notes (6986428648):
- N1: done by this fixture landing, plus the §4 comment above.
- N2, N4, N5, N6: done as listed.
- N3: void (objectstack-ai#37257 ruled, objectstack-ai#37271 merged; this build fires no roll-up
charge).
- N7: the title is singular.

## 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.
- `template.install` `{ok: true, status: 200}`, `installMode:
unmanaged`. Build reads `supplied`, `no authoring turns`.
- Seed 619/619, Run-问数 11/12, Run-operations 6/6, datasets 4/5, 24 ask
turns served `claude-haiku-5-5` at medium.
  - `travel_expense`'s side of the Done-when was met by objectstack-ai#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.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.

<details><summary>Local gates (77, each exit 0)</summary>

```text
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
```

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgWYbeKh6ewAziS6nrf

<!-- signed: repo:objectstack#2 · os-sales ·
session_01L6bhgWYbeKh6ewAziS6nrf -->

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 size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants