Skip to content

fix(scenarios): asked-back:asks reads a request phrase after a clause mark - #35090

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-35058-asks-after-comma
Nov 18, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-35058-asks-after-comma

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread
Fixes #35058
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:场景评测 asked-back 的「是否在反问」检查(asked-back:asks)现在也认逗号、分号、冒号(全角半角都算)后面的请求短语,例如「我不替你选,请确认你要哪一个:」;asked-back 规则版本从 rev 2 升到 rev 3,记分卡显示 asked-back rev 3。
  • 为什么改:ask 技能迭代第 6 轮里,dq_travel_spend 第 3 次回答其实正确地反问了,却因为「请确认」跟在逗号后、又没有问号,被判成「没有问用户任何问题」,datasets 只拿到 24/25。
  • 风险与回滚:只影响评测打分(@objectstack/scenarios),不影响运行时。rev 2 与 rev 3 的轮次不能直接对比,记分卡上的版本号会区分它们。回滚即还原本 PR。
  • 先看:packages/qa/scenarios/src/score/scenario-dataset-grade.ts(REQUEST_PHRASE / ASKS 两处正则,以及 DATASET_GRADER_REVISIONS 改成 3)、packages/qa/scenarios/test/score/scenario-dataset-grade.test.ts(新的 asked-back:asks describe)。
  • 两分钟验证:pnpm --filter @objectstack/scenarios exec vitest run test/score/scenario-dataset-grade.test.ts,预期 26 个测试全过,其中包括第 6 轮第 3 次回答的原文。
  • 需要你做的:无,席位落地。

What changes

  • asked-back:asks (ASKS in scenario-dataset-grade.ts): a request phrase (please confirm / clarify / specify / tell me / let me know, could you clarify / confirm / specify, 请确认, 请说明, 请告诉我, 请明确, 您是指, 你是指) now asks when it opens a clause, after , , ; ; : :. Before, it counted only at the start of the text, a line, or a sentence (after . 。 ! !). The question-mark path and the phrase list did not change.
  • Why the anchor stays, and what it still protects. The anchor came in with the grader itself (feat(scenarios): an opt-in skills directory for ask turns, and dataset questions on two open cards #34808, "at a line's or sentence's start"). scenarios grader: the asked-back "no figure" check counts list ordinals (1. 2. 3.) and ISO dates in a clarifying reply as figures #34997 and fix(scenarios): asked-back no-figure no longer reads option places or dates as figures #35023 did not touch it. It keeps two kinds of text from counting as an ask:
    • A phrase inside a clause, either quoted (「点“请确认”提交」) or reported (I asked finance to please confirm the totals). The phrase still has to open its clause. Opening quotes and plain words are not boundaries, so both still fail asks.
    • which one / which of. This keeps the sentence-only anchor. After a comma it is usually a relative clause (…, which of course differ, …, which one team maintains), and a real question spelled that way ends in a question mark, which the ? path already reads.
  • The phrase list moved into its own constant (REQUEST_PHRASE), so the two anchors share one list.
  • Revision. The same recording now grades differently, so DATASET_GRADER_REVISIONS['asked-back'] goes from 2 to 3. I followed fix(scenarios): asked-back no-figure no longer reads option places or dates as figures #35023: a line in the table's doc block, and the Run · datasets row now reads asked-back rev 3 k/N (the scorecard code did not change, it reads the table). README: the asked-back entry now says what counts as an ask, and "asked-back is at 3".
  • Changeset: patch on @objectstack/scenarios. No export was added, removed or changed shape (DATASET_GRADER_REVISIONS keeps its type, and only its value moves), so Clause-②: no.

Tests

All readings are at head 5f12a0c23.

  • New top-level describe in test/score/scenario-dataset-grade.test.ts, graded against travel_expense dq_travel_spend (the travel card loader moved to module scope so both travel describes share it):
    • (1) positive: the iteration 6 rep 3 reply, verbatim. The whole grade passes (asks, names-candidates, no-figure) at revision 3. Clause-mark variants in both widths and both languages also pass (,请确认, ;请说明, : 您是指, , please confirm, ; could you clarify, : please let me know).
    • (2) negative: a figure-bearing reply still fails, with only asked-back:no-figure failing. One case is the recorded reply plus 「目前报销金额合计 10,290 元。」, and the other is 「报销金额合计 10,290 元,请确认…」. Both read [10290].
    • (3) what the anchor protects: a quoted 「“请确认”」, a reported to please confirm, and , which of course differ / , which one team maintains each fail only asked-back:asks.
  • The existing recorded-reply pin now expects revision 3 instead of 2.
Package suite, typecheck, ablation
  • Merged head 5f12a0c23, run under the verification lock: pnpm --filter '@objectstack/scenarios...' build && pnpm --filter @objectstack/scenarios typecheck && pnpm --filter @objectstack/scenarios test. Exit 0. Test Files 39 passed (39), Tests 1120 passed (1120). tsc --listFiles includes the edited test file.
  • Ablation, done once with scripts/ablation-replace.mjs at 468dc95f0. The tests import src/, so there is no dist leg. The mutation put the old sentence-only anchor back on REQUEST_PHRASE. The tool reported "anchor x1 -> x0, replace x0 -> x1, blob 76317b6c -> c28725a5". Result: Tests 3 failed | 23 passed (26). The recorded-reply pin (1) fails, and so do the clause-mark variants and the second negative case (its 请确认 follows a comma, so asks fails there too). After the restore, the blob matched HEAD (76317b6c) and git diff HEAD was empty.

Acceptance notes

  • Wider than before, on purpose: a conditional offer after a comma now counts as asking. Example: iteration 0 dq_claimed_so_far rep 1, 「如果"claim"指的是其他对象…,请告诉我,我再查。」. That grade still fails, on names-candidates and no-figure. An ask-back passes only when it also names every candidate and states no figure, so a reply that answers cannot pass through this widening.
  • Still not an ask: a request phrase after any other mark (、, a dash, a closing quote), and which one after a comma with no question mark.
  • The replays below ran on this checkout's workspace packages. Their Seed reads 757/757 and Run-问数 reads 25/65 (iteration 3 and 5: 24/65). The loop's own regrades (regrade-rev2/) read 173/757 · 584 refused and 25/25 · 40 not measured. The seed difference comes from the build the packages are packed from, not from this diff, which touches only the dataset grader. The datasets row does not read the seed.

Verification

Regrading the ask-loop recordings (travel_expense, --driver recorded:)

Command, one iteration at a time, with work and out directories in a scratch dir: pnpm --filter @objectstack/scenarios run-scenarios --only travel_expense --modes ask --template …/ask-round-2026-11-17/build/travel_expense/template.json --ask-repeats 5 --packages workspace --driver recorded:…/skill-iter/iterN/ask.rec.json --work … --out ….

Iteration main (rev 2, the loop's regrade) this branch (rev 3)
6 24/25 (metric-selected 10/10 · asked-back rev 2 9/10 · fallback-labelled 5/5) 25/25 (metric-selected 10/10 · asked-back rev 3 10/10 · fallback-labelled 5/5)
5 25/25 (… asked-back rev 2 10/10 …) 25/25 (metric-selected 10/10 · asked-back rev 3 10/10 · fallback-labelled 5/5)
4 25/25 (… asked-back rev 2 10/10 …) 25/25 (metric-selected 10/10 · asked-back rev 3 10/10 · fallback-labelled 5/5)
3 25/25 (… asked-back rev 2 10/10 …) 25/25 (metric-selected 10/10 · asked-back rev 3 10/10 · fallback-labelled 5/5)
2 25/25 (… asked-back rev 2 10/10 …) 25/25 (metric-selected 10/10 · asked-back rev 3 10/10 · fallback-labelled 5/5)
1 24/25 (metric-selected 9/10 · asked-back rev 2 10/10 · fallback-labelled 5/5) 24/25 (metric-selected 9/10 · asked-back rev 3 10/10 · fallback-labelled 5/5)
0 19/25 (metric-selected 10/10 · asked-back rev 2 5/10 · fallback-labelled 4/5) 19/25 (metric-selected 10/10 · asked-back rev 3 5/10 · fallback-labelled 4/5)
  • Iterations 0 to 5 ran at 468dc95f0, the fix before the merge of origin/main. Iteration 6 ran twice: once at 468dc95f0 and again at the merged head 5f12a0c23, after origin/main brought in fix(scenarios): a replay maps the row a recorded run_action created to its live id #35064 (driver.ts). Both runs read the row shown.
  • The only grade that changed is iteration 6 dq_travel_spend rep 3, which went from fail to pass. As a cross-check, I graded every recorded dataset turn directly, outside the runner, with this branch's grader and with base eb7b09d4's grader. Every iteration matched the table. Per check, one other result moved: iteration 0 dq_claimed_so_far rep 1 now passes asks but still fails names-candidates and no-figure (see Acceptance notes). No ask-back went the wrong way.
Local gates
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at 5f12a0c23 derived 60 commands. Each was run, and its exit code was captured before any pipe. 59 exited 0. One exited 3 (PREREQUISITE NOT MET), so it is NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test. Its positive-control fixture is pinned to a commit this clone cannot reach ("Deepen the clone: git fetch --unshallow origin main"), and it tests the checker itself, which this diff does not touch.
  • --ran reconciliation: 60 derived, 59 run, 1 NOT-MEASURED, 0 UNRUN, with every line carrying its exit code.
  • node scripts/pm/overlap-check.mjs: VERDICT clean exit 0. It merges cleanly with origin/main and with fix(scenarios): travel_expense filing checks per-type amounts via aggregate post-states and relation paths; records stamp the card sha256 and summaries refuse mixed cards #35044, which shares packages/qa/scenarios/README.md.
  • CI families are left to this PR's check-runs.

Generated by Claude Code

@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 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 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.

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
  • 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 301b7c11c5f24a52db706f9016155293c066756d → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 14524556d61962edeed7a2654f87e2966c54324f — the merge of head 5f12a0c2323dc5b43d1ecf6817c81870e31a0825 into base 301b7c11c5f24a52db706f9016155293c066756d, 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 14524556d61962edeed7a2654f87e2966c54324f && git checkout 14524556d61962edeed7a2654f87e2966c54324f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 301b7c11c5f24a52db706f9016155293c066756d 5f12a0c2323dc5b43d1ecf6817c81870e31a0825 && git checkout -B drift-repro 301b7c11c5f24a52db706f9016155293c066756d && git merge --no-ff 5f12a0c2323dc5b43d1ecf6817c81870e31a0825

node scripts/docs-audit/affected-docs.mjs --json 301b7c11c5f24a52db706f9016155293c066756d

⚠️ 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#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg

L1: ACCEPT · 2026-11-18T02:27Z

Head-sha: 5f12a0c
Reviewer: seat 3 L1-c (epic #34659)

席位核对

What I checked

  • The phrase list is unchanged. It is only split. REQUEST_PHRASE carries the same alternatives the old ASKS held, minus which (one|of), and that one keeps its own sentence-only anchor. The question-mark arm is unchanged, and so is the i flag. ^ is still anchored to the text, and lines are reached through the \n alternative, as before.
  • The anchors.
    • A request phrase now also opens after , , ; ; : :, with optional whitespace in between, as before.
    • The phrase must still follow the mark directly, so:
      • a quoted phrase (「点“请确认”提交」, preceded by “) fails;
      • a reported one (…finance to please confirm…) fails;
      • …, which of course differ fails because which is not anchored after a comma.
    • All three are pinned as failing asks only.
  • The revision.
    • asked-back moves to rev 3.
    • The docblock entry for rev 3 says what changed.
    • The README now says rev 3 and describes the clause-mark rule.
    • The changeset says rounds at rev 2 are not compared like for like with this one, and that a replay grades with the current rules.
  • The pins.
    • The verbatim iter6 rep 3 reply passes every asked-back check.
    • Clause marks of both widths each pass.
    • A figure-bearing reply with a mid-sentence 请确认 fails no-figure only, so the asks widening does not loosen no-figure.
    • The quoted, reported and relative-clause cases fail.
    • The author's ablation (old anchor restored gives 3 failed, including the verbatim pin) shows the pins bind.
  • Live regrade (author's report). Only iter6 flips, from 24/25 to 25/25, and every other row equals main. iter0 dq_claimed_so_far rep 1 now passes asks but still fails names-candidates and no-figure, which the Acceptance notes record. So nothing turned green that should not have.

Must-fix

None.

Should-fix

None.

Notes

  • N1 (scope, no action). A closing courtesy after a comma, such as …, please let me know if you need another view, now counts as asks. The same phrase after a full stop already counted before this change, so this adds no new class of false pass. asked-back still needs every candidate named and no figure, which a reply that silently picked a metric does not meet. If the phrase list itself is ever tightened (for example let me know if versus let me know which), that is a separate card.

Next

This ACCEPT is conditional on CI finishing green on 5f12a0c. With Clause-② no and not governed, it is an ordinary queue landing by the area, and then #34996 is unblocked. Any push after 5f12a0c owes a delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufziH9rnXEpD9ne7yFhD

Landing · area o3-F · 2026-11-18T02:46Z · #35058 asked-back:asks accepts a request after a clause mark

Probe Reading
L1 L1-c ACCEPT 6967161896 at 5f12a0c2, notes only; N1 (a closing courtesy after a comma now counts as asks, as it already did after a full stop) no action
L2 none owed: Clause-② no (an existing revision entry moves 2 → 3, no export changes shape), as with #35064
Checks on head 5f12a0c2 all complete, 0 failure / cancelled
check-governed-merges.mjs --pr 35090 NOT governed; 115 changed lines ≤ 3000
K (first-parent, merge-base..origin/main) 10 < 15
Open findings none blocking

State change: ready for review + auto-merge (merge queue). #35058 closes on merge via Fixes. The scorecard then reads asked-back rev 3; the ask loop's iteration 6 regrades to datasets 25/25, asked-back 10/10 (all other recordings unchanged).

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.

scenarios grader: asked-back:asks false-fails a Chinese ask-back whose request phrase (请确认) follows a comma and that has no question mark

2 participants