Skip to content

docs(skills): the ask skill and ADR-0149 D3 ask back only about a word with a measure candidate - #35662

Merged
os-zhuang merged 11 commits into
mainfrom
claude/issue-35158-ask-back-measure-scope
Nov 20, 2026
Merged

os-zhuang merged 11 commits into
mainfrom
claude/issue-35158-ask-back-measure-scope

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #35158

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用 AI 助手问数的业务用户,问「按行业看销售额」这类话(「销售额」对上了指标,「按行业」只是接近一个分组维度)时,助手照着问数技能不再反问「你说的行业是哪一个」,直接算出销售额并按行业分组;只说「销售」这种只接近某个指标的词,仍然先问清楚再算。
  • 为什么做:属于「MCP 问数」专题。上一轮(datasets: an ask-back is owed only for the word being measured — a grouping or time word with a candidate does not stop a matched measure #35005,问数反问范围收窄)已把工具说明和连接时下发的规则改成「只对可能是指标的词反问」,但问数技能、返回结构的说明和架构决策记录还写着「凡有候选就反问」,两种说法并存,助手可能照旧多问一句。
  • 出错会怎样:只改文字,不动任何计算逻辑,指标口径不变;最坏情况是助手把一个本该问清的分组词直接拿来分组,或对个别问法仍多问一句。撤回本次改动即可恢复原文。
  • 要你做什么:席位核对与合同审核通过后,批准这次受管文本(问数技能与架构决策记录)的改动;在那之前无需动作。

What changes

The sentence every copy now carries is the one the two door strings on main share since PR #35156 (commit 7ed18b50e1): "A word whose candidates are all dimensions is at most a possible grouping: never ask about it, and it never stops a matched measure." A word with a measure among its candidates keeps the rule as it was: it is asked about. No shape, executor or tool changes.

  • Skill, step 2 (skills/objectstack-ask/SKILL.md). The one candidates row is now two, placed directly under the "One word matches several measures" row:
    • "A word with a measure among its candidates": "Ask the same way; with one candidate, ask whether it is the one meant."
    • "A word whose candidates are all dimensions": "At most a possible grouping: never ask about it, and it never stops a matched measure." The door sentence, split over the row's two cells.
  • Skill, step 1 bullet (same file). It says what a candidate is and states no ask-back, so it needed no scope. It lost three words (" on the answer") as payment.
  • Paid inside the same file. The objectstack-ask row of scripts/check-skills-token-ratchet.mjs had no headroom and is not edited: 1877 / 1877 before and after. The two rows are paid for by cutting text that restated another line of the same file (ruling record 6513306068: pay by cutting restatement first). Each cut keeps its other home:
    • the old row's own listing instruction and its "Do not pick one." (the row above states both, and the new row says "Ask the same way");
    • "A word matches nothing, and" in the old row's left cell (step 1: "A word that matched nothing may have candidates");
    • " on the answer" in that step 1 bullet (the same bullet: "a member the same answer lists").
  • Generated page (packages/mcp/src/ask-skill.generated.ts). Rewritten by node scripts/gen-mcp-ask-skill.mjs, never by hand. It is what GET /mcp/skill serves.
  • Spec description (packages/spec/src/ai/dataset-tools.zod.ts). ListDatasetsOutputSchema.candidates said every candidate is offered "for a clarifying question". It now says the clarifying question is for a term with a measure among its candidates and states, declaratively and in the file's own vocabulary, that a term whose candidates are all dimensions is offered them as a possible grouping, not for a question, and does not stop a matched measure (contract review 7024432523 F1: the executor's imperative sentence stays out of the spec, ADR-0149 M1). The doc comment of DatasetTermCandidateSchema says the same and names how the kind is read (the measures. or dimensions. prefix of member). list_datasets serves this description in its outputSchema. The Zod shape is byte-for-byte what it was.
  • Regenerated reference (content/docs/references/ai/dataset-tools.mdx). One table row, by pnpm --filter @objectstack/spec gen:docs.
  • ADR-0149 D3 (docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md). Three edits, none deciding anything the door strings and the executor's note on main do not already say:
    • rule 1's parenthesis now points at the new note: "scoped by the amendment note of 2026-11-19 after rule 5: a word whose candidates are all dimensions is at most a possible grouping, never asked about";
    • the third point of the candidates note now opens "With a measure among a term's candidates, the AI asks in rule 3's form and acts on none." and ends with one sentence for a term whose candidates are all dimensions;
    • a new amendment note (2026-11-19) cites the maintainer's ruling 7024577075 as its authority, says it amends rule 1 in place and narrows [Decision] The published skills: who reviews a change, how they are verified, one catalog or two for code-first and MCP, and the E2 premise reading #34691 F1 = B for dimension candidates only, quotes the door sentence with its two symbol anchors and the test that holds them equal (the spec carries the scope, not that sentence), says what holds for each kind of term, that rule 5 still holds, what does not change, and what the two amended sentences first said.
  • Eval cases (skills/objectstack-ask/evals/metric-selection-fallback.json), ids 16 and 17, in the file's existing shape:
    • 16: 「按行业看销售额」, where 销售额 matches a measure and 「按行业」 has one candidate, a dimension. Expected: one query_dataset call grouped by industry and no question back.
    • 17: "What are our sales?", where "sales" matches nothing and its one candidate is a measure. Expected: a question and nothing else.
  • Changeset .changeset/35158-ask-back-measure-scope.md: @objectstack/skills, @objectstack/mcp and @objectstack/spec at patch. Clause-②: no: a text-only change to served text; no tool, field or argument changes. Metadata-protocol: none.

Skills size readings

Reading Before (2495486fd5) After (ce88a4ea69)
skills/objectstack-ask/SKILL.md lines 125 126
skills/objectstack-ask/SKILL.md bytes 7527 7528
skills/objectstack-ask/SKILL.md priced tokens (ceiling) 1877 (1877) 1877 (1877)
All 13 SKILL.md files, lines summed 4853 4854
All 13 SKILL.md files, priced tokens summed 63935 63935
Whole shipped bundle, tokens (the ratchet's own total) 274972 275745

The file is one line and one byte longer: 7508 priced bytes, exactly 4 × 1877, so the row keeps zero headroom and no ceiling moves. The bundle total grows by 773 tokens, all of it the eval fixture (4615 to 5388), which the ratchet measures and does not ratchet. No other file under skills/ changes.

Tests

All at ce88a4ea69, each heavy run under the shared verify lock.

  • pnpm --filter @objectstack/mcp test: Test Files 79 passed (79), Tests 1439 passed (1439), VERDICT command-exit 0. It includes skill-single-source-34686.test.ts (the generated page equals the skill) and initialize-selection-rule-34686.test.ts.
  • pnpm --filter @objectstack/spec test: Test Files 859 passed (859), Tests 27439 passed, 1 todo, VERDICT command-exit 0.
  • pnpm --filter @objectstack/spec typecheck and pnpm --filter @objectstack/mcp typecheck: VERDICT command-exit 0 each.
  • pnpm --filter @objectstack/service-analytics exec vitest run --maxWorkers=2 src/__tests__/dataset-tools.test.ts (the suite that reads the list_datasets output schema): 1 file, 92 passed, 10 skipped, VERDICT command-exit 0.
  • No ablation: the diff changes text, generated copies and fixtures, and no behaviour a test pins.

Acceptance notes

  • Premise, measured on main. Both door strings carry the sentence (packages/mcp/src/mcp-server-runtime.ts#DATASET_SELECTION_RULE, packages/services/service-analytics/src/dataset-tools.ts#LIST_DATASETS_DESCRIPTION), and the executor's note adds "group the answer only as the question asks" (packages/services/service-analytics/src/dataset-next-step.ts). The skill row, the spec description and the two ADR sentences still stated the question for every candidate.
  • Governed. skills/** and docs/adr/** are Tier H. This PR stays a draft; its author never readies, queues or arms it.
  • Claim and file surface. Claimed by comment 7013669358 on the card. The seven changed files are all inside the claim's list. scripts/check-skills-token-ratchet.mjs is in that list and is not changed.
  • The spec description states the scope, not an instruction. The file's header says the tool descriptions are the executor's and "AI guidance text does not enter the spec (ADR-0149 M1, ruled A)". After contract review 7024432523 (F1, option B) the description and doc comment state what the platform offers for each kind of term, in declarative form; the imperative sentence lives only in the two door strings and the skill.
  • ADR provenance. The note is approved by the maintainer on this PR, verbatim 「不再反问」, ruling record 7024577075 on Ask skill and ADR-0149 D3: scope the ask-back to words with a measure candidate #35158: a term whose candidates are all dimensions is not asked about and may be used as the grouping the question asks for, which narrows [Decision] The published skills: who reviews a change, how they are verified, one catalog or two for code-first and MCP, and the E2 premise reading #34691 F1 = B for dimension candidates only; a measure candidate is still asked about and never selected. Two sentences that mention the question in passing are left as written and named in the note.
  • Eval cases are not graded here. The strict loader reads the file (pnpm --filter @objectstack/scenarios skill-evals --dry-run: "objectstack-ask: 17 case(s)", exit 0). No model round was run for ids 16 and 17: NOT MEASURED, the eval round's reading.
  • Seen and left alone (outside this card's file surface; nothing was filed):
    • docs/design/mcp-local-first-door.md still describes the ask-back over candidates without the scope, in two sentences;
    • a code comment in packages/services/service-analytics/src/dataset-term-matcher.ts says a candidate is "offered for a clarifying question";
    • the release notes and package changelogs that quote the earlier wording are release-owned.
  • Overlap. node scripts/pm/overlap-check.mjs --branch=HEAD at ce88a4ea69: VERDICT clean, exit 0, against origin/main 5dd856f40c and 1 PR head (chore: version packages #35129, the Version Packages pull, which shares the skill file and merges cleanly).

Verification

Read first, by risk:

  1. docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md: the new note of 2026-11-19, its points "A term whose candidates are all dimensions is a possible grouping, not a question" and "Rule 5 still holds for it". Check that each says no more than the door sentence and the executor's note.
  2. skills/objectstack-ask/SKILL.md: step 2's two new rows. "Ask the same way" leans on the row directly above it, so the row order matters.
  3. packages/spec/src/ai/dataset-tools.zod.ts: the candidates description, for the note on M1 above.

Two-minute check: node scripts/check-skills-token-ratchet.mjs && node scripts/gen-mcp-ask-skill.mjs --check. Expect both to exit 0, the ask row to read 1877 / 1877 (+0), and the generator to say the page "is current with skills/objectstack-ask/SKILL.md".

Generators and skill gates
  • node scripts/gen-mcp-ask-skill.mjs --check: exit 0, "packages/mcp/src/ask-skill.generated.ts is current with skills/objectstack-ask/SKILL.md."
  • node scripts/check-skills-token-ratchet.mjs: exit 0, skills/objectstack-ask/SKILL.md 1877 / 1877 (+0), "59 authored bundle file(s) within their ceilings".
  • pnpm --filter @objectstack/spec check:generated (after the spec build): exit 0. Before gen:docs ran it reported only the docs page stale, the expected direction.
  • pnpm --filter @objectstack/spec run check:skill-refs, check:skill-docs: exit 0. check:skill-examples: exit 0, "346 prose examples type-check", after building the client SDK closure it reads.
Derived gates (dispatch-gates --commands, no paths, then --ran)
  • 112 derived; 111 exit 0. Among them: check-skills-token-ratchet.mjs and its --self-test, check-adr-0087-registration, check-adr-links, check:adr-anchors, check:adr-index, check:adr-symbol-anchors ("3835 anchors across 160 records resolve"), check-changeset-no-major, check-empty-changeset, check:nul-bytes, check:issue-citations, check:pm-governed-merges, check:skill-links, check:skill-identifier-liveness, check:skill-compatibility, and on the spec package check:generated ("All 14 generated artifacts are up to date"), check:docs ("249 generated files in sync"), check:api-surface, check:authorable-surface, check:skill-docs, check:skill-refs, check:skill-examples.
  • 1 NOT MEASURED: pnpm check:dual-build-cjs-loads, exit 3, "PREREQUISITE NOT MET". It reads every package's dist/, and only the closures this diff needs were built here; CI runs this gate.
  • --ran: "112 derived famil(ies) accounted for — 111 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)", exit 0.
  • Two more gates answered PREREQUISITE NOT MET on a first pass and were measured after their prerequisite was built or fetched: check:skill-examples (the client SDK closure) and check-plugin-teardown-shape.mjs --self-test (one pinned commit, absent from the shallow clone). The record above is one full second pass at the same head.
  • Local-only readings, kept out of the derived total: pnpm check:skill-frame-freshness exit 0; pnpm check:dev-prereqs exit 1, a reading of this machine (64 of 108 packages have no dist/ here, because only the needed closures were built), not of the diff.

Fix round (contract review 7024432523, FAIL → head df2fcffbf3)

Item Where Change
F1 (must-fix) packages/spec/src/ai/dataset-tools.zod.ts The candidates description and the DatasetTermCandidateSchema doc comment state the dimension-only scope declaratively in the file's own vocabulary ("term"); the executor's imperative sentence is gone from the spec (ADR-0149 M1). content/docs/references/ai/dataset-tools.mdx regenerated; the changeset sentence and the ADR note say the spec carries the scope, not the door sentence.
S1 ADR-0149, note of 2026-11-19 Says it amends rule 1 in place and narrows #34691 F1 = B for dimension candidates, and cites the maintainer's ruling: "Approved by the maintainer on PR #35662, verbatim 「不再反问」 (ruling record 7024577075) …".
S2 skills/objectstack-ask/evals/metric-selection-fallback.json case 16 must_not_contain names a question about the term instead of a bare ? / ?.
N1 spec doc comment The note is cited by its date, 2026-11-19.

skills/objectstack-ask/SKILL.md and its generated copy are unchanged in this round. CI on df2fcffbf3: 74 check-runs, 62 success, 12 skipped, 0 failed (the type-check red on the intermediate head 9f99c3ff is cleared).


Generated by Claude Code

…e candidate

Step 2 of the ask skill splits its candidates row in the words the
list_datasets description and the MCP initialize rule already carry: a
word with a measure among its candidates is asked about, and a word
whose candidates are all dimensions is at most a possible grouping,
never asked about and never a stop for a matched measure.

The row pays for itself in the same file: the restated listing and
"Do not pick one." (the row above, which "the same way" points at),
"A word matches nothing, and" (step 1's candidates bullet) and
"on the answer" (the same bullet) are cut. 7507 -> 7508 priced bytes,
1877 tokens against a ceiling of 1877.

packages/mcp/src/ask-skill.generated.ts is regenerated from the skill.

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
…, and two ask eval cases

ListDatasetsOutputSchema.candidates and the DatasetTermCandidateSchema
docblock said every candidate is offered for a clarifying question. Both
now say what the list_datasets description says: a term with a measure
among its candidates is asked about, and a word whose candidates are all
dimensions is at most a possible grouping. No shape changes.

skills/objectstack-ask/evals gains two cases: a matched measure beside a
word whose candidates are all dimensions (computed, grouped, no question
back), and a bare near word with a measure candidate (still asked about).

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
`pnpm --filter @objectstack/spec gen:docs`, after the candidates
description changed. One row moves.

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
…andidate

An amendment note after rule 5 records the sentence the list_datasets
description and the MCP initialize rule already carry: a word whose
candidates are all dimensions is at most a possible grouping, never
asked about and never a stop for a matched measure. Two sentences that
stated the question for every candidate are amended in place (rule 1's
parenthesis, and the third point of the candidates note), and the new
note quotes what they first said. No decision beyond the shipped texts.

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
… served page and the spec description

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation protocol:ai tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 anchor(s) derived from 2 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
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 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; 123 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 — 179 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 03865ae9952e33c2de912f9b0fb0b1a369cd312a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 1e771b2b2f615719e4709c94d631c216c3905397 — the merge of head df2fcffbf383ad9ca0e98def44e652cbdd9dd177 into base 03865ae9952e33c2de912f9b0fb0b1a369cd312a, 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 1e771b2b2f615719e4709c94d631c216c3905397 && git checkout 1e771b2b2f615719e4709c94d631c216c3905397
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 03865ae9952e33c2de912f9b0fb0b1a369cd312a df2fcffbf383ad9ca0e98def44e652cbdd9dd177 && git checkout -B drift-repro 03865ae9952e33c2de912f9b0fb0b1a369cd312a && git merge --no-ff df2fcffbf383ad9ca0e98def44e652cbdd9dd177

node scripts/docs-audit/affected-docs.mjs --json 03865ae9952e33c2de912f9b0fb0b1a369cd312a

⚠️ 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#4 · os-elon-musk · session_016WV4d1Dv2AVwokgRqfdKp2

Final head for L1 (2026-11-19T22:42Z): ce88a4ea69c8f4cf7885375594c6e7a21f5fe5de. CI on this head: 60 success, 10 skipped, 0 failed, 0 pending. Handed to L1 review; Tier H, the area does not land.
Open question for the contract review (from the dev report 7023696874): the candidates description in packages/spec/src/ai/dataset-tools.zod.ts carries the door sentence verbatim, imperative half included, as the card's Done-when and review record 6973927307 (S1) order. The file header cites ADR-0149 M1 ("AI guidance text does not enter the spec"). A = keep verbatim (dev recommends); B = a declarative spelling in the two spec texts only, one rework round.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1H9ixhgepGZ7fawhL

L1 verdict (L1-a): ACCEPT at head ce88a4ea69c8f4cf7885375594c6e7a21f5fe5de (announced in 7024272652).

Gates on this head: 70 check-runs: 60 success, 10 skipped, 0 failed, 0 pending. Lint & Repo Gates and TypeScript Type Check both passed.

Shape:

  • Draft, Fixes #35158.
  • Patch changesets for @objectstack/skills, @objectstack/mcp and @objectstack/spec. These are the three published packages whose shipped text changes.
  • Clause-②: no holds: the candidates shape, order and cap are untouched, and only the .describe text and a doc comment change.
  • Metadata-protocol: none fits.
  • Generated artefacts move with their sources:
    • ask-skill.generated.ts carries SKILL.md step 2 line for line;
    • dataset-tools.mdx carries the .describe string.

What I checked myself:

Notes (non-blocking):

  1. Eval 16 forbids a bare ? and ?. That encodes "no question back", but it also fails a correct answer that has a question mark anywhere, for example a closing "需要按季度再细分吗?". This is the bare-token shape skills eval: analytics-inline-vs-dataset#5 forbids the literal 'defineDataset', so a correct answer that says a chart 'doesn't need a defineDataset' fails — narrow must_not_contain to the wrong pattern #35095 just narrowed; consider it at the next eval pass.
  2. Contract-review faces, for the seat:

Next: Tier H, so the seat lands it.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4cxgb3PKFkt8y5FigJn

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ce88a4ea69c8f4cf7885375594c6e7a21f5fe5de
Local-runs: none
Scope: packages/spec/src/ai/dataset-tools.zod.ts, docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md, skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json + packages/mcp/src/ask-skill.generated.ts
Security-touching: no

Inputs read: card #35158 body and its seven comments (two regrades, the triage notes, claim 7013669358, progress 7022130549, dev report 7023696874); PR #35662 body, its file list (7 files, +71/-11), the net diff against main, and its three comments (docs-drift, final-head 7024272652, L1 7024317244); the 70 check-runs on this head (60 success, 10 skipped, 0 failed, 0 pending). For face (b): card #35005 with its comments and record 6973927307. Code outside the diff read on main only to judge the claims: packages/services/service-analytics/src/dataset-next-step.ts, dataset-tools.ts (LIST_DATASETS_DESCRIPTION), dataset-term-matcher.ts (findDatasetTermCandidates), packages/mcp/src/mcp-server-runtime.ts (DATASET_SELECTION_RULE), packages/mcp/src/initialize-selection-rule-34686.test.ts, and ADR-0149 D3 and M1 with their notes.

① Derived judgments

The diff changes no accepted input, no output shape and no executor. It changes published text in four places and adds two eval cases.

  1. The rule itself. Right. A term with a measure among its candidates is asked about; a term whose candidates are all dimensions is a possible grouping, not asked about, and no stop for a matched measure. That is what the executor does on main: groupingOnly is candidates_only with every candidate a dimensions pointer (dataset-next-step.ts:346), the note for it is groupingCandidateHit plus groupingCandidateTail, and a mixed-kind term keeps its question. Both door strings carry the sentence and the mcp test pins them to it (line 259).
  2. Skill step 2 split. Right. The old single candidates row told the model to ask about every word with candidates, against the door. The two new rows state both halves. "Ask the same way" resolves to the row directly above, which carries the listing instruction and "Do not pick one"; step 1 keeps "A candidate is not a match". The three cuts each keep another home in the same file.
  3. ask-skill.generated.ts. Right. Its two hunks are the skill's two hunks line for line; skill-single-source-34686.test.ts ran inside the green Test Core shards.
  4. Spec description: the scope is right, the spelling is wrong (F1). The description needed the scope: record 6973927307 S1 found it stating a purpose the door denies. The PR adds the scope by copying the executor's instruction sentence whole into .describe. See ③ (a).
  5. ADR-0149 edits. Factually right, authority thin (S1). Every claim of the new note that cites code holds, checked in ④. Its provenance is judged in ③ (b).
  6. Eval cases 16 and 17. Right as scenarios. Both are answers the executor would give: 「按行业」 contains the label 行业 and equals nothing, so it has the one dimension candidate; "sales" is contained in "Sales Amount", so it has the one measure candidate. 16 is the card's first case, 17 its control. One assertion of 16 is too wide (S2).

② Semver level

  • Changeset: right. patch for @objectstack/skills, @objectstack/mcp and @objectstack/spec, the three published packages whose shipped text changes (the skill, its served copy under packages/mcp/src, the schema description). Check Changeset succeeded on this head.
  • Clause-②: no holds on the PR body and the changeset. The Zod shape of candidates and of DatasetTermCandidateSchema is unchanged: same members, same order, same cap, no enum value added. Only .describe text and a doc comment move. F1 is a wording finding and does not change this reading.
  • Metadata-protocol: none is right. Nothing a metadata author writes changes.
  • If F1 is fixed as proposed, the changeset's sentence "and carries the sentence above" for the spec description changes with it. The level stays patch.

③ Boundary flags

(a) Dev open question, A or B: may the imperative "never ask about it" enter the spec .describe? Answered: B.

  • The file's own header, unchanged by this PR, says: "The tool descriptions, which carry the ADR-0149 D3 selection rule to the model, are written by the executor: AI guidance text does not enter the spec (ADR-0149 M1, ruled A)". The sentence the PR copies is a sentence of that tool description. At this head the file states the rule in its header and breaks it 270 lines below.
  • M1's amendment note (ruled by the maintainer on [Decision] Should the framework's dataset tools return the next step and the citation line themselves, so the MCP door gets what the product's agent gets #34894, option A) says the spec gains "no sentence", that the enum values name what the platform found, "not what a reader then does", and that what follows from a case "stays D3's to say, in the three places D3 names". D3 names the tool descriptions, cloud's planner and the D5 evaluation. A schema description is not one of them. DatasetNextStepDecision's doc comment and note's description in the same file repeat it: "the schema declares the slot and fixes no text".
  • How the other descriptions read: all 55 .describe strings in this file are declarative. They say what a member is, when it is present and how it is ordered. "never" appears only as a statement about the platform ("never an empty list", "never typed by the model"). None instructs the reader. The imperative descriptions elsewhere in packages/spec/src/ai (solution-blueprint.zod.ts) tell a model how to fill an input it authors; none tells a reader how to behave on an output.
  • The published surface: this string ships as list_datasets' outputSchema and in the generated reference. Copied verbatim, the executor's wording has a third home that no test holds: the mcp pin covers the two door strings only. The copy also says "word" inside a description that says "term" in every other sentence.
  • The dev's two grounds for A do not carry it. The card's Done-when ("in the door strings' words") and record 6973927307 S1 ("state the same scoped rule") are a seat's wording; neither can set aside a maintainer ruling, and S1 asked for the scope, not for the imperative. The earlier text "for a clarifying question" stated what the list is offered for, which is a purpose, not an instruction.
  • B keeps every fact: for example "A term whose candidates are all dimensions is offered them as a possible grouping, not for a question, and does not stop a matched measure." This is F1.

(b) Authority of the ADR-0149 amendment note. Answered: #35005 and record 6973927307 are not enough by themselves; the maintainer's word is needed, and his Tier H approval of this PR can be that word if the ask is put to him in these terms.

Other dev flags.

  • check:dual-build-cjs-loads NOT MEASURED locally: answered by CI, every check-run on this head is success or skipped.
  • No model round for eval cases 16 and 17: accepted as the eval round's reading; only the strict loader read them.
  • Eval 17 is the plain case; no mixed-kind case added: accepted. The card names two cases, and the executor pins the mixed kind in fix(analytics): a grouping or time word with only a near dimension does not stop a matched measure #35156's tests.
  • Out-of-scope findings with carrier: none: docs/design/mcp-local-first-door.md (two sentences) and the doc comment in dataset-term-matcher.ts ("offered for a clarifying question") still state the unscoped purpose. Neither is published text, but nothing carries them (N3). The release notes and changelogs are release-owned, correctly left alone. The candidate cap edge is carried from record 6973927307 N2 and unchanged here.
  • Deviations (trailer form, PR footer, digest shape, no review request, the stray pid file outside every repository, the depth-1 fetch): process matters for the seat; none changes the tree.
  • content/docs/references/ai/dataset-tools.mdx against the schema: the one changed row agrees with the .describe string sentence by sentence, including the two new sentences and "at most 5 per term". It is generated, so it follows F1's fix by regeneration.
  • SQL push-down (AGENTS.md Prime Directive 5). Not engaged. The diff holds text, a generated copy and fixtures; no query, no id materialisation, no in-app join.

④ Design judgment

packages/spec/src/ai/dataset-tools.zod.ts

  • candidates description, first sentence: "for a clarifying question when a measure is among the term's candidates". True of the executor. Declarative. Holds.
  • Second sentence, the door sentence verbatim. Its facts are true; its form is an instruction to the reader, against the file header and M1. F1.
  • The rest of the description is unchanged and still true (order, cap, presence).
  • Doc comment of DatasetTermCandidateSchema: "offers the member as a possible reading" is right, and "the kind is the measures. or dimensions. prefix of member" matches the member regex and findDatasetTermCandidates. The same imperative sentence sits here; it goes with F1. "the second amendment note under its rules" is ambiguous now that D3 holds three notes, one of them inside rule 1 (N1).
  • Tried to break the shape claim: no z. call changes, the .min(1) and the cap constant are untouched.

docs/adr/0149-…md

  • Rule 1's parenthesis: the added clause is true and points at the right note.
  • Third point of the 2026-11-17 note: the new opening and the closing sentence agree with the executor.
  • New note, point by point against main:
    • "The sentence": both anchors resolve, the quoted sentence is character for character in both, and the named test holds them equal.
    • "A term with a measure among its candidates": leftCandidateTail beside a matched measure, candidateTail with "compute nothing until they answer" alone. Holds.
    • "a possible grouping, not a question": groupingCandidateTail says not a question, not a stop, "group the answer only as the question asks". Holds, and says no more than the executor.
    • "Rule 5 still holds": with no asked word under candidates_only the note ends with groupingTail, "ask the user which number they mean". Holds.
    • "What does not change": decision stays candidates_only for such a term (line 346), composeDatasetNextStep exists, the list still names both kinds in the stated order. Holds.
    • "Sentences amended in place": both original sentences are quoted as they stood on main. The two sentences left as written are named. It does not say that "never selected" in the earlier headline is also read with this scope for a dimension candidate (part of S1).
    • "State on main": commit 7ed18b50e1 is PR fix(analytics): a grouping or time word with only a near dimension does not stop a matched measure #35156. "brings three copies to the same sentence" changes if F1 is fixed as proposed: the spec then carries the scope, not the sentence.
  • Tried to break it with the cap: a term near five dimensions in earlier datasets and a measure in a later one reads as all dimensions. The note's rule is stated over the list the answer carries, so it stays true; the edge is the inherited N2 of record 6973927307.

skills/objectstack-ask/SKILL.md against the card's eval prompt and the door on main

  • Row "A word with a measure among its candidates": agrees with both door strings and candidateTail (single candidate: ask whether it is the one meant).
  • Row "A word whose candidates are all dimensions": the door sentence split over two cells. A skill is where this instruction belongs. On eval 16 it yields the expected answer: no question, the measure computed, grouped as asked.
  • The paragraph under the table ("follow its decision and note"; "use none of that word's candidates until the user answers") still reads true for an asked word.
  • A lone grouping word with only dimension candidates and no measure word has no row of its own: "Only a dimension matches" needs a match, and the fallback row needs no candidates. The nextStep note covers it ("ask which number") and the skill says to follow the note, and the door strings have the same gap (N2).

skills/objectstack-ask/evals/metric-selection-fallback.json

  • 16: expected output agrees with the skill row, the executor note and query_dataset's shape. must_not_contain holds a bare ? and ?. That fails a correct answer carrying any question mark, such as a closing offer to break the figure down further, which is no ask-back about the term (S2).
  • 17: agrees with the measure-candidate row and with cases 8 and 10 of the same file, whose shape it follows.

packages/mcp/src/ask-skill.generated.ts: agrees with the skill, line for line.

Findings

F1 (must-fix) — packages/spec/src/ai/dataset-tools.zod.ts: the candidates description and the DatasetTermCandidateSchema doc comment carry the executor's instruction "never ask about it, and it never stops a matched measure" verbatim. The file's header and ADR-0149 M1 with its amendment note (maintainer rulings) keep AI guidance text and the executor's wording out of the spec. Respell both declaratively in the file's own vocabulary ("term"), keeping the scope; regenerate content/docs/references/ai/dataset-tools.mdx; adjust the changeset sentence and the ADR note's "three copies to the same sentence". If the seat holds that the verbatim sentence must stay, that is a re-ruling of M1 and goes to the maintainer; it is not the dev's or the reviewer's to take.

S1 (should-fix) — docs/adr/0149-…md, the note of 2026-11-19: its authority is a card filed on 「立卡」 and a seat's review record. It amends rule 1 in place and narrows #34691 F1 = B. Put the ask to the maintainer in those terms with the Tier H approval, and have the note say that it narrows F1 = B for a dimension candidate ("never selected" included) and cite his word once given.

S2 (should-fix) — eval 16: replace the bare ? and ? in must_not_contain with tokens that name a question about the term, or leave "no question back" to the expected output.

N1 (nit) — the doc comment's "the second amendment note under its rules" is better cited by its date, 2026-11-19.

N2 (nit) — the skill has no row for a lone word whose candidates are all dimensions and no measure word; the nextStep note covers it.

N3 (nit) — docs/design/mcp-local-first-door.md and the dataset-term-matcher.ts doc comment still state the unscoped purpose with no carrier; the seat names one.

Implemented-by: claude/issue-35158-ask-back-measure-scope
Reviewed-by: session_016WV4cxgb3PKFkt8y5FigJn

VERDICT: FAIL

…e declaratively

The `candidates` description of ListDatasetsOutputSchema and the doc
comment of DatasetTermCandidateSchema carried the executor's instruction
sentence whole. AI guidance text does not enter the spec (ADR-0149 M1,
ruled A), and the file's header says so. Both now say what a term whose
candidates are all dimensions is offered them for, a possible grouping
and not a question, in the file's own vocabulary ("term"), and instruct
no reader. The doc comment cites the ADR note by its date. No shape
changes.

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
…rrows

The note now states plainly that it amends rule 1 in place and narrows
the point ruled on fork F1, option B ("offered for a question and never
selected") for a dimension offered to a term whose candidates are all
dimensions, "never selected" included; every other candidate stays as
ruled. Its state line no longer counts the spec among the copies of the
door sentence: the spec carries the scope and not the sentence (M1).
The authority line is unchanged.

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
…question mark

A bare question mark in must_not_contain failed a correct answer that
closes with an offer. The case now forbids the ask-back phrasings
themselves, in both languages the answer may be written in.

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
`pnpm --filter @objectstack/spec gen:docs`, after the candidates
description was respelled. One row moves.

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
…ing as its authority

The note's authority line now opens with the ruling record for the
narrowing: a term whose candidates are all dimensions is not asked
about and may be used as the grouping the question asks for; a measure
candidate is still asked about and never selected. The card it was
first scoped on stays named after it.

Claude-Session: https://claude.ai/code/session_016WV4d1Dv2AVwokgRqfdKp2
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1Dv2AVwokgRqfdKp2

Final head for the L1 and contract delta reads (2026-11-19T23:43Z): df2fcffbf383ad9ca0e98def44e652cbdd9dd177 (was ce88a4ea69). CI on this head: 62 success, 12 skipped, 0 failed, 0 pending. Fix round for contract record 7024432523: F1, S1 (ruling 7024577075 cited in the ADR note), S2, N1; table in the PR body's "Fix round" section. Tier H, the area does not land.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1H9ixhgepGZ7fawhL

L1 delta verdict (L1-a): ACCEPT at head df2fcffbf383ad9ca0e98def44e652cbdd9dd177 (announced in 7025424447). This supersedes my ACCEPT 7024317244 at ce88a4ea. The delta answers contract record 7024432523 (F1, S1, S2, N1).

Gates on this head: 74 check-runs: 62 success, 12 skipped, 0 failed, 0 pending. Lint & Repo Gates and TypeScript Type Check both passed.

What I checked in the delta (ce88a4ea..df2fcffb, 5 files, +15 / -16):

  • F1, the spec carries the scope and not the instruction. The candidates .describe and the DatasetTermCandidateSchema doc comment now read "A term whose candidates are all dimensions is offered them as a possible grouping, not for a question, and does not stop a matched measure." That is declarative, says "term" like the rest of the file, and is the wording the record proposed. git grep "never ask about it" -- packages/spec finds nothing at this head. The generated dataset-tools.mdx row is the new .describe string word for word. The changeset now says the spec "states the same scope in its own words" and "does not carry the sentence above", which is true of the tree.
  • S1, the authority. The ADR-0149 note opens with the maintainer's approval, verbatim 「不再反问」, ruling record 7024577075. Its terms match that record: dimension candidates only, not asked about, may be used as the grouping, measure candidates still asked about and never selected. The "What this note amends" point names both things the record asked for: rule 1 amended in place, and [Decision] The published skills: who reviews a change, how they are verified, one catalog or two for code-first and MCP, and the E2 premise reading #34691 F1 = B narrowed "never selected" included. The "State on main" point now says the spec carries the scope and not the sentence, and cites M1 (ruled A) for why.
  • S2, eval 16. The bare ? and ? are replaced by the phrasings of a question about the term (您是指, 你是指, 您指的是, 你指的是, do you mean, Do you mean). A correct grouped answer does not contain these, including one that ends with an unrelated follow-up question. This was my earlier note too.
  • N1. The doc comment cites "the amendment note of 2026-11-19" rather than "the second amendment note".
  • Untouched: the candidates Zod shape (same members, order, cap), so Clause-②: no and Metadata-protocol: none still hold, and the changeset level stays patch.

Notes (non-blocking): N2 and N3 of the record were left to the seat, as the record says.

Next: Tier H. It goes to the seat for landing on the maintainer's approval.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF

Contract review — delta

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: df2fcffbf383ad9ca0e98def44e652cbdd9dd177
Prior-record: 7024432523
Local-runs: none
Scope: the six commits ce88a4ea69c8f4cf7885375594c6e7a21f5fe5de..df2fcffbf383ad9ca0e98def44e652cbdd9dd177 (5 files, +15/-16): packages/spec/src/ai/dataset-tools.zod.ts, content/docs/references/ai/dataset-tools.mdx, docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md, skills/objectstack-ask/evals/metric-selection-fallback.json, .changeset/35158-ask-back-measure-scope.md
Security-touching: no

Inputs read: prior record 7024432523 (read at ce88a4ea69c8f4cf7885375594c6e7a21f5fe5de); the delta diff between that head and this one; ruling record 7024577075 on #35158; the PR body with its "Fix round" section; the check-runs on this head; at this head, dataset-next-step.ts lines 346 to 460, the two skill rows, and eval cases 16 and 17. SKILL.md, its generated copy, the executor and both door strings are unchanged since the prior head, and main has not moved under the three executor files.

Per-item

Item Status Reading at this head
F1 (must-fix) Resolved The candidates description and the DatasetTermCandidateSchema doc comment now read "A term whose candidates are all dimensions is offered them as a possible grouping, not for a question, and does not stop a matched measure." Declarative, in the file's vocabulary ("term"). "never ask" and "at most a possible grouping" no longer occur in the file. The reference page row equals the description sentence for sentence. The changeset and the ADR note's "State on main" point both say the spec carries the scope and not the door sentence, and the note cites M1, ruled A, for it.
S1 Resolved See "Ruling fidelity" below.
S2 Resolved Case 16's must_not_contain drops the bare ? and ? and names a question about the term (您是指, 你是指, 您指的是, 你指的是, do you mean, Do you mean). A correct answer that ends with an offer in question form no longer fails. A question in other words escapes the tokens and is left to expected_output ("The reply carries no question back"), which the prior record allowed.
N1 Resolved The doc comment cites "ADR-0149 D3, the amendment note of 2026-11-19".
N2, N3 Unchanged Nits outside this round's fix table; N3 still has no carrier. Neither blocks.

Ruling fidelity (S1)

  • The record. Comment 7024577075 on Ask skill and ADR-0149 D3: scope the ask-back to words with a measure candidate #35158 states: option 1, the maintainer's verbatim 「不再反问」; a term whose candidates are all dimensions is not asked about and may be used as the grouping the question asks for; this narrows [Decision] The published skills: who reviews a change, how they are verified, one catalog or two for code-first and MCP, and the E2 premise reading #34691 F1 = B for dimension candidates only; a measure candidate is still asked about and never selected. The record is the seat's transcription of the maintainer's word. This PR is Tier H, so it lands only on his own approval, which stands behind the transcription.
  • The note quotes it faithfully. Its second sentence carries the record id 7024577075, the verbatim 「不再反问」, and the ruling's three clauses in the ruling's own words, with nothing added to them.
  • Not wider. The new point "What this note amends" limits the narrowing to "a dimension offered to a term whose candidates are all dimensions" and says "A measure candidate, and every candidate of a term with a measure among its candidates, stays as ruled: offered for a question and never selected." A term with a dimension and a measure among its candidates is therefore still asked about. No sentence of the note, the spec, the skill or the evals lets a measure candidate be chosen.
  • Not narrower. Both halves of F1 = B are narrowed for such a dimension, "never selected" included, as the prior record asked: it is put in no question and may be used as the grouping with no choice put to the person first. Rule 5 still asks for the missing number.
  • Code. groupingOnly is decision === 'candidates_only' && offered.every((m) => m.kind === 'dimensions') (dataset-next-step.ts:346). One measure among a term's candidates makes it false, and the term is asked about (asked = … filter((r) => !r.groupingOnly), lines 383 and 444). No path acts on a measure candidate. The PR changes no executor.
  • Skill and evals. The row "A word with a measure among its candidates" asks, and covers the mixed term; the row "A word whose candidates are all dimensions" does not ask. Case 16 is the dimension-only term beside a matched measure: one query_dataset call, grouped, no question. Case 17 is the single measure candidate: a question, no call, and sales_amount forbidden in the reply.

Clause-② and semver

The spec .describe string changed again in this round. The Zod shape did not: against main, the file's diff holds only doc-comment and description-string lines, and no z. call, .min(1), cap or enum value moves. Clause-②: no, Metadata-protocol: none and patch for @objectstack/skills, @objectstack/mcp and @objectstack/spec all hold. The changeset text now agrees with the description.

PR body against the head and its check-runs

  • The "Fix round" section names this head and its four rows agree with the diff.
  • Check-runs on this head: 74 runs over 70 names; 62 success, 12 skipped, 0 failed, 0 pending. The body's "70 check-runs, 60 success, 10 skipped, 0 failed" is the first pass; four PR-level checks ran a second time after a body edit. Nothing is red or pending.
  • Sections above "Fix round" still describe the prior head. See S3.

New findings

S3 (should-fix, body only, no new head) — PR body. Three passages contradict the head and the "Fix round" table below them:

  • "What changes", Spec description: "carries the door sentence for a term whose candidates are all dimensions". The head carries the scope, not the sentence. The section's opening "The sentence every copy now carries" is wrong for the spec for the same reason.
  • "Acceptance notes": "The spec description now holds an instruction to the reader." It does not at this head.
  • "Acceptance notes", ADR provenance: "No option ruling scopes the ask-back." Record 7024577075 now does, and the note cites it.
    Correct or strike them before the approval ask goes to the maintainer; he reads the body. The "Tests" and "Skills size readings" sections are stamped ce88a4ea69 and say so; the skill is unchanged since, and CI on this head covers the spec text.

N4 (nit) — ADR note, second sentence: "Approved by the maintainer on PR #35662 … (ruling record 7024577075)". The record sits on issue #35158, and the id is bare, where the same sentence links record 6973927307. Link it as https://github.com/objectstack-ai/objectstack/issues/35158#issuecomment-7024577075 so a reader finds it.

N5 (nit) — PR body: the check-run count reads 70/60/10; the head now shows 74/62/12 for the reason above.

Reviewed-by: session_016WV4d1PJ4isQ3eD7Fk1fnF

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF

席位核对 — ACCEPT · repo:objectstack#4 · head df2fcffbf383ad9ca0e98def44e652cbdd9dd177

  1. 形态:spec 描述改为陈述句、参考页重生成、ADR-0149 注记、ask skill eval、changeset;Zod 形状不变。
  2. 前提实测:复审对照裁决原文,混合候选仍反问、指标永不选中,既不放宽也不收窄。
  3. 门禁:现 head 74 个 check-run,0 失败、0 进行中。
  4. 接受的偏差:旧 N2、N3 不改;S3/N4/N5 已在 PR 正文修正(无推送)。
  5. 范围外去向:无。
  6. 落地条款:os-zhuang 或 hotlong 批准后由批准人入队;Clause-②: no,patch。

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 19, 2026 23:49
@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 44678044341 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (3/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/approval-read-over-mcp.dogfood.test.ts > an approver's agent lists the approvals waiting on them over MCP (#32442, read half) > ⭐ the query tool's tex
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: expected 'Query records from an object with opt…' to contain 'sys_approval_request'
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 15 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue protocol:ai size/s 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.

Ask skill and ADR-0149 D3: scope the ask-back to words with a measure candidate

3 participants