Skip to content

feat(scenarios): a card names the agent action an operation goes through (via) - #36503

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36206-decide-through-action
Nov 22, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36206-decide-through-action

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Part of #36206 (item 3 and the PAY-0044 position land here; the column-total half of item 2 waits on the eval seat's re-score and stays open on the card).

Clause-②: yes (widening)
Metadata-protocol: none
Ruling-ref: 7077801044 (item 3 C, PAY-0044 folded)

维护者速读

  • 用户能看到什么变化:评测席位跑场景卡时,经理通过卡片自带的审批动作做决定的那一步,搭建分不再因经理没有直接改审批记录的权限而被扣,改记为“未测”;其余用户无感。
  • 为什么做:场景库专题(画廊刷新)里请假余额和采购到收货两张卡,搭建正确却被扣分;顺带修正订单到回款卡上一笔付款落在“近 30 天”边界日、导致卡片答案与平台口径不一致的问题。
  • 出错会怎样:最坏是某张卡的这一项授权检查被记为“未测”而不是“失败”,只影响评测分数,改动可直接撤回。
  • 要你做什么:无。

What changes

Against origin/main 59392ed.

Part Change
Card schema An operation may carry via: the card's own agent action the write is designed to go through. Optional; a card without it reads exactly as before.
Loader Refuses a via that is not one of the card's run.agentActions on the operation's object (the ruled check), and a via on a refused operation (a refused write has no route; without this the key would be accepted and do nothing).
Grant grading (gradePersonaGrants) persona-grant:PERSONA:OBJECT:VERB is not measured, never a pass, when the set withholds the verb AND every operation that needs it has a designed route the build declares: its via action, or (unchanged) the card's confirm-gated action for a pending_confirmation write. A set that grants the verb still passes. An operation without via is graded as today, so one unrouted applied write of the same verb keeps the check measured. The existing confirm-gated branch and its detail text are unchanged; the no designed route pin (start_qa, non-confirm action, no via) stays green.
Cards via: decide_approval_step on leave_balances manager_approves_step_one, requisition_to_receipt manager_approves_level_one and travel_expense manager_approves_step_one. Not tagged (no measured run yet): asset_lifecycle manager_approves_scrap, order_to_cash approve_discount. A library pin lists exactly the three tagged operations.
PAY-0044 order_to_cash's PAY-0044 moves from 2026-10-01 to 2026-10-02 (bank reference ACH-1002-058), the same one-day move PR #36320 gave TK-0091, and the seed rule names the exception. The library pin of last-N-days truths that change under the platform's preset flips to []. collected_by_team_last_30_days west becomes 58300 (was 53500; the payment now falls inside the card's 30-day window too). The only other reader of payment_date is the collection-call automation check (paid by due + 15 days), which reads the same for INV-1058 either way.

Clause-②: yes (widening) reading: src/index.ts does export * from './schema.js', so OperationSchema and ScenarioCardSchema are on the package's . entry (package.json exports["."] maps to dist/index.*); PersonaGrantNeed (gains routedVia) is on ./score via export * from './scenario-tags.js'.

Read first (by risk):

  1. packages/qa/scenarios/src/score/scenario-tags.ts: designedRoutes and the new branch at the top of gradePersonaGrants's needed path; the old confirm branch must read unchanged when no operation names via.
  2. packages/qa/scenarios/src/loader.ts: the via block in the operations loop.
  3. docs/qa/scenarios/order_to_cash.json: PAY-0044 row and the seed-rule sentence.

Two-minute check: pnpm --filter @objectstack/scenarios exec vitest run test/score/scenario-tags.test.ts test/refusals.test.ts test/library.test.ts, expect all green, including the new an applied write the card routes through its own action case.

Tests

  • New scenario-tags.test.ts case: with the read-only contractor and start_qa routed via set_task_status, the update check is not measured with the named detail and counts in neither figure; a granting set still passes; a build without the action keeps it measured (fails); the card without via fails as before; a second unrouted update keeps it measured.
  • Three new refusals.test.ts rows: an undeclared action, the card's action on another object, a via on a refused write.
  • library.test.ts: the tagged-operations pin; the last-N-days pin flipped to [].
  • order-to-cash.test.ts: the collected_by_team_last_30_days truth updated to west 58300.
Package suite and typecheck (head bb187ca, merged main)
pnpm --filter @objectstack/scenarios typecheck && pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2
 Test Files  42 passed (42)
      Tests  1310 passed (1310)
os-verify-lock: VERDICT command-exit 0

The package's typecheck includes test/**. The commit after that one adds only the changeset.

Ablations (one-time, restored to HEAD; not left in the tree)
grading: scenario-tags.ts `const via = n.routedVia.filter(...)` -> `const via: string[] = [];`
  ablation-replace: ok mutation landed: anchor 1 -> 0, blob 7ae784e8e520 -> 77cf0c9a74ac
  x an applied write the card routes through its own action (`via`) ...
  Tests  1 failed | 101 passed (102)   (the confirm-gated / no-designed-route pin stays green)
  ablation-replace: ok restored: blob == HEAD (7ae784e8e520) and `git diff HEAD` is empty
loader: `if (op.via !== undefined) {` -> `if (op.via !== undefined && false) {`
  ablation-replace: ok mutation landed: anchor 1 -> 0, blob 2d93286d3d0b -> 8a1456983646
  Tests  3 failed | 118 passed (121)   (the three new refusal rows)
  ablation-replace: ok restored: blob == HEAD (2d93286d3d0b) and `git diff HEAD` is empty

Both subjects resolve from src/ (relative imports), so no rebuild sat between mutation and run.

Derived gate families (head 8eb5896): 68 derived, 66 exit 0, 2 NOT MEASURED

node scripts/pm/dispatch-gates.mjs --commands (merge base 59392ed), each run with its exit captured before any pipe, then --ran with the codes: "68 derived famil(ies) accounted for — 66 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".

  • NOT MEASURED: pnpm check:dual-build-cjs-loads, reason: PREREQUISITE NOT MET (reads built output of every package; this worktree built only the scenarios closure). CI's Lint & Repo Gates runs it.
  • NOT MEASURED: pnpm check:type-check-debt, reason: its closure build never got a turn on the shared verify lock (queue-timeout, held by another session's dogfood run). The diff touches no tsconfig or typecheck script; the scenarios package typecheck is green above. CI's Lint & Repo Gates runs it.
  • Every other derived family exited 0, including check:nul-bytes, check:cross-package-test-inputs, check:published-files, check:doc-authoring, check:issue-citations and check:adr-0087-registration.
  • Full dogfood battery: not run (no ! in the title, no (narrowing) arm).

Acceptance notes

  • The loader's refusal of via on a refused operation goes one step past the ruled text (which names only the not-an-action refusal). Reason: grading reads via only on writes that need a grant, so on a refused write the key would be accepted and ignored. It is a refusal on a key that is new in this PR; no card writes it.
  • Not tagged, by the ruling: asset_lifecycle manager_approves_scrap (decide_scrap_request) and order_to_cash approve_discount (decide_discount_approval) have the same decide-through-action shape, but no measured run shows the grant check failing there yet.
  • Item 2b (a decline stating a whole-column total) is not in this PR; it waits on the eval seat's re-score of september_commission.

Verification

Item 3 is graded on the next gallery refresh: leave_balances and requisition_to_receipt Build and Iterate should read persona-grant:dept_manager:approval_step:update as not measured when the build routes the decision through decide_approval_step without granting the update, and as passed when it grants it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY

…ugh (via)

The Build grant check leaves a write the persona's set withholds to the run,
never a pass, when the operation names the card's agent action as its route
and the build declares that action. The loader refuses a via that is not one
of the card's agent actions on the operation's object, and a via on a refused
write. leave_balances, requisition_to_receipt and travel_expense name
decide_approval_step on the manager's approval. PAY-0044 moves off 2026-10-01
so the card's last-30-days window and the platform's preset agree.

Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY
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 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

9 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 68 of 251 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 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; 124 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 9abc732132a2f723627d585b049e2cc10869db19 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 54a1b42b0d9830d60758381ecf978b8b6485d29d — the merge of head 8eb5896ba5786b2c104de77c70291760f5608875 into base 9abc732132a2f723627d585b049e2cc10869db19, 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 54a1b42b0d9830d60758381ecf978b8b6485d29d && git checkout 54a1b42b0d9830d60758381ecf978b8b6485d29d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9abc732132a2f723627d585b049e2cc10869db19 8eb5896ba5786b2c104de77c70291760f5608875 && git checkout -B drift-repro 9abc732132a2f723627d585b049e2cc10869db19 && git merge --no-ff 8eb5896ba5786b2c104de77c70291760f5608875

node scripts/docs-audit/affected-docs.mjs --json 9abc732132a2f723627d585b049e2cc10869db19

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

Contract-review-claim: session_01ADHkmRY38EZf38Yy3zthbY · head 8eb5896ba5786b2c104de77c70291760f5608875 · 2026-11-22T15:17Z

Taking the review (declaration face, TIER_DEFAULT; returned to the lane by l2-review#4).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 8eb5896ba5786b2c104de77c70291760f5608875
Local-runs: none

Face: declaration (Clause-②: yes (widening) on the PR body and changeset; no packages/spec/src path, no governed path; l2-review#4 returned it to the lane). Read: the diff at this head, card #36206 with ruling 7077801044, and the head's check-runs.

① Derived judgments

  • Additive only. OperationSchema.via is .optional(). PersonaGrantNeed.routedVia is an output field that only personaGrantNeeds fills. In gradePersonaGrants, designedRoutes returns a route set only when the verb is withheld and not read. The new not-measured branch fires only when some route carries a via. With no via anywhere, routes[0].confirm reproduces the old onlyAwaiting + confirmGatedRoutes result exactly: a defined route set with no via means every operation is pending_confirmation, and every one carries the same confirm list. The test pins hold this: without via the shipped card stays measured and fails; a set that grants the verb still passes; the build missing the named action is measured and fails.
  • All-operations bar in designedRoutes: correct, keep. A partial route set would let one routed write excuse an unrouted write of the same persona × object × verb. That write must hold the grant, so the check has to stay measured. The MIXED case (start_qa_again) pins it: measured, fails.
  • Loader refusal of via on a refused write: keep. Grading never reads via on a refused operation (personaGrantNeeds records routedVia only on applied or pending writes). Accepting the key there would let an author state a route that nothing honours. It is a narrowing of what the loader accepts only for a key this same PR introduces, so nothing already authored can trip it. The refusal row pins it.
  • via bound to run.agentActions on the operation's object. The loader enforces it, and two refusal rows pin it (an undeclared action; the card's action on another object). The grader also requires the build to declare the action (buildDeclaresAction), so a card-side via alone never removes a check.
  • Ruled scope. The three tagged operations (leave_balances and travel_expense manager_approves_step_one; requisition_to_receipt manager_approves_level_one) are exactly ruling C plus the travel_expense addition. The library test pins that set. asset_lifecycle manager_approves_scrap and order_to_cash approve_discount stay untagged with no measured run, as the dispatch order said; the test comment names them.
  • PAY-0044. 2026-10-01 → 2026-10-02 is the same one-day move as TK-0091 in fix(scenarios): scorer and card defects from the 18.6.0 gallery refresh #36320. The seed $comment now states the exception, so the truth can still be worked by hand. West collected_by_team_last_30_days 53500 → 58300 is a10's +4800, PAY-0044's amount. The library last-N-days ambiguity pin goes to []. The bank reference follows the date (ACH-1002-058).

② Semver level

patch for @objectstack/scenarios. It is a private, unpublished devx package (CHANGELOG 18.4.0), and its earlier optional-key widenings (GuardrailSchema.forbids, ScenarioCardSchema.workingDays) shipped as patch under the same Clause-②: yes (widening) line. AGENTS.md: a changed package takes a patch changeset. Correct.

③ Boundary flags

  • Dev deviation 1 (Clause-② measured yes (widening) against the claim's no): accepted. src/index.ts re-exports schema.js on .. Declared on the PR body and the changeset.
  • Dev deviation 2 (refused + via): kept, see ①.
  • Dev deviation 3 (main merged in, closure rebuilt, suite rerun at bb187ca): fine. The only later commit is the changeset.
  • Dev deviation 5 (check:dual-build-cjs-loads, check:type-check-debt NOT MEASURED locally, exit 3): CI runs both on this head. The seat's L1 lands only on all-green check-runs.
  • Out-of-scope finding (asset_lifecycle / order_to_cash decide-through-action shape): stays on the card as a carrier note, per the ruling. No card is filed.
  • open_questions: none.
  • SQL push-down: n/a. The diff is grader and loader logic over in-memory card and build facts, with no query path and no id materialisation.

Implemented-by: claude/issue-36206-decide-through-action
Reviewed-by: session_01ADHkmRY38EZf38Yy3zthbY

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

席位核对

L1 verdict: ACCEPT at head 8eb5896ba5 (seat repo:objectstack#2, reviewer of record).

  • Shape: draft → main. First line Part of #36206 (item 3 per ruling C, 7077801044, plus the travel_expense tag and PAY-0044 folded in). No closing keyword: item 2b stays open on the card, gated on the eval seat's re-score. Clause-②: yes (widening) · Metadata-protocol: none, line-initial in body and changeset. l1-face.mjs CLEAN, 13 items.
  • Contract review: owed on the yes (widening) declaration alone; no packages/spec/src path, no governed path. l2-review#4 returned it to the lane. The seat reviewed it at TIER_DEFAULT: PASS at this head, comment 7081203437. That record answers the dev's deviations (refused-via refusal kept; all-operations bar in designedRoutes kept).
  • Premise measured: two ablations by the dev, each restored to HEAD (blob equal, empty diff).
    • Grader routedVia emptied: 1 failed / 101 passed; the new via case goes red, and the no-designed-route pin stays green.
    • Loader via branch disabled: 3 failed / 118 passed; these are the three new refusal rows.
    • Package suite at bb187ca (main merged): 1310/1310.
  • Gates: check-runs at 8eb5896ba5: 35 success · 16 expected skip · 0 failed · 0 pending. Local: 68 derived, 66 run with exit 0, 2 NOT MEASURED by exit 3 (check:dual-build-cjs-loads, check:type-check-debt); both are green in CI at this head. landing-k K = 5 (< 15).
  • Changeset read sentence by sentence: .changeset/36206-decide-through-action.md. The via key and its loader refusals, the not-measured rule, the three tagged operations, and PAY-0044 on 2026-10-02 (west 58300) each match the diff.
  • Accepted deviations:
    • Clause-② measured yes (widening) against the claim's no (OperationSchema is on the . entry).
    • via is refused on a refused operation.
    • Main merged into the branch.
    • Commit trailers follow AGENTS.md's model-free pair.
  • Out of scope: asset_lifecycle manager_approves_scrap and order_to_cash approve_discount have the same decide-through-action shape but no measured run behind them. They stay untagged (carrier: #36206, noted on the card, not filed).
  • Landing: non-governed (packages/qa, docs/qa, .changeset), +145/−18 ⇒ the seat lands it with pr_ready + auto-merge. Scenario scorer and card defects from the 18.6.0 gallery refresh (2026-11-21) #36206 stays open (Part of) for item 2b.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 22, 2026 15:41
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 36873ee Nov 22, 2026
52 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36206-decide-through-action branch November 22, 2026 16:30
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
…igure (objectstack-ai#37624)

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

Part of objectstack-ai#36206

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户无感:评测场景卡的评分器不再把回复里用排版连字符写的日期(如 2026‑09‑01)当成三个数字扣分,普通短横写法不变。
- 属于「评测与场景卡」专题,修画廊重跑里报出的一处误判:正确的拒答被判成「说了数据支撑不了的数」。
- 只影响评测打分,不碰平台运行时;出错最多是某轮评测分数读偏,撤回这个 PR 即恢复原样。
- 无。

## What changes

- `packages/qa/scenarios/src/score/scenario-run-grade.ts`: `ISO_DATE`,
the pattern `readingsIn` blanks before it reads a reply's figures, now
joins a date's parts by the ASCII hyphen or by the two Unicode hyphens a
typeset reply writes in its place (U+2010 hyphen, U+2011 non-breaking
hyphen). Before, only the ASCII hyphen matched, so a date written as
`2026`-U+2011-`09`-U+2011-`01` was read as the figures 2026, 9 and 1.
- One pin in the existing ISO-date block of
`test/score/scenario-run-grade.test.ts`: both hyphens read as a date,
and a figure range joined by U+2011 (`12`-U+2011-`15`) still reads as
two figures.
- One changeset, `@objectstack/scenarios` patch.

## Why

The 18.6.0 gallery re-run comment on the card (2026-11-22 22:56Z, item
2b evidence, "Minor") reports a reply that wrote `2026-09-01` with
U+2011 non-breaking hyphens, so `ISO_DATE` missed it and 9, 1 and 30
were read as figures. A correct decline is then graded "stated a figure
the data cannot support". The premise held at `origin/main` 54d6726
(`scenario-run-grade.ts:123`, pattern ASCII hyphen only).

Every other item of the card landed earlier: items 1, 2 (operands shown)
and 4-8 in objectstack-ai#36320; item 3 and PAY-0044 in objectstack-ai#36503 and objectstack-ai#37047; item 2b is
answered by the maintainer ruling recorded on the card (read C, no
grader change). This PR widens no total and does not touch that ruling:
it only keeps a date from being read as figures.

## Tests

<details><summary>Package suite, typecheck, ablation (head
0eb6af3)</summary>

- Through `os-verify-lock`: `pnpm --filter @objectstack/scenarios build
&& … typecheck && … exec vitest run --maxWorkers=2` → `VERDICT
command-exit 0`; Test Files 43 passed (43), Tests 1345 passed (1345).
- Ablation (`scripts/ablation-replace.mjs`, the test imports `src` by
relative path, so no dist leg): `ISO_DATE`'s two hyphen classes put back
to the ASCII `-`, anchor 1 → 0, blob `1854ffadf399` → `1ed8647e5c30`;
`test/score/scenario-run-grade.test.ts`: 1 failed | 88 passed, the
failing case being the new pin; restored blob `1854ffadf399` equals
HEAD, `git diff HEAD` empty. A first attempt was an anchor miss the tool
refused before running anything (the shell had turned the escape
spelling in the anchor into the characters), so it measured nothing; the
counted run built the anchor in a script.

</details>

## Acceptance notes

- `IDENTIFIER_TOKEN` still joins an identifier's parts by the ASCII `-`
and `_` only, so an id written with U+2011 (`INV`-U+2011-`003`) would
read its digits as a figure. No run has shown it; noted, not changed.
- The other observations on the card's re-run comments stay as they are,
with zero measured pull: the `via` on the two same-shaped decide
operations (asset_lifecycle `manager_approves_scrap`, order_to_cash
`approve_discount`), the asset_lifecycle 23/6 count (the card holds no
second source: its 30 laptops are 24 in use, 5 in stock, 1 in repair),
and per-group totals (the ruling refuses that widening).
- The card's done-when is a gallery re-run on 18.6.0, which belongs to
the eval lane; this PR does not close the card.

## Verification

- Two minutes: `pnpm --filter @objectstack/scenarios exec vitest run
test/score/scenario-run-grade.test.ts -t "Unicode hyphen"` → 1 passed.
- Read first: the `ISO_DATE` line in `scenario-run-grade.ts` (the only
behaviour change).

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind. (no new names)
- [x] 3. No formatter ran; `pnpm lint` passes. (CI)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgTESANUPsJKDqEn4zY)_

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

Development

Successfully merging this pull request may close these issues.

2 participants