Skip to content

fix(scenarios): an ISO date written with a Unicode hyphen states no figure - #37624

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-s1dgpq
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-s1dgpq

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Part of #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 #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)
  • 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.

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

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

Generated by Claude Code

…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>
@github-actions github-actions Bot added size/s 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 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 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): node scripts/docs-audit/affected-docs.mjs --json 54d6726c09019bd1d9da29b7aee3fb9e907dbb0a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 21060bfeb4d2c7a30ff68dd69b8aabe692b3fc29 — the merge of head 0eb6af38342b9c907f20b30af03c48ddbf8214c6 into base 54d6726c09019bd1d9da29b7aee3fb9e907dbb0a, 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 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

⚠️ 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-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head 0eb6af3 · card #36206 · area s2-eval · 2026-11-26T16:26Z

L1 checklist

  • Shape and relation: l1-face.mjs --pr 37624 CLEAN on 13 items. At 0eb6af3 there are 33 success, 16 expected skips, 0 failed and 0 pending, and mergeable_state is clean. 3 files, +22/-1, not governed.
  • Part of #36206 is right. The card's done-when is the 18.6.0 gallery re-run, which belongs to the eval line, so this PR does not close the card, and the card keeps pm:dispatched (landing rule B).
  • Scope, read in the diff: ISO_DATE in scenario-run-grade.ts now joins the year, month and day by -, U+2010 or U+2011. The time and offset tails are unchanged, and the docblock says why. The new pin covers both Unicode hyphens as a date, plus a figure range joined by U+2011 that still reads as figures (12-U+2011-15 cannot match the 4-2-2 shape).
  • Evidence: the package suite passed through os-verify-lock (43 files, 1345 tests). In the ablation, putting the ASCII-only class back turns the new pin red (1 failed, 88 passed), and the restored blob equals HEAD.
  • Sentence-by-sentence read of the changeset (@objectstack/scenarios patch): it matches the diff.
  • The Acceptance notes (IDENTIFIER_TOKEN, the two via items, the 23/6 count, per-group totals) are noted with no measured pull and need no card.
  • No contract face is hit (Clause-②: no, Metadata-protocol: none), so no L2 is owed.

Tier: S. Landing: ready + auto-merge by this stroke.

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/s 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