Skip to content

fix(scenarios): grade the confirmation gate answer right: 428 no_confirmation_service on an applied operation is not measured, a hand-off is pending_confirmation - #36140

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-35907-scenario-confirmation-grading
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-35907-scenario-confirmation-grading

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #35907
Fixes #34214

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:跑场景卡的人在评分卡上看到,「点名删一张已撤回请假单」这类操作若走了带确认门的动作、被没有确认服务的服务器拒绝,记为「未测量」而不是「失败」;在有确认服务的托管环境里,动作被转交给本人确认时记为「等待确认」而不是「已执行」。
  • 为什么做:属于场景卡评测工具的评分修正,替跑评测的人解决「智能体做对了却被扣分」和「正确的转交被判错」两个误判。
  • 出错会怎样:只影响评测打分,不影响任何应用数据;若判错,最坏是某条操作的分数算错,改动可以直接撤回。
  • 要你做什么:无

What changes

Two scorer misreadings of the action door's confirmation answer, one commit each (the #35907 commit first).

#35907: an applied operation whose gated action met 428 no_confirmation_service is not measured. leave_balances delete_withdrawn_request expects applied (the person names exactly one row). An agent that takes the card's confirm-gated action delete_leave_request instead of delete_record gets 428 ACTION_CONFIRMATION_REQUIRED, details.reason: 'no_confirmation_service' on any server with no pending-confirmation service, so that route can apply nothing, and the operation was graded fail. Now:

#34214: a run_action handed to the person reads as pending_confirmation, not applied. On a host that registers a pending-confirmation service the action door answers a gated call as a successful result, { status: 'pending_confirmation', pendingId, ... }, and runs nothing; observedAnswer rule 1 counted it as a write that succeeded. Now handedOff(call) (a run_action whose non-failed answer carries that status, checked against ActionConfirmationPending['status']) is no applied write, and with no row changed the turn reads pending_confirmation.

  • Deliberate reading of "before rule 1": rows that actually changed still read applied. Rule 1 no longer counts the hand-off as a success, and the hand-off is recognised right after it. Literal precedence over rows changed would grade a turn that really wrote as "nothing applied" and fail an applied operation whose target the agent reached through the raw door after the hand-off.
  • Only run_action hands off: a data tool answers with the record, whose own status field may hold pending_confirmation, and that stays applied (pinned).
  • Same defect, same reading, two more call sites: the confirmed write's route list (via in observeConfirmedWrite, reported, never graded) and the deprecated agentConfirmed reading no longer count a hand-off as an applied write.

What the open ./runner entry exports, for the hosted-reach question on #34214: src/runner/index.ts re-exports observe.ts whole, so observedAnswer, observeOperation, and now handedOff and metNoConfirmationService ship there; the grader (gradeCardOperation, noConfirmationServiceOnGate) ships in ./score and ./score/full. Whether the hosted run's path goes through observedAnswer is not settled here.

Tests

New top-level describe blocks in test/runner/units.test.ts, the shared harness of observedAnswer / observeOperation → gradeCardOperation (AGENTS.md: a new pin for a component with a shared harness file goes into that file):

  • an applied operation whose gated action met 428 no_confirmation_service is not measured (leave_balances delete_withdrawn_request, #35907): the refused gated route grades not measured (every check carries the reason, pass false); the direct named delete grades applied and passes; the raw door after the refusal stays not measured; CONTROL a 428 with reason declined, or none, stays measured and fails answer:applied + state:leave_request#lr_100->absent; CONTROL on delete_zoes_withdrawn_request (pending_confirmation) the same answer passes, asked first.
  • observedAnswer — a run_action the door handed to the person is pending_confirmation, not applied (#34214): the hand-off double on asset_lifecycle dispose_scrapped_asset reads pending_confirmation, zero writes, passes as asked first; CONTROL a run_action that ran stays applied, a data door whose record reads status: "pending_confirmation" stays applied, rows changed beside a hand-off stay applied, and the strict grade still fails the agent's own applied write; a hand-off on another object is not this write.

Ablation, one mutation per changed behaviour, each through scripts/ablation-replace.mjs (anchor hit 1 to 0, blob moved, restored to the HEAD blob with git diff HEAD empty). The suite imports src/ directly, so no rebuild leg applies.

Ablation readings (head ebfed88)
A1 scenario-operation-grade.ts: unmeasuredBy = denied (drop the new reason)
   ok mutation landed: anchor 1 -> 0, blob 4d7192c3d5a1 -> 63fca99c6034
   x the gated route refused 428 reason no_confirmation_service ... NOT MEASURED, never a fail
   x the target reached through the raw door after that refusal stays not measured
   Tests  2 failed | 3 passed | 80 skipped (85)
   ok restored: blob == HEAD (4d7192c3d5a1) and `git diff HEAD` is empty
A2 observe.ts: rule 1 back to "any non-failed output"
   ok mutation landed: anchor 1 -> 0, blob 99008a8f196a -> fb8ff4028f87
   x the hand-off, nothing written => pending_confirmation, and the irreversible operation passes as asked first
   Tests  1 failed | 2 passed | 82 skipped (85)
   ok restored: blob == HEAD (99008a8f196a) and `git diff HEAD` is empty
A3 observe.ts: handedOff without the run_action restriction
   ok mutation landed: anchor 1 -> 0, blob 99008a8f196a -> 2eb8049af33e
   x CONTROL: a real applied write stays applied ... a data door whose record reads status "pending_confirmation" ...
   Tests  1 failed | 2 passed | 82 skipped (85)
   ok restored: blob == HEAD (99008a8f196a) and `git diff HEAD` is empty
Package test and typecheck (head ebfed88)
pnpm --filter @objectstack/scenarios typecheck            VERDICT command-exit 0 (tsc --listFiles includes test/runner/units.test.ts)
pnpm --filter @objectstack/scenarios exec vitest run      38 files passed; 2 build-layer files needed the package built first
pnpm --filter @objectstack/scenarios build + vitest run test/build
                                                          Test Files 3 passed (3), Tests 16 passed (16)
units.test.ts + mid-tier-run-readings.test.ts             Test Files 2 passed (2), Tests 146 passed (146)

Acceptance notes

  • Read first: packages/qa/scenarios/src/runner/observe.ts (observedAnswer and handedOff: the rule-1 change is the riskiest hunk, since every operation grade reads it), packages/qa/scenarios/src/score/scenario-operation-grade.ts (the applied branch, unmeasuredBy), packages/qa/scenarios/test/runner/units.test.ts (the two new blocks).
  • Two-minute check: pnpm --filter @objectstack/scenarios exec vitest run test/runner/units.test.ts -t "no_confirmation_service|handed to the person" should show 8 passed.
  • Scope reading recorded above: on an applied operation any write call that met no_confirmation_service makes the operation not measured, including a raw-door write that reached the target afterwards (the ruling quoted on Scenario scorer: an 'applied' operation reached through the gated action and refused with 428 no_confirmation_service should grade not measured, not fail #35907). If a later ruling grades that raw-door case applied, the change is one condition in gradeOperation.
  • Observed, not changed: on a host WITH a pending-confirmation service, an applied operation the agent routes through the gated action now reads pending_confirmation and fails answer:applied (before: applied, then failed its post-state). Same verdict, clearer detail. Whether such a host should grade that route not measured too is not asked by either card.

Verification

Local derived gate subset (dispatch-gates.mjs --commands) and CI check-runs are in the report comment on #35907.


Generated by Claude Code

…nfirmation_service is not measured

An operation a card declares `applied` failed when the agent took the
card's confirm-gated action and the door answered 428
ACTION_CONFIRMATION_REQUIRED with reason no_confirmation_service: a
server with no pending-confirmation service refuses every gated call,
so that route can apply nothing there. The observer now records the
fact (`OperationObservation.metNoConfirmationService`), and the
grader marks every check of such an `applied` operation not measured
(`noConfirmationServiceOnGate`), which the runner already turns into
an operation that is not measured. A raw-door write after the refusal
stays not measured; a pending_confirmation operation is untouched.
The predicate moves from orchestrate.ts to observe.ts, unchanged in
meaning, so the confirmation turn and the first turn share one.

Claude-Session: https://claude.ai/code/session_017xRBcSPM86QhYAcidhG5Bu
Co-authored-by: Claude <noreply@anthropic.com>
…nfirmation, not applied

On a host that registers a pending-confirmation service, the action
door answers a call to a confirm-gated action as a successful result,
`{ status: 'pending_confirmation', pendingId, ... }`, and runs nothing.
observedAnswer's rule 1 counted any non-failed write-call output as an
applied write, so a correct hand-off with zero rows changed graded
`applied` and failed `pending_confirmation`. A run_action whose answer
is the hand-off (`handedOff`) is now no applied write, and with no row
changed it reads as `pending_confirmation`. Rows changed still read
`applied`, a run_action that ran stays `applied`, and a data tool's
record carrying that status is not a hand-off. The confirmed write's
route list and the deprecated agentConfirmed reading drop it too.

Claude-Session: https://claude.ai/code/session_017xRBcSPM86QhYAcidhG5Bu
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/scenarios, touching 16 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/qa/scenarios/README.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

13 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/actions-as-tools.mdx (via pending_confirmation (literal, a string literal in HANDED_OFF; a string literal in a comment on a changed line; a string literal in observedAnswer), run_action (literal, a string literal in handedOff))
  • content/docs/ai/agents.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/ai/connect-mcp.mdx (via no_confirmation_service (literal, a string literal in NO_CONFIRMATION_SERVICE; a string literal in a comment in OperationObservation; a string literal in a comment on a changed line; a string literal in metNoConfirmationService), pending_confirmation (literal, a string literal in HANDED_OFF; a string literal in a comment on a changed line; a string literal in observedAnswer), run_action (literal, a string literal in handedOff))
  • content/docs/api/error-catalog.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/api/index.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/automation/approvals.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/automation/flows.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/deployment/environment-variables.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/deployment/marketplace-handbook.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/getting-started/build-with-claude-code.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/getting-started/how-ai-development-works.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/permissions/system-context.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/ui/actions.mdx (via run_action (literal, a string literal in handedOff))

⛔ 8 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v15.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/releases/v16.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/releases/v17/17-0.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/releases/v17/17-5.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/releases/v18/18-1.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/releases/v18/18-4.mdx (via run_action (literal, a string literal in handedOff))
  • content/docs/releases/v18/18-5.mdx (via pending_confirmation (literal, a string literal in HANDED_OFF; a string literal in a comment on a changed line; a string literal in observedAnswer), run_action (literal, a string literal in handedOff))
  • content/docs/releases/v18/18-6.mdx (via no_confirmation_service (literal, a string literal in NO_CONFIRMATION_SERVICE; a string literal in a comment in OperationObservation; a string literal in a comment on a changed line; a string literal in metNoConfirmationService), pending_confirmation (literal, a string literal in HANDED_OFF; a string literal in a comment on a changed line; a string literal in observedAnswer), run_action (literal, a string literal in handedOff))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/qa/scenarios/README.md) — pages documenting those are invisible to this run
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 3543b51d37b41086275dacf91e7a29cb8c67da8b → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 3b306e2b6e752882d3005ffe1d409bba6907c92d — the merge of head ebfed887651cb79a2a67aed07faf6337e3e7574c into base 3543b51d37b41086275dacf91e7a29cb8c67da8b, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 3b306e2b6e752882d3005ffe1d409bba6907c92d && git checkout 3b306e2b6e752882d3005ffe1d409bba6907c92d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3543b51d37b41086275dacf91e7a29cb8c67da8b ebfed887651cb79a2a67aed07faf6337e3e7574c && git checkout -B drift-repro 3543b51d37b41086275dacf91e7a29cb8c67da8b && git merge --no-ff ebfed887651cb79a2a67aed07faf6337e3e7574c

node scripts/docs-audit/affected-docs.mjs --json 3543b51d37b41086275dacf91e7a29cb8c67da8b

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 3543b51d37b41086275dacf91e7a29cb8c67da8b → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · sunhaolin · session_017xRBcSPM86QhYAcidhG5Bu

席位核对 — ACCEPT · repo:objectstack#6 · head ebfed887651cb79a2a67aed07faf6337e3e7574c

L1 by the seat, read against GitHub at 2026-11-21T16:41Z (not against the report's account).

  • Shape: one PR, Fixes #35907 and Fixes #34214 line-initial, one commit per card (390ddd6, ebfed88), one changeset; Clause-②: no / Metadata-protocol: none line-initial in body and changeset. 6 files, +222 / −24.
  • Premises, measured: Scenario scorer: an 'applied' operation reached through the gated action and refused with 428 no_confirmation_service should grade not measured, not fail #35907 — the no-service check sat only in the confirmation-turn branch; now observeOperation records metNoConfirmationService and gradeOperation's applied branch marks the operation not measured (noConfirmationServiceOnGate), the same path as buildDeniesWrite. qa scenarios: observe.ts rule 1 grades a pending_confirmation hand-off as applied #34214 — rule 1 no longer counts handedOff (a non-failed run_action answer whose status is pending_confirmation); rows changed still read applied (the card's CONTROL). Both read in the diff.
  • Gates: 49 check-runs on this head, 33 success, 16 skipped, 0 failed. check-governed-merges.mjs --pr 36140: NOT governed, 246 lines. landing-k.mjs: K = 3 < 15.
  • Accepted deviations: pins are top-level describes in test/runner/units.test.ts, not per-card files (AGENTS.md shared-harness rule, ruling record 6583487846, outranks the dispatch); qa scenarios: observe.ts rule 1 grades a pending_confirmation hand-off as applied #34214's "before rule 1" read as rows-changed outranks the hand-off, which keeps the card's own CONTROL; the moved predicate is exported from observe.ts (re-exported by ./runner), typed against the contract's closed reason list.
  • Out of scope: the dev's note (an applied operation routed through the gated action on a host WITH the service now reads pending_confirmation, same fail verdict, clearer reason): noted, not filed — no card asks for a different grade there.
  • L2: none owed — no contract face (packages/qa/scenarios/**, Clause-②: no, no packages/spec/src/**, not governed).
  • Landing: non-governed, Tier S path: ready + auto-merge by this seat.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 16:42
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 0db6f8f Nov 21, 2026
50 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35907-scenario-confirmation-grading branch November 21, 2026 17:06
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…sh (objectstack-ai#36320)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9JpRoUZGqtwqMU5k7b4C58D)_
Part of objectstack-ai#36206 (items 1, 4, 5, 6, 7, 8 and the operand-shown half of
item 2 land here; item 3 and the column-total half of item 2 wait on a
decision, see Acceptance notes).

Clause-②: yes (widening) — new exports
`confirmTurnMetNoConfirmationService` and `SEED_POSTURE` on the
`./runner` entry
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:评测席位跑场景卡时,三类本不该扣的分不再扣,四张卡的数据和提示词更正,其余用户无感。
- 为什么做:场景库专题(画廊刷新)中,模型做对了却被判错或被判"无法测量",分数里混进了评分器和卡片自己的错。
- 出错会怎样:最坏是某次评测把一个本该判错的回答判成"未测"或判对,只影响评测分数,改动可直接撤回。
- 要你做什么:审批步骤走卡片自带动作时是否算作有效授权,以及拒答里能否写出某一列的合计,两件需要你拍板。

## What changes

One commit per item; each conclusion below is against `origin/main`
4ab1218.

| Item | Conclusion |
|:--|:--|
| 1. confirm turn after a first-turn `428 no_confirmation_service` |
**changed** — `confirmTurnMetNoConfirmationService`
(`src/runner/orchestrate.ts`): the confirmed write is not measured when
the confirm turn's own write met that 428 (as before) OR the first
turn's write met it and the confirm turn sent no write on the object. A
confirm turn that does write is graded as any other. PR objectstack-ai#36140 (merged
for objectstack-ai#35907) covered only the first leg: its diff marks not-measured from
`writeCallsOn(second, ...)` alone. |
| 2. decline graded "a figure the data cannot support" for derived
numbers | **changed, half** — `supportedNumbers`
(`src/score/scenario-run-grade.ts`): a number in an `unanswerable`
decline is supported when it is the sum or difference of two OTHER
numbers the reply writes that the turn's outputs carry (54.5 = 45.5 + 9;
229 = 249 - 20). Operands must stand in the reply, one step only, a zero
from two equal figures supports nothing. The column-total half
($125,190) is **not** changed: it contradicts a pinned case in the same
suite ("an amount summed from the rows still fails: a sum is not a
count"), so it is an open question. |
| 3. `persona-grant:dept_manager:*_approval_step:update` vs the card's
own `decide_approval_step` | **not changed — needs a decision.** The
check treats only a card action with `confirm: true` as a designed
route; the suite pins the opposite case on purpose ("The card's action
without `confirm` is no designed route: the check is measured", and
`start_qa` stays measured beside `set_task_status`). Accepting
`decide_approval_step` reverses that pin. |
| 4. requisition_to_receipt `supplier.rating` seeded `A`/`B`/`C` |
**changed** — seeded `grade_a`/`grade_b`/`grade_c` (no truth reads the
field). New library guard: every seed value of a card's `selectFields`
field parses as a `SelectOptionSchema` value. |
| 5. travel_expense `as_118_2.decided_on` after `asOf` | **changed** —
`2026-11-02` to `2026-10-31` (no truth reads step dates). New library
guard: per card, the seed fields dated after `asOf` are pinned (all are
plans: due, start, end, expected). |
| 6. service_desk `urgent_high_last_30_days` off by one | **changed
(card data)** — TK-0091 and its three comments move one day later, so no
urgent or high ticket sits on 2026-10-01, the day the platform's
`last_30_days` preset (`['30_days_ago', 'tomorrow')`,
`packages/core/src/utils/analytics-date-range.ts`) counts and the card's
30-day window does not; truth 8 to 9, seed rule `$comment` names the
exception. The card's `last_days` semantics are untouched. New library
guard: no `last_days` truth changes when its window is widened by the
preset's extra day. |
| 7. service_desk Build two checks short | **changed** — the detailed
prompt (en + zh) now asks for a report of tickets by agent group and
priority, and names a computed value (days to resolve, from the opened
and resolved dates). New library guard: every card tagged
`dashboards.report` asks for a report in both languages. |
| 8. data contract says rows load "through the data API" | **changed
(contract text only)** — `SEED_POSTURE` in `src/runner/prompts.ts`: rows
load through the platform's seed path as established facts, no
record-triggered flow fires, so a derived field must be a formula or a
write-time expression; a loaded row is already counted in stored totals.
Seeding behaviour is unchanged. |

Read first (by risk): `src/score/scenario-run-grade.ts`
`supportedNumbers` (the grader widening), `src/runner/orchestrate.ts`
`confirmTurnMetNoConfirmationService`,
`docs/qa/scenarios/service_desk.json` (seed move + prompt).

Two-minute check: `pnpm --filter @objectstack/scenarios exec vitest run
--maxWorkers=2 test/library.test.ts` shows 19 passed, including the four
new guards.

## Tests

- New: item 1, three cases in `test/runner/orchestrate.test.ts`
(first-turn 428 + no write: not measured; + a write: graded;
other-reason 428 + no write: measured fail). Item 2, five cases in
`test/score/scenario-run-grade.test.ts`. Items 4-7, four guards in
`test/library.test.ts`. Item 8, one case in `test/runner/units.test.ts`.
Item 6, the service_desk truth pin 8 to 9.
- Whole package at the final head: `typecheck` clean, `test` 42/42 files
and 1293 tests passing across two runs (the first run's 14 skips are the
two build files' tests, which pass once the package is built) — see
Verification.

## Acceptance notes

- **Item 2, column totals (open question).** Options: (A) accept a
whole-column sum of one returned list as served, and rewrite the pinned
"a sum is not a count" case; (B) keep it refused and have the cards say
a decline may only quote figures as served; (C) leave both. The recorded
replies are not in the repository, so whether the three flagged replies
wrote their operands (and so pass under this change) is NOT MEASURED;
the tests use replies modeled on the card's description.
- **Item 3 (open question).** Options: (A) any card-declared agent
action on the object routes an `applied` write too (reverses the pinned
`confirm`-only rule); (B) keep the rule, and the leave_balances /
requisition_to_receipt prompts tell the build to grant the manager
`update` on `approval_step`; (C) a card-schema opt-in naming the
operation's route action, so only operations the card designs through an
action leave the check to the run.
- **Same family as item 6, outside this card's files:** order_to_cash
`collected_by_team_last_30_days` has PAY-0044 on 2026-10-01. The new
guard enumerates it as the one remaining position, so fixing it turns
that pin red by design.

## Verification

<details><summary>Item 1 ablation (orchestrate.ts, fix committed
first)</summary>

`node scripts/ablation-replace.mjs --file
packages/qa/scenarios/src/runner/orchestrate.ts --anchor ' || (firstMet
&& writes.length === 0)' --delete -- ... vitest run
test/runner/orchestrate.test.ts -t 'two turns'`: mutation landed (anchor
1 to 0, blob f58c077 to c72e3bd35891); the new not-measured case
failed (1 failed, 14 passed); restored, blob == HEAD, `git diff HEAD`
empty.
</details>

<details><summary>Item 2 ablation (scenario-run-grade.ts)</summary>

First attempt was a no-op refused by the tool (replacement text was a
substring of the anchor, rise 0); rerun with `--anchor ' ||
values.some((n) => derived(n, at))' --delete`: mutation landed (blob
9a3cb9e to 78d0020365c7); the sum and difference cases failed (2
failed, 3 passed); restored, blob == HEAD, `git diff HEAD` empty.
</details>

<details><summary>Items 4-6 reverse verification (base card
data)</summary>

With the three cards restored from 4ab1218 (tree only),
`test/library.test.ts`: 3 failed, 15 passed — the select-value guard
listed six `supplier.rating` values, the asOf guard and the window guard
(`service_desk/urgent_high_last_30_days`) went red; `git checkout HEAD
-- docs/qa/scenarios/` then `git diff HEAD` empty and status clean.
</details>

<details><summary>Package suite and derived gates at c621cbb</summary>

- `pnpm --filter @objectstack/scenarios typecheck`: clean. `pnpm
--filter @objectstack/scenarios test`: 40/42 files on the first run, the
two `test/build/*` files refusing for a missing own `dist/`; after `pnpm
--filter @objectstack/scenarios build` both pass (2/2 files, 14 tests).
Total 42/42 files, 1279 + 14 = 1293 tests passed.
- `node scripts/pm/dispatch-gates.mjs --commands` derived 69 commands;
all run, exit codes captured before any pipe; `--ran` reconciliation: 69
accounted, 67 run, 2 NOT MEASURED (exit 3, prerequisite):
`check-plugin-teardown-shape.mjs --self-test` (positive control pinned
to a commit this shallow checkout cannot reach) and
`check:dual-build-cjs-loads` (needs every package's `dist/`). Both are
left to CI.
- `test:repo` and the full lint farm are CI's.

```text
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-adr-links.mjs :: exit 0
node scripts/check-adr-links.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: 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-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.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 3
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/ci/snapshot-next.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/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm --filter @objectstack/spec run check:error-code-provenance :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:changeset-gate-self-tests :: 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:dispatcher-error-vocabulary :: 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 3
pnpm check:engine-double-contract :: 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:object-def-param-keys :: exit 0
pnpm check:objectql-double-limit :: exit 0
pnpm check:optional-error-sink :: exit 0
pnpm check:org-identifier :: exit 0
pnpm check:page-declaration-shape :: exit 0
pnpm check:platform-object-tenancy-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: 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:settings-bind-window :: 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: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 by [Claude
Code](https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY)_

<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmRY38EZf38Yy3zthbY -->

---------

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/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants