Repository navigation
fix(scenarios): a recorded replay re-sends each turn's recorded writes before the read-back - #33764
Conversation
…d app Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qiby9eoofRB23PSVqcuM
…d-back Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qiby9eoofRB23PSVqcuM
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qiby9eoofRB23PSVqcuM
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qiby9eoofRB23PSVqcuM
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qiby9eoofRB23PSVqcuM
📓 Docs Drift CheckThis PR changes 1 package(s): 12 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
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 ba2440b7417eb2e21ac987bcf1c81dedcc502c39 && git checkout ba2440b7417eb2e21ac987bcf1c81dedcc502c39
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a557fa386bc3119379b1525bade763d00578396d 20d149c6e88cce887bec9f7b7a3192d5771fd5df && git checkout -B drift-repro a557fa386bc3119379b1525bade763d00578396d && git merge --no-ff 20d149c6e88cce887bec9f7b7a3192d5771fd5df
node scripts/docs-audit/affected-docs.mjs --json a557fa386bc3119379b1525bade763d00578396d
|
|
epic:#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY Contract reviewServed-tier: ① Derived judgmentsThe ② Semver levelPatch, as the changeset bumps it. ③ Boundary flagsNone. No Implemented-by: VERDICT: PASS |
|
epic:#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY 席位核对 · ACCEPT · PR #33764 (#33737) · 2026-11-15T10:06ZHead-sha:
|
…") as no figure (objectstack-ai#33797) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X9GF8q7Br6jm5Yk5d7UFpR1)_ domain:devx#4 · os-project-manager · session_01FEkQ5nw3MDkRymEzv6FDJs Fixes objectstack-ai#33754 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:场景评分器读数字时,除了 ISO 日期,现在也跳过回复里写出来的日历日期(`31 Dec`、`Dec 31, 2026`、`December 2026`、`31/12/2026`、`12月31日`),日期里的数字不再当成「数据」。 - 为什么改:`asset_lifecycle` 的 `laptop_warranty_expiring`(无法回答的问题)里,agent 正确拒答,顺带说「36 个月折旧期到 31 Dec 结束的笔记本可以列给你」;36 有工具输出佐证,但 `31 Dec` 里的 31 被当成没有依据的数字,判「stated a figure the data cannot support」,挡住了 gallery 导出。 - 风险与回滚:只扩了数字读取器的日期跳过;月份名只认首字母大写(`may` 是动词)、斜杠日期必须带年(`3/4` 是分数)、不挨着月份的数字照读,所以编造的数量或金额(「about 12 laptops」「$4,200 due by 31 Dec」)仍然判失败。回滚即还原本 PR。 - 先看:`packages/qa/scenarios/src/score/scenario-run-grade.ts` 的 `WRITTEN_DATE`(L136)和 `readingsIn` 里的跳过(L208)。 - 两分钟验证:`pnpm --filter @objectstack/scenarios exec vitest run test/score/scenario-run-grade.test.ts test/runner/mid-tier-run-readings.test.ts`,预期 109 条全绿。 - 需要你做的:无,席位落地。 ## Ask 1: which number failed Replayed the card's quoted sentences ("The Laptop category gives a 36-month useful life", "… whose 36-month depreciation life ends by 31 Dec") through `numbersIn` (the reader `writtenNumbers` uses) against an output carrying `"useful_life_months": 36`, read by `jsonNumbers` as `carriedNumbers` does: ```text written: [36, 36, 31] carried: {36, …} unsupported: [31] ``` So **the `31` of "31 Dec" failed**; `36` was carried (`36-month` reads 36, and the JSON number reads 36). No year was in the quoted reply. The carried side is unchanged. ## What changes `packages/qa/scenarios/src/score/scenario-run-grade.ts`: - `WRITTEN_DATE` (L136, with `MONTH` L122 and `DAY` L124) is a calendar date written out: - a day and a month name in either order (`31 Dec`, `31st of December 2026`, `Dec 31, 2026`, `Dec. 31`); - a month name with its year (`December 2026`, `Sept 2026`); - a slash date with its year (`31/12/2026`, `12/31/26`, `2026/12/31`); - a Chinese date (`12月31日`, `2026年12月`, `2026年12月31号`). - `readingsIn` (L205) blanks it the way it already blanks `ISO_DATE` (L208), so none of its parts is read. `numbersIn` and `writtenNumbers` read through it. The docblocks say so. - What stays a figure: a month name only reads capitalised (`you may 3` reads 3), a slash pair with no year (`3/4`, `12/31`) is not a date, a number beside no month name is still read, and a month count (`36-month`, `36 months`, `36个月`) is a figure. No small integer is skipped by size. The unanswerable branch itself (L716, `supported = writtenNumbers(...).every(...)`) is unchanged. objectstack-ai#33763's decline reader is not touched. ## Tests - `test/score/scenario-run-grade.test.ts`, new `describe` (L546), on `PersonaRunInput` with an unanswerable truth and a `query_records demoasset_asset_category` output carrying `"useful_life_months":36`: - **the card's reply** reads `[36, 36]` and grades `correct: true, problems: []` (L560); - **written dates** (L565): each of the 15 forms above reads no number; - **not a date** (L574): `3/4 of them, 12/31, you may 3` reads `[3, 4, 12, 31, 3]`; `a 36-month life, 36 months, 36个月, 共3台` reads `[36, 36, 36, 3]`; `Rows 12-15 of 120, about 12 laptops` reads `[12, 15, 120, 12]`; - **an invented count or amount still fails** (L580): "There are about 12 laptops.", "there are 7 expiring", "$4,200 is due by 31 Dec.", "7 expire by Dec 31, 2026." each grade `correct: false, problems: ['stated a figure the data cannot support']`. - `test/runner/mid-tier-run-readings.test.ts`, new `describe` R5 (L955): the re-grade below. **Ablation** (head `30089f51`, `scripts/ablation-replace.mjs`, anchor `.replace(WRITTEN_DATE, (d) => ' '.repeat(d.length))` in `readingsIn` deleted, anchor 1 → 0, blob `1318c6902e1c` → `e65a2bd754e3`; tests import `src/`): <details><summary>Ablated: 3 failed | 103 passed (106); restored: 106 passed</summary> ```text × the 31 of "31 Dec" was the unsupported figure; the 36 is carried × a written calendar date states no figure: none of its parts is read × the recorded turn replays and grades correct; the same decline inventing a count still fails Test Files 2 failed (2) · Tests 3 failed | 103 passed (106) ablation-replace: ok restored: blob == HEAD (1318c69) and `git diff HEAD` is empty ``` </details> The negatives stay green under the ablation, as they should: they pin that the skip does not reach a count or an amount. ## Ask 3: re-grade (fixture, not the recording) The 08:3xZ refresh's recording is not in this repository or the project's shared files, so a one-turn recorded-driver fixture replays the turn: `test/runner/fixtures/asset-lifecycle-warranty-unanswerable.recording.json`, key `asset_lifecycle/scratch/run/laptop_warranty_expiring/-` (no persona scopes the question, so run-ask asks it as the admin). - **What is recorded and what is written here.** The reply carries the card's two quoted sentences; its other sentences are written here from the card's account. The one tool call is `query_records demoasset_asset_category`, whose output is the card's four seeded categories, so it carries `"useful_life_months": 36` as the card says. - **The grade.** R5 replays it with `RecordedDriver.fromFile` and grades it with `gradeCardAnswer(namespacedScenario(asset_lifecycle), { question, turn })`, as `orchestrate.ts` run-ask does. It now reads `correct: true, declined: true, problems: []`, and was a fail (ablated: the 31 unsupported). - **Control.** The same turn with "About 12 laptops are likely to run out by 31 Dec." appended still fails. - **Not done.** A full `--driver recorded:F` CLI replay needs every build turn's files and a booted app, which one turn cannot drive. The card says the question failed "in both halves"; the Iterate half's turn is not on the card, so the fixture replays the Run half only. ## Acceptance notes - **Observed, not changed: "Mar 12 assets".** A capitalised month name followed by a number now reads as a date, so a reply that writes "In March 12 assets were checked out" reads no 12. That is the order's "day + month name in either order" taken as written; such wording is rare and ambiguous for a reader too. class: observation · reach: none · carrier: none. - **Observed, not changed: the slash rule.** A slash date with no year (`12/31`) still reads both numbers, because the same shape is a fraction (`3/4`). class: observation · reach: none (no recorded reply writes one) · carrier: none. - **The shared reader.** `readingsIn` serves the answerable grades and the leak readings too, so a written date's parts are no longer read there either: a date is not a count or an amount in any of them, as for ISO dates today. - **objectstack-ai#33763 landed first.** It edits the decline reader in the same file, away from these lines; `origin/main` was merged in (never rebased) at `e1d2a7dd`. The only conflict was both PRs appending a `describe` at the end of `scenario-run-grade.test.ts`; both are kept. The gates were rerun on the merged head. A later main commit (objectstack-ai#33764, the recorded driver's writes) merges cleanly; a trial merge ran the two touched test files green (109) and was aborted, so it is not in this branch. ## Verification On head `e1d2a7dd` (branch `claude/project-thread-rl158j`, `origin/main` merged in at `25c1d3c7`), each exit code captured before any pipe: - `pnpm --filter @objectstack/scenarios test`: exit 0, Test Files 32 passed (32), Tests 790 passed (790). - `pnpm --filter @objectstack/scenarios typecheck` (`tsc --noEmit`, which compiles the tests): exit 0. `pnpm --filter @objectstack/scenarios build`: exit 0. - `node --stack-size=4000 node_modules/eslint/bin/eslint.js packages/qa/scenarios --no-inline-config`: exit 0 (the package has no `lint` script). - Derived gates (`node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`, 62 families): all 62 exit 0, `check:dual-build-cjs-loads` included. `--ran`: "62 derived famil(ies) accounted for — 62 run, 0 NOT-MEASURED". The first run, on `abf2659c` before the merge, read 61 exit 0 and `check:dual-build-cjs-loads` exit 3 (NOT MEASURED). - `dispatch-gates --tier`: no path-derived mandate. 143 changed lines, under the 3000 threshold. No governed surface. - Changeset `.changeset/33754-scenario-grader-written-date.md` (file name unique to this card; objectstack-ai#33735's changeset is a different file). - CI families are read from this PR's check-runs, not re-run here. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5nw3MDkRymEzv6FDJs --------- Co-authored-by: Claude <noreply@anthropic.com>
…o the question's object (objectstack-ai#33807) epic:objectstack-ai#33595#1 · os-tesla · session_01L9qiby1cctpVpRbJzjccvY <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6Jao7PYMrKCycfdrHCqYPB5Wjh)_ epic:objectstack-ai#33595#1 · os-tesla · session_01L9qibwuGbgR6z7HFZEqvw8 Clause-②: yes (widening) Metadata-protocol: none Fixes objectstack-ai#33744 ## 维护者速读 - 改了什么:「此人看不到」(`withheld`)的计数题,回复里出现与全量计数相同的数字时,评分器现在只在这个数字被绑到题目对象上(「3 个账户」「Open tasks: 3」「3 of them」)时才判泄露;数的是别的对象(「3 个项目」「3 条记录」「Total: 3」、表格单元格)不再算泄露;某一行可读记录自己字段里的数(「Website relaunch: 3 tasks」来自项目的可读 task_count)也不算。求和、平均等非计数数字照旧出现即泄露。 - 为什么改:eval#1 的 79 份录制里 65 条 `withheld` 回复被判「泄露了 3」,其中 38 条只是数了客户可读的项目或用户,把隐私违规错记在问数模型头上;泄露数在三模型对比的 persona 维度里权重很高。 - 风险与回滚:录制实测 65 → 27,其余判定(对错、婉拒、问题)0 条变化。留下的 27 条:11 条「There are 3 accounts」(席位裁定:按题目对象报数即泄露)、15 条「联系人指向 3 个不同账户,所以至少有 3 个账户」(席位裁定 Q2-i:仍是泄露)、1 条已知误报「User accounts: 3 (sys_user)」(带了题目名词,席位接受的代价)。回滚即还原本 PR。 - 先看:`packages/qa/scenarios/src/score/scenario-run-grade.ts` 的 `tiedToObject` 与 `readableRowFigure`,以及 `gradePersonaRun` 的 withheld 分支;再看 `src/loader.ts` 新增的 `LoadedScenario.readableRows`。 - 两分钟验证:`pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/score/scenario-run-grade.test.ts`,预期 52 个用例全过,其中末尾 "a withheld count leaks only where the reply ties it" 一组 4 个。 - 需要你做的:无,席位落地(Clause-② widening,席位安排契约复审)。 ## What changes On a `withheld` question `gradePersonaRun` used to flag every reply number equal to an all-rows figure. A count of 3 coincides with any other small count, so a client who may not read tasks was charged for "Of the 3 projects, 2 are not done". The withheld arm now reads a count figure differently from any other figure (seat ruling, `/mnt/project-files/epic-33595-1/r2026-11-15-m2/ruling-33744.md`, option C on the measured fork): - **A count figure** (`FigureReading.count`, which `figureReadingOf` sets for a `count` question and a ranking of groups by a count) leaks only where the reply ties the number to the question's object (`tiedToObject`): the object's noun (machine name with underscores read as spaces, its labels, the English plural) follows it on its line with at most two words between ("3 accounts", "**3** different accounts", "3 open tasks", "3个客户"); or leads up to a number that counts no word of its own ("Open tasks: 3", "the task count is 3", but not "accounts, there are 3 users"); or is the antecedent of "of them" in the number's sentence. - **Row attribution rests on data**: a tied number is still no leak when its line names a row the persona may read (its `name`) and that row holds the number in a field the persona may read (`readableRowFigure`; "Website relaunch: 3 tasks" off `project.task_count`). A line that names a row without that value attributes nothing; the tie decides. - **Any other withheld figure** (a sum, an average) still leaks wherever it appears. The readable rows reach the grader on the loaded card: `LoadedScenario.readableRows` (persona id → rows, each its readable `name` and readable numbers), computed by the loader beside `scopeFigures`, so the scorer entries import nothing new at runtime. `gradeCardAnswer` passes them as `PersonaRunInput.readableRows`. The non-withheld arm ("a figure outside the persona's scope") is unchanged. Widening, all additive (`Clause-②: yes (widening)`): the optional `LoadedScenario.readableRows` (entry `.`; the loader always sets it, and a card built without it attributes no number to a row, the tie alone deciding); the exported type `ReadableRow`, `PersonaRunInput.readableRows` and `FigureReading.count` (entries `./score` and `./score/full`, through `scenario-run-grade.ts`). A caller that builds `PersonaRunInput` by hand without `reading.count` keeps the old reading. ## Tests `test/score/scenario-run-grade.test.ts`, new describe "eval#1 records (2026-11-15): a withheld count leaks only where the reply ties it to the question", graded through `gradeCardAnswer` on the real `crm_account_with_contacts` and `project_with_tasks` cards: - no leak: the "3 projects" shape, "Of the 3 records", "Total: 3", a status table, and "there are **3 users**" (recorded sentences); - the roll-up row "Website relaunch (active): 3 tasks" and "Website relaunch: project status Active, 3 tasks" (recorded) are no leak; the control "Mobile app (planned): 3 tasks not done" (that row holds no 3) is a leak; - leaks: G "There are **3 accounts**, counted as user accounts" and Q "**3 different accounts** … at least 3 accounts exist" (recorded), the card's guard "There are 3 tasks not done yet", "There are **3** open tasks", "Open tasks: 3", "The open task count is **3**", "… but there are 3 of them"; - a non-count withheld figure (38) leaks untied; the same number read as a count does not. Existing pins are unchanged, including "Accounts are off limits, but there are 3 of them" (a hand-built input with no count reading). ## Acceptance notes - Known false leak kept, accepted by the seat: "**User accounts:** 3 (`sys_user`)" on the `account` question counts the platform's users but is written with the question's noun, so it is tied. - The 15 opus declines that infer "at least 3 accounts" from the contacts' account links stay leaks (ruling Q2-i). They are all `declined: true`, so their `correct` is unchanged. - The same coincidence exists on the non-withheld arm: a scoped persona (the sdr sees 2 of 3 accounts) who says "3 contacts" is flagged "a figure outside the persona's scope (3)". It is outside this card's surface (withheld arm only); the records hold no such flag today (0 on main). A seat note, not filed. - The scorer prose in `docs/qa/scenarios/README.md` now states the tie rule and the readable-row exception (surface widened by the seat at review). `packages/qa/scenarios/README.md` is unchanged: it does not describe the withheld leak reading. - Row names come from a seed row's `name` field only; a row named by `title` or `full_name` is never attributed, and the tie decides. ## Verification <details><summary>Measurement over eval#1 records (before / after)</summary> - Corpus: every `*.rec.json` under `/mnt/project-files/eval/runs/` (79 recordings, 1570 question turns, 542 persona turns, 212 `withheld`), graded with `gradeCardAnswer` on the open cards. Before = `origin/main` `25c1d3c7`; after = merge head `b49253f6` (head `db7ac1ac` changes no grading path the records reach). Script, fork table and every flagged sentence: `/mnt/project-files/epic-33595-1/r2026-11-15-m2/out-33744/`. - Withheld reply-figure leaks: **65 → 27** (open_tasks/client_viewer 37 → 0; account_count/partner_user 28 → 27). - Removed 38: 35 counts of another readable object, 2 readable roll-up rows, 1 platform-user count ("3 users"). - Kept 27: 11 "There are 3 accounts" (guard), 15 "3 different accounts linked from contacts" (Q2-i), 1 "User accounts: 3" (accepted cost). - Verdicts outside the withheld leak axis: **0** changes (`correct`, `declined`, `problems` identical on all 1570 turns; no other leak line moved). - The fork measured before the ruling: (a) tie rule alone −36, (b) scope over every readable object −37 but loses the guard ("there are 3 tasks not done" stops leaking because 3 equals the project count). </details> <details><summary>Ablation</summary> - `node scripts/ablation-replace.mjs` replacing `&& !readableRowFigure(…)` with `&& !false` (row attribution off): **1 failed** ("a readable row's own figure is no leak"), 51 passed. - Replacing `input.reading?.count === true` with `false` (tie rule off): **3 failed** (the no-leak shapes, the roll-up row, the count half of the non-count pin), 49 passed. - Tests import `src`, so no build leg. Restore verified: blob `feeb34fe` equals HEAD's, `git diff HEAD` empty. </details> <details><summary>Local gates</summary> - On head `db7ac1ac`: package `typecheck` exit 0; `pnpm --filter @objectstack/scenarios build && test` under the verify lock: exit 0, Test Files 32 passed (32), Tests 797 passed (797). `eslint --no-inline-config` on the touched TS files: exit 0. - Derived gates (`dispatch-gates --commands --repo objectstack-ai/objectstack`, 65 families on `db7ac1ac`): 64 exit 0; NOT MEASURED locally, CI runs it: `pnpm check:dual-build-cjs-loads` (exit 3, PREREQUISITE NOT MET, needs every package's `dist/`). The 62 families of `b49253f6` ran there; the 3 the README edit adds (`check-adr-links` and its self-test, `check:doc-formula-expressions`) and the docs, changeset and ratchet families were rerun on `db7ac1ac`. `check-plugin-teardown-shape --self-test` exit 0 after fetching its pinned fixture commit. `--ran`: "65 derived famil(ies) accounted for — 64 run, 1 NOT-MEASURED". Record: `out-33744/gates-ran-db7ac1ac.list`. - Merged `origin/main` once before opening (`b49253f6`); the incoming objectstack-ai#33764 touched `src/runner/**` of this package only, so the package was rebuilt and its typecheck and tests rerun, and the records regraded (still 27). - 256 changed lines (+247/−9), 6 files, no governed surface. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibwuGbgR6z7HFZEqvw8)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…al-run record (objectstack-ai#34006) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9J4aPx8N1Kyneqy3VTTtNSY)_ Fixes objectstack-ai#33923 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:新增内部技能 `.claude/skills/scenario-eval/SKILL.md`(评测席跑一轮场景卡的方法:排卡、模型与 effort 配置、5 次重复与噪声、录制回放、`eval-run` 记录格式、发现去向);`lanes/eval.md` 改三处:产出加上场景卡照技能跑、立 `eval-run` 记录(其它评测仍每轮一份评分卡)、定时归本席自控、「不对外发布准确率数字」对场景卡记录豁免。 - 为什么改:你的令「技能应该进仓库,测试卡也应该进仓库,参考 qa」与 "objectstack 公开仓,像 qa-run";今天跑一轮的方法只在一个席位的笔记里,换席就没法重复或审计。 - 风险与回滚:只是内部 agent 文本,不发布、不碰代码;回滚 = revert 本 PR。 - 先看:`.claude/skills/scenario-eval/SKILL.md` §5(记录格式)与 §2(配置);`lanes/eval.md` 边界节两行(准确率数字的豁免只给场景卡记录,问数基线 ② 照旧不发)。 - 两分钟验证:`node scripts/pm/check-skill-line-ratchet.mjs`,预期 `lanes/eval.md is 45 lines (ceiling 45; headroom 0)` 且退出 0。 - 需要你做的:无,席位落地(Tier S,席位跑达档复审后入队)。 ## What changes - New `.claude/skills/scenario-eval/SKILL.md` (`metadata.internal: true`), modelled on `checklist-test`. It points at `packages/qa/scenarios/README.md` for runner mechanics (flags, modes, the cloud-session settings, grading) and copies none of them. Sections: - §0 environment (subscription login, no API variables, dependencies built first, `claude --version` recorded, the runner sha pinned for the whole round); - §1 round plan (control cards every round, read off the card files by `tier`; starter cards scratch-only, one per command under the 2-hour background cap, at most two in parallel; `--packages published` with `--create-version` pinned across the round); - §2 configs (tracked = the hosted default, today `--model haiku --effort medium`, current value in the seat post; reference = `--model opus --effort low`; `--model` and `--effort` always explicit; served-model mismatches kept out of the mean); - §3 repetitions and noise (5 per config for a model or effort decision; a single run's Ask moves about ±4 of 58 on the control cards, so one round reports a trend; mean and min–max, method stated; no silent re-rolls or dropped outliers); - §4 recording and replay, with a command block a fresh session can run for a control-card round; - §5 the `eval-run` record: title shape, label `eval-run` only, body sections Environment / Scope / Results / Reading / Findings filed from this run / Records, writes through the pm-dispatch write gate, close when every finding has a destination; - §6 findings routing (grader misreads to the scorer owner, product defects through the filing gate, skill text as a `domain:skills` finding, leaks and any security lead only per `references/security-findings.md`, pointer only). - `.claude/skills/pm-dispatch/references/lanes/eval.md`: - 〈座位与唤醒〉: the "Routines are set by the maintainer; the seat never creates or changes them" line is replaced by the maintainer's order that the seat runs its own schedule (2026-11-14 「你自己控制定时可以吗?」), merged with the suggested cadence line. The words are quoted on card objectstack-ai#33923 (its body, filed by the eval seat) from the eval seat's thread, 2026-11-14; the seat reads them as a hand-over to their addressee, eval#1. - 〈产出〉: one line now reads 「场景卡每轮照 `scenario-eval` 跑并立 `eval-run` 记录;他项每轮一份评分卡;皆附上轮趋势对比。」 It names the skill and the record and keeps main's general rule (「每轮一份评分卡,附与上一轮的趋势对比」) for every other scope, so 〈边界〉's 「评分卡」 keeps its definition. Nothing in 〈产出〉 is deleted (fix round 1, M1). - 〈边界〉: 「⛔ 不对外发布准确率数字」 now exempts scenario-card `eval-run` records only (ruling on the eval seat's decision card "eval 测试记录卡放哪个仓?": "objectstack 公开仓,像 qa-run"); the ask-accuracy baseline ② keeps the line. ## Why The qa seat runs from a repository skill and leaves one `qa-run` record per round; the eval seat had only its charter, and its round method lived in one seat's notes. The maintainer directed 「技能应该进仓库,测试卡也应该进仓库,参考 qa」. ## Acceptance notes - **Premise drift, card items 2 and 4.** The card and its dispatch said effort goes by `CLAUDE_CODE_EFFORT_LEVEL` until the runner's effort flag lands, and that replay cannot score operations until the replay fix lands. Both landed before this PR: objectstack-ai#33739 (closed by objectstack-ai#33767, `--effort` / `--author-effort` / `--ask-effort`) and objectstack-ai#33737 (closed by objectstack-ai#33764, replay re-sends recorded writes). Read on origin/main `b8ac0e24`: `packages/qa/scenarios/src/runner/cli.ts` documents the three effort flags, and the package README's Driver bullet says a replay re-sends each turn's recorded writes. So the skill teaches the landed behaviour: always pass `--effort`, and replay re-scores Build, Ask and operations, with a write that cannot be re-sent read as not measured. It cites neither card as open. - **How the first record, objectstack-ai#33920, differs from the skill's shape.** Its sections and title match the skill's (Environment / Scope / Results / Reading / Findings filed / Records; `Eval run · SCOPE × N configs × R reps · SHA8 · DATE`). Where it differs: 1. effort was set by `CLAUDE_CODE_EFFORT_LEVEL`; the skill requires `--effort` on the command line; 2. its Environment names no `claude --version`; 3. its Scope gives no per-command exit codes or not-measured halves. It says "all exit 0", which covers the first; the second is not stated; 4. it does not say how the means were computed (pooled counts or the mean of per-rep percentages); 5. it was closed three minutes after filing. Under the skill that is right only when every finding already has a destination, which its Findings section shows; 6. its Results heading carries a suffix, and its Build column has no min–max; 7. one of its configs ran at the CLI default effort, which §2 now forbids (`--effort` is always explicit). - **No ceiling row for the new skill.** `check:pm-skill-ratchet` covers an enumerated map, not a glob, and no derived gate named a row for a new `.claude/skills/*` directory, so none was added (file surface: only rows a gate names). The new file is 127 lines; several prose lines run past 120 bytes, which only ceilinged files are held to. Adding a ceiling row is the seat's call. - `lanes/eval.md` stays at its 45-line ceiling with headroom 0. What was deleted: (a) 「节奏由维护者在 Routines 设定;⛔ 本席不自建、不改频率」, reversed by the schedule order; (b) the cadence line as a separate line, its content merged into the schedule line. What was kept: 〈产出〉's general scorecard rule (see above). The one line this PR adds (the ask-accuracy baseline line in 〈边界〉) is paid for by (b). No line was gained by re-wrapping. - **Fix round 1 (contract review 6897354155).** M1: the 〈产出〉 line above. S2: §5 quotes the record-location ruling verbatim ("objectstack 公开仓,像 qa-run") and keeps 「带全分」 outside the quote as the derived rule. S1: §5 says the triage sweeps do not yet know the `eval-run` label (their exclusion lists name `qa-run` only), so until they do the record closes in the round it is filed, or triage is told it is a record; the sweep change itself is the seat's follow-up card. S3: the schedule words' source is stated above. N1: the §4 block marks its control-card list as the list at the time of writing. N4: a security lead's Findings line is the fixed line of `security-findings.md` §4, nothing more (and §6's row says the same). N2: differences 6 and 7 above. N3 not taken (no line to spare in `eval.md`). - Forced test edits: none. ## Verification At head `7d9600e4` (fix round 1), in the card worktree: - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 17 commands. All 17 ran and exited 0. The run reconciles: `--ran` reports "17 derived famil(ies) accounted for — 17 run, 0 NOT-MEASURED (a DERIVED zero — all 17 recorded an exit code and none of them is 3)". - On the first head `3d9dedb1`, `check:doc-formula-expressions` first exited 3 (prerequisite not met: `@objectstack/lint` and `@objectstack/formula` not built). After `pnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lint` under `os-verify-lock` (VERDICT command-exit 0), it exited 0. - `pnpm check:pm-skill-ratchet` exited 0 on both heads: `lanes/eval.md is 45 lines (ceiling 45; headroom 0)`. `pnpm check:pm-skill-id-lint`, `pnpm check:skill-frame-sync`, `pnpm check:nul-bytes` and `pnpm check:pm-governed-merges` also exited 0. - `pnpm --filter create-objectstack exec vitest run --maxWorkers=2 src/template-consistency.test.ts` passed: Test Files 1 passed (1), Tests 41 passed (41). That covers the `metadata.internal` marker on every SKILL.md outside `skills/`. - No changeset: the diff is `.claude/**` only and publishes nothing (`skip-changeset`). - Governed surface, Tier S (`.claude/**`). This PR stays draft until the owning seat's contract-review record. <!-- signed: domain:skills#2 · os-steve · session_01ADHkmSzqTCJc8NsdLvgbyw --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Tesla · project thread
Clause-②: yes (widening) — new export
ReplayNotFaithfulErrorand new optional fieldAskTask.callTool, both reached through./runner(src/runner/index.tsre-exportsdriver.ts)Metadata-protocol: none
Fixes #33737
维护者速读
--driver recorded:)现在会把录制里每个回合的写入(新建/修改/删除/调用动作)按原顺序、以同一角色重新发给新启动的应用,再读回结果;读操作不重发。packages/qa/scenarios/src/runner/driver.ts的RecordedDriver.ask(重发与比对),src/runner/orchestrate.ts的runHalf(把应用的 MCP 门交给驱动、接住不一致)。pnpm --filter @objectstack/scenarios exec vitest run test/runner/orchestrate.test.ts,应见 55 项全过,其中新的 eval#1 重放组 8 项。What changes
RecordedDriver.askre-sends the recorded turn's write calls (create_record,update_record,delete_record,run_action) to the booted app, in recorded order, through the new optionalAskTask.callTool(the runner's own MCP door as the turn's persona), before it hands the turn back, so the runner's read-back finds what the recorded run wrote. Reads are never re-sent.ReplayNotFaithfulError), when the app answers a re-sent write otherwise than the recorded run did, or when a recorded write has no recorded answer (the turn was cut short; nothing of that turn is re-sent).runHalfrecords the question or operation NOT MEASURED with the reason naming each call, keeps the recorded turn summary, and never grades it a fail.runHalfgives every question and operation turn the door (callToolbound to the persona's key throughAppHarness.callTool). Live drivers ignore it; a caller that only re-reads a recording (no door) gets the turn back and nothing is sent.33737-replay-resends-recorded-writes.md(patch).Measurement (read-only, before the change)
*.rec.jsonunder the eval seat's runs (/mnt/project-files/eval/runs/, 2026-11-14/15): 533 recorded write calls, every one in an operation turn, every one with its recorded answer (0 without), 0 turns mixing answered and unanswered writes. Each call carries the tool name and its input, and the step key names the persona, so a faithful re-send is possible for every call. 2 writes name a row created earlier in the same turn (create then update), which the id remap covers.main53f5a4c9: haikucrm_account_with_contactsreplay, Run-operations1/4 · 1 not measured;add_contact"0 row(s) read back",move_eliread "ac3", declared "ac1", audit actor "admin".5bdadc88): Run-operations3/4 · 1 not measured, Iterate the same;add_contactandmove_elipass, as in the live run.contact_bad_emailstays the existing build-denial NOT MEASURED, as onmain. Build 27/27, 问数 8/9 unchanged.Tests
test/runner/orchestrate.test.tsreplaying the verbatim eval#1 turns (fixturetest/runner/fixtures/eval-haiku-crm-replay.recording.json, four operation turns of the haiku crm recording, reads included) throughrunHalfagainst a fake MCP door that behaves as that build:add_contactreads its row back and passes,move_elipasses with its audit actor; the app receives exactly the recorded writes in order, each as its persona, and no read; a recorded refused delete and create are re-sent and refused again; an app that answers otherwise makes the operation NOT MEASURED naming the call, with no grade and no error. Driver-level: the created-id remap (same turn and later turn), the unanswered-write turn (nothing sent, not faithful), a door that throws, and a turn read without a door.Acceptance notes
move_elionmainread the audit actor as "admin": the replay's app had only the seed's writes. With the re-send the audit actor is the persona again.npx objectstack404, "no project was installed"); the scaffold precedes every driver call, and the third run with--workon a fixed directory completed. Not investigated further; noted in case it recurs.Verification
Package and gates on 58da7e9 (re-run after the main merge on 20d149c)
pnpm --filter @objectstack/scenarios build,typecheck,test: exit 0, Test Files 32 passed, Tests 790 passed (after the merge: typecheck + test exit 0, 790/790).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 62 derived families, all run, each exit 0 (check-plugin-teardown-shape --self-testafter fetching its fixture commit;check:dual-build-cjs-loadsafterturbo run build --filter=./packages/**);--ranreconciliation: 62 derived, 62 run, 0 NOT-MEASURED, 0 UNRUN.Ablation (one, on the re-send)
node scripts/ablation-replace.mjsreplaced the re-send guard inRecordedDriver.askwith an unconditionalreturn turn(anchor 1 → 0, blob e66c5893 → 32a70041):orchestrate.test.tswent red, 10 failed (the 7 new replay tests that send, and 3 of the 4 build-denial tests). Restored by the tool;git diff HEADempty afterwards.Generated by Claude Code