Repository navigation
feat(scenarios): a card may name a roll-up a persona is meant to read over withheld rows - #37271
Conversation
… over withheld rows (order_to_cash: invoice.amount_paid for the sales rep) Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check4 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 59d9749085954e8cc185021bcbfa987768875f12 && git checkout 59d9749085954e8cc185021bcbfa987768875f12
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 057cedfa9b6f990a7cf322118ae33bc4460ddc65 d1750933e260d92e20b253413af991e5993b06cb && git checkout -B drift-repro 057cedfa9b6f990a7cf322118ae33bc4460ddc65 && git merge --no-ff d1750933e260d92e20b253413af991e5993b06cb
node scripts/docs-audit/affected-docs.mjs --json 057cedfa9b6f990a7cf322118ae33bc4460ddc65 |
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr Landing · head
State: L1 ACCEPT on this head (just above); every check-run green or expected skip. Ready and auto-merge in this stroke. On MERGED, #37257 closes by |
…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>
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Fixes #37257
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
allowedRollups(FieldRefSchema[], the card's bare names, optional, absent by default) inpackages/qa/scenarios/src/schema.ts. The persona schema refuses an allowed roll-up that the persona's ownhiddennames.rollupSourceCharges(packages/qa/scenarios/src/runner/orchestrate.ts) skips asecurity-rollup-source-unreadablefinding that is acknowledged (the rule'sinfoarm, i.e.rollupSourceUnreadableReasonon the set) AND whose roll-up the persona'sallowedRollupsnames. The card's names are prefixed with the card namespace before the comparison (invoice.amount_paidreads asdemoorder_invoice.amount_paid, the build's name). An unacknowledged finding on the allowed roll-up, and every other roll-up over withheld data, is still charged.docs/qa/scenarios/order_to_cash.json: the prompt sentence (zh and en kept in step) now says the rep sees their invoices' 已收金额 / 余额 / 状态 but not the individual payment rows; the sales-rep persona carriesallowedRollups: [{ object: invoice, field: amount_paid }].hiddenis unchanged (payment,product.unit_cost).@objectstack/scenariospatch (the package is published and ships the card library).Tests
Pin: new top-level
describeinpackages/qa/scenarios/test/runner/orchestrate.test.tson the realorder_to_cashcard, namespaced:amount_paid+ acknowledgedpayment_count, card allowsamount_paid→ onlypayment_countcharged;Ablation (once, after commit): the reader line deleted through
scripts/ablation-replace.mjs(anchor 1 → 0, blob 9f7c6d1acc4f → 38300e4a41a0) →Tests 1 failed | 4 passed(the allowed-roll-up case red:demoorder_invoice.amount_paidcharged); restored, blob == HEAD 9f7c6d1acc4f,git diff HEADempty. The test importssrc/directly, so no dist rebuild sits in the path.Acceptance notes
expect.objects, the seed carries the field) are not applied toallowedRollups: the loader is outside this claim's file surface. A misspelt entry fails closed (never matches, so the finding stays charged).namespacedScenario(runner/namespace.ts, also outside the surface) passesallowedRollupsthrough bare; the reader prefixes idempotently, so it matches either a bare or a namespaced card.runner/prompts.ts) still lists only what the persona must not read; the intent reaches the builder through the card prompt sentence.Verification
Two minutes:
pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/runner/orchestrate.test.ts -t 'allows a persona'→ 5 passed.Read first:
packages/qa/scenarios/src/runner/orchestrate.ts(the one skip inrollupSourceCharges),packages/qa/scenarios/src/schema.ts(allowedRollups+ refine),docs/qa/scenarios/order_to_cash.json(prompt sentence).Local readings at d175093
pnpm --filter @objectstack/scenarios build && … test && … typecheckunder the verify lock:VERDICT command-exit 0; Test Files 42 passed (42), Tests 1336 passed (1336).node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran …: 69 derived, 68 run (all exit 0), 1 NOT-MEASURED (pnpm check:dual-build-cjs-loadsexit 3, PREREQUISITE NOT MET: needs a full build; left to CI), 0 UNRUN.node scripts/pm/overlap-check.mjs --branch=HEAD: VERDICT clean exit 0.