Repository navigation
fix(scenarios): an ISO date written with a Unicode hyphen states no figure - #37624
Conversation
…igure The run grader blanked ISO dates before reading a reply's figures, but its pattern matched only the ASCII hyphen. A decline that wrote 2026-09-01 with U+2011 non-breaking hyphens had 2026, 9 and 1 read as unsupported figures. Claude-Session: https://claude.ai/code/session_01L6bhgTESANUPsJKDqEn4zY Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 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
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 21060bfeb4d2c7a30ff68dd69b8aabe692b3fc29 && git checkout 21060bfeb4d2c7a30ff68dd69b8aabe692b3fc29
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 54d6726c09019bd1d9da29b7aee3fb9e907dbb0a 0eb6af38342b9c907f20b30af03c48ddbf8214c6 && git checkout -B drift-repro 54d6726c09019bd1d9da29b7aee3fb9e907dbb0a && git merge --no-ff 0eb6af38342b9c907f20b30af03c48ddbf8214c6
node scripts/docs-audit/affected-docs.mjs --json 54d6726c09019bd1d9da29b7aee3fb9e907dbb0a |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 0eb6af3 · card #36206 · area s2-eval · 2026-11-26T16:26ZL1 checklist
Tier: S. Landing: ready + auto-merge by this stroke. |
Requested by Sales · project thread
Part of #36206
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/qa/scenarios/src/score/scenario-run-grade.ts:ISO_DATE, the patternreadingsInblanks 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 as2026-U+2011-09-U+2011-01was read as the figures 2026, 9 and 1.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.@objectstack/scenariospatch.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-01with U+2011 non-breaking hyphens, soISO_DATEmissed 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 atorigin/main54d6726 (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 #36320; item 3 and PAY-0044 in #36503 and #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
Package suite, typecheck, ablation (head 0eb6af3)
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).scripts/ablation-replace.mjs, the test importssrcby relative path, so no dist leg):ISO_DATE's two hyphen classes put back to the ASCII-, anchor 1 → 0, blob1854ffadf399→1ed8647e5c30;test/score/scenario-run-grade.test.ts: 1 failed | 88 passed, the failing case being the new pin; restored blob1854ffadf399equals HEAD,git diff HEADempty. 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.Acceptance notes
IDENTIFIER_TOKENstill 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.viaon the two same-shaped decide operations (asset_lifecyclemanager_approves_scrap, order_to_cashapprove_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).Verification
pnpm --filter @objectstack/scenarios exec vitest run test/score/scenario-run-grade.test.ts -t "Unicode hyphen"→ 1 passed.ISO_DATEline inscenario-run-grade.ts(the only behaviour change).Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (CI)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code