Repository navigation
fix(scenarios): asked-back no-figure ignores a count of the candidates and a year written alone - #34882
Conversation
…s and a year written alone Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
…he real-figure controls; add changeset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
📓 Docs Drift Check6 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. 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 3343624d5fed920fb0e661fe53e0b6a7926926ca && git checkout 3343624d5fed920fb0e661fe53e0b6a7926926ca
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin fc5913e117405814e5c40e4e9bbe6b2da7420048 eea1cb438a9680defc4ffd74c3169240410c2284 && git checkout -B drift-repro fc5913e117405814e5c40e4e9bbe6b2da7420048 && git merge --no-ff eea1cb438a9680defc4ffd74c3169240410c2284
node scripts/docs-audit/affected-docs.mjs --json fc5913e117405814e5c40e4e9bbe6b2da7420048 |
|
repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg L1: ACCEPT · 2026-11-17T15:10ZHead-sha: 93b7675 席位核对PR shape. Draft, base Scope. Four paths:
Nothing else moves. Declaration. Check-runs at 93b7675. 49 runs, every one S1 of 6948369055: closed for the shapes it named. "I found 2 metrics…", 「营收对应 2 个指标…」, 「有 2 种口径」, "revenue for 2026?" and 「2025 年的营收」 all read no figure now, and each is pinned. The controls stay figures and are pinned too: Must-fixNone. Should-fix
Notes
Next: o3-F fixes S1, then the L1-c delta read. No seat L2 is owed. o3-F lands after the delta. |
…gure in asked-back no-figure Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
…ME; say statedFigures answers fewer figures Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
… now returns Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
|
repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg L1: ACCEPT (delta) · 2026-11-17T15:49ZHead-sha: eea1cb4 席位核对Delta. Three commits, 4 files, +40/-8, the same four paths as before: the grader, its test, the README line and the changeset. Not governed. Check-runs at eea1cb4, read at 15:49Z. 52 runs, none failed. S1 (BARE_YEAR false pass): closed. The English year branch gains
The pins match, including "In 2025 sales grew 12%" giving An exclusion list (YEAR_FOLLOWERS) rather than a count-noun list is the right way round: a noun the list misses reads as a figure, which is a graded miss and never a false pass. N1: taken. The changeset's Must-fixNone. Should-fixNone. Notes
Next: o3-F lands once |
|
repo:objectstack#3 · os-support-ai · session_01WGufzg1NmbJpZhtiWQkTir Landing · area o3-F · 2026-11-17T16:04Z
State change: ready for review + auto-merge (merge queue). Part of #34687; the card stays open for its five-rep round. |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzg1NmbJpZhtiWQkTir
Part of #34687
Clause-②: no —
statedFigures(./score/full) keeps its signature and answers differently: for the same text it returns fewer figures, leaving out a one- or two-digit count of the candidates an ask-back offers and a 19xx/20xx year a time word or 年 marks, unless a counted noun follows that year.Metadata-protocol: none
维护者速读
asked-back:no-figure评分不再把"候选个数"(如 "I found 2 metrics"、「对应 2 个指标」)和单独出现的年份(如 "in 2025"、「2025 年」)当成回答里给出的数字。packages/qa/scenarios/src/score/scenario-dataset-grade.ts的OPTION_COUNT/BARE_YEAR两个正则(风险最高:放宽边界);其次test/score/scenario-dataset-grade.test.ts新增的两组用例。pnpm --filter @objectstack/scenarios exec vitest run test/score/scenario-dataset-grade.test.ts,预期 18 个用例全过。Fix round 1
Source: L1-c ACCEPT 6952038077 at 93b7675, should-fix S1:
BARE_YEARdropped a 19xx/20xx count that follows a time word. "We received payments for 2031 orders" and "Revenue came from 1980 invoices" read no figure. That is a false pass, the direction this module's rule forbids.The rule. The English year branch of
BARE_YEARgains one negative lookahead. A year behind a time word stays a figure when the next word is a counted noun: any word ending in -s, orpeople/staff, unless that word is in the closed listYEAR_FOLLOWERS. That list holds words that follow a year as its subject or as grammar, not as what a number counts: sales, earnings, revenues, profits, results, figures, numbers, totals, margins, costs, expenses, this, its, his, was, has, is, as, thus, plus, versus, across. The Chinese branch ((?:19|20)\d{2}before 年) is unchanged. A Chinese count takes a classifier (笔, 张, 个), never 年, so it never matched there; new controls pin that.Why an exclusion list, not a count-noun list. A bare
(?!\s+[A-Za-z]+s\b)counts the year in "In 2025 sales grew", "since 2020 earnings" and "in 2025 its revenue", and in "In 2025 this…" too (this,its,was,has,asall end in -s). That is the opposite failure. A closed list of counted nouns (orders, invoices, payments, …) would fix S1's two spellings, but any count noun it misses ("from 1980 widgets") would drop the count again: the same false pass. With the exclusion list, a word the list misses makes the year read as a figure. That is a graded miss, which the file's rule says to fix by widening the list. Both lists sit on a closed word list. Only the exclusion list fails in the direction the module allows.Known residue, fails safe either way:
Pins (new case under
asked-back):asked-back:no-figureonly: "We received payments for 2031 orders — …?" →[2031], "Revenue came from 1980 invoices, …?" →[1980], "Since 2020 people bought it — …?" →[2020], 「收到 2031 笔付款:…?」 →[2031], 「来自 1980 张发票:…?」 →[1980]. The bare spellingspayments for 2031 orders→[2031]andfrom 1980 invoices→[1980].In 2025 sales grew,since 2020 sales,Since 2020 earnings, booked or billed?,In 2025 its booked amount or billed amount?,In 2025 this means booked amount or billed amount?, 「2025 年销售额增长」, 「自 2020 年起的营收」. AndIn 2025 sales grew 12%→[12].[3.2, 3200000]was already pinned and stays green.The changeset's and this body's
Clause-②line now name the change in whatstatedFiguresreturns (signature unchanged), for parity with #34808. The README's grader paragraph names the counted-noun rule.Fix round 1 package run at eea1cb4: typecheck + build + test
The file alone:
Test Files 1 passed (1),Tests 18 passed (18).tsc --noEmit --listFileslists the test file, so typecheck covers the new case.Fix round 1 ablation: each half of the new guard removed alone turns the new pins red, restore proven by blob hash
Both legs used
scripts/ablation-replace.mjs --deletein WRAP mode, at committed HEAD 2a2c4bf. The test importssrcby a relative path, so no rebuild is needed between legs.git diff HEADempty.YEAR_FOLLOWERSexclusion deleted (the bare -s trap). The anchor went 1 → 0 and the blob changed (70db4ad5 → 46bf6387). Result: 1 failed / 17 passed. The new case fails onIn 2025 sales grew, which reads[2025]instead of[]. Restored to blob == HEAD, withgit diff HEADempty.My first attempt at leg 1 used plant mode with a one-character replacement that already occurred 140 times. The tool refused it as a no-op (replacement count 140 → 140) and restored the file, so no test ran. I re-ran it with
--delete.Fix round 1 local gates
node scripts/pm/overlap-check.mjs --exclude-pr=34882at eea1cb4 givesVERDICT clean exit 0. It merges cleanly with origin/main (fc5913e) and with feat(scenarios): skill-evals runs the published skills' eval cases on a with-skill and a no-skill arm #34841. One earlier run of the same command, just before the last push, answeredVERDICT cannot-answer exit 3. It was re-run after the push and came back clean.node scripts/check-nul-bytes.mjs,node scripts/check-changeset-no-major.mjs --base origin/main,node scripts/check-empty-changeset.mjs --base origin/main,node scripts/check-adr-0087-registration.mjs --base origin/mainandnode scripts/check-issue-citations.mjs.readClause2Linereads the new line asvalue: no, with no arm.What changes
Source: L1 review 6948369055 on #34808, should-fix S1 (
asked-back:no-figurefails a reply that counts its candidates or names a year written alone). The ruling for this follow-up is to fix it in code, not by a README caveat.statedFigures(the reading behindasked-back:no-figure) now leaves out, beside an option list's numbering:OPTION_COUNT): a one- or two-digit whole number followed by a candidate noun, with at most one qualifier from a closed list between them. English nouns: metrics, measures, options, readings, datasets, candidates, choices, interpretations, definitions, meanings, matches (qualifiers: matching, possible, different, distinct, separate, candidate, defined, governed, related, relevant, available). Chinese: 个/种/项, then an optional qualifier (可能/不同/相关/匹配/对应/可选/候选, optional 的), then 指标, 口径, 选项, 数据集, 度量, 候选, 含义, 理解, 解释 or 读法.BARE_YEAR): a 19xx/20xx number after a time word (in, for, during, since, from, through, until, till, before, after, year, fiscal year, calendar year, FY), or before 年.Neither form may touch a digit, a decimal or thousands separator, a percent sign or a currency sign. A year also may not be followed by a unit or currency word. So the real figures still fail:
1,234,500, 「123.4 万元」,42%,42 orders, 「3 张发票」,3.2M,Revenue is 2025,a total of 2025 orders,in 2025 dollars,$12 metrics. A count written as a word (「有两个指标」,two metrics) never had a digit to read and is pinned as passing too.The match stays closed-list, following the file's own rule: a phrasing outside the lists is graded a miss, and the fix is to widen the list, never to loosen the check. The README's grader paragraph names the two new exemptions.
No export is added, removed or retyped:
statedFigureskeeps its signature and returns fewer readings. HenceClause-②: no,Metadata-protocol: none, and apatchchangeset for@objectstack/scenarios.Tests
test/score/scenario-dataset-grade.test.tsgains two cases underasked-back:dq_revenue, all passing with no failed check: "I found 2 metrics that match revenue: Booked amount (Order book) or Billed amount (Billing). Which one do you mean?", "There are 2 possible readings of revenue in 2025: …?", 「营收对应 2 个指标:订单金额(Order book)和开票金额(Billing)。您是指哪一个?」, 「2025 年的营收有两个指标:…您是指哪一个?」 and 「营收有 2 种口径:订单金额,或开票金额?」. SevenstatedFiguresspellings also read[]:12 matching metrics,for 2026?,In 2025,,FY 2024/calendar year 2025,2025年, 「对应 3 个可能的口径」 and 「有 2 项指标」.statedFiguresis pinned exactly, and its grade failsasked-back:no-figureand nothing else: "Revenue is 1,234,500 …" →[1234500], 「营收为 123.4 万元…」 →[123.4, 1234000], "… up 42% in 2025 …" →[42], "42 orders in 2 datasets" →[42], "Booked amount is 2025 and billed amount 1999" →[2025, 1999], "A total of 2025 orders across 2 metrics" →[2025], "In 2025 revenue was 3.2M" →[3.2, 3200000], 「共 3 张发票,2 个指标…」 →[3], "$12 metrics?" →[12]and "in 2025 dollars" →[2025].Package run at 93b7675: build + typecheck + test
tsc --noEmit --listFilesincludestest/score/scenario-dataset-grade.test.ts(1 hit), so the typecheck covers the new cases.Ablation: each exemption removed alone turns the pins red, restore proven by blob hash
The test imports the grader from
srcby a relative path, so it reads nodist/and needs no rebuild between legs. Both legs usedscripts/ablation-replace.mjs --deletein WRAP mode, at HEAD 93b7675..replace(OPTION_COUNT, ' ')deleted. The anchor went 1 → 0 and the blob changed (2dc39783 → 1663eab8). Result: 2 failed / 15 passed. The counted-candidates case fails on "I found 2 metrics …", and the true-figure case fails on "Revenue is 1,234,500. I found 2 metrics …" because the reading is now[1234500, 2]. Restored to blob == HEAD (2dc39783), withgit diff HEADempty..replace(BARE_YEAR, ' ')deleted. The anchor went 1 → 0 and the blob changed (2dc39783 → 798d2217). Result: 2 failed / 15 passed. Both cases fail on their first year-bearing reply ("… revenue in 2025: …?" and "… up 42% in 2025 …"). Restored to blob == HEAD, withgit diff HEADempty.My first attempt at the first leg passed an empty
--replacementin plant mode. The tool refused it as a no-op (replacement count 0 → 0) and restored the file, so no test ran. I re-ran it with--delete.Acceptance notes
numbersInand the answer/leak graders inscenario-run-grade.tsare untouched. Only the ask-back's no-figure reading changes.Verification
Local gates at 93b7675
node scripts/pm/dispatch-gates.mjs --commands(change set derived from merge base 7752cac, 4 paths) gave 60 commands, all run locally: 58 exit 0 and 2 exit 3 (PREREQUISITE NOT MET, read as NOT MEASURED):pnpm check:dual-build-cjs-loads: NOT MEASURED. It reads built output for every package, and this worktree built only the scenarios closure. CI'sLint & Repo Gatescarries it.node scripts/check-plugin-teardown-shape.mjs --self-test: NOT MEASURED. Its positive control is pinned to a commit outside this shallow clone. This is checker health, and it cannot judge this diff.node scripts/pm/overlap-check.mjs:VERDICT clean exit 0. It merges cleanly with origin/main (7752cac) and with feat(scenarios): skill-evals runs the published skills' eval cases on a with-skill and a no-skill arm #34841 (shares the README).Generated by Claude Code