Repository navigation
fix(analytics): list_datasets no longer asks about a measure whose dataset cannot give the grouping the question asks for - #39275
Conversation
…dataset cannot give the grouping the question asks for Step 2 of the ruling on the ask-back card, after the ADR-0149 grouping note of 2026-12-03. Before the question about a word with a measure among its candidates, `nextStep.note` carries one client-judged sentence: the dimensions the datasets of those measures can be grouped by, and that a breakdown or a ranking no one of those datasets carries in full is answered from the records, labelled, with each measure mentioned. Nothing is selected: `decision`, `terms`, `candidates` and `matches` are unchanged. The `list_datasets` description and the MCP `initialize` rule carry the rule in one shared sentence, the spec's candidate descriptions say it, and the tools/list ceiling moves to 39,300 with its record (38,940 -> 39,291 bytes). Claude-Session: https://claude.ai/code/session_01Utp6CZZJZbv4C69FGSTHqa Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 188 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 26a60577b486800fa2a868d70f7b763410c4cd10 && git checkout 26a60577b486800fa2a868d70f7b763410c4cd10
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ee2be20078ad7a4e6984cf916fa31028476095c5 041fc8f8d994bdbea766e59cf5676ac47ccc5be0 && git checkout -B drift-repro ee2be20078ad7a4e6984cf916fa31028476095c5 && git merge --no-ff 041fc8f8d994bdbea766e59cf5676ac47ccc5be0
node scripts/docs-audit/affected-docs.mjs --json ee2be20078ad7a4e6984cf916fa31028476095c5
|
…is written Contract review of this pull request, finding S1: the description of `nextStep.note` and the doc comment of `DatasetTermCandidateSchema` said without condition that the note names the dimensions. The executor writes that sentence on a complete answer, before the question about such a term, and not on a `partial: true` answer, where the term is asked about as before. The descriptions now say so, and say each such measure is mentioned. Three comments are brought to the whole-grouping wording. No sentence a client is served through tools/list, initialize or nextStep.note changes. Claude-Session: https://claude.ai/code/session_01Utp6CZZJZbv4C69FGSTHqa Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-bill · os-bill · session_01Utp6CZZJZbv4C69FGSTHqa Contract reviewServed-tier: PR #39275 for card #39221, the second of the card's two pull requests. Read for this record: the card body and its six comments (7366872295, 7366924507, 7368119428, 7368143683, 7368999305, 7369484774); ruling record 7363768737 and the analysis it adopted, 7361140919, both on #39152; the two review records on #39258 (7368304065 and 7368738223), for nit N8 of the second; the pull request body, its file list (nine files) and its one comment (7370650110, the advisory docs-drift bot); the net diff from merge base ① Derived judgments
② Semver levelThe changeset ③ Boundary flagsCheck-runs, read last, at 2026-12-03T07:09Z. 54 runs on the head: 15 SQL push-down. The diff adds no query, no id materialisation and no join. Flags, each answered.
④ Design judgmentFile: Against the note of 2026-12-03 on #39221. The new sentence in the Against its first consumer. The File: Where the sentence is written. In the What it names. One entry per dataset that holds a measure candidate of the words asked about, in listing order, each with the labels of the dimensions its served entry lists, and "nothing" for an entry with none. A dataset that offers the word only a dimension is not listed, which is the note's definition of an offered reading. A sixth reading beyond the cap is no entry of The date mark. The condition, and N8. English: "that dataset does not carry everything it is to be split or ranked by", and with several datasets "no one of those datasets carries everything it is to be split or ranked by". Simplified Chinese: 「该数据集的维度不能涵盖问题要求的全部分组口径」 and 「没有任何一个数据集的维度能涵盖问题要求的全部分组口径」. Traditional Chinese: the same two clauses in its own characters. Japanese: 「このデータセットのディメンションが求められた切り口のすべてを含んでいない」 and 「求められた切り口のすべてを含むデータセットが一つもない」. All four say everything the question groups by, and all four say within one dataset. Two things each carried by a different dataset meet the condition in all four, and one dataset that carries all of them does not, which is the note's fourth uncovered case kept as written. N8 is held. The order given. All four languages say, in the same order: do not ask about the word; answer with the object query tools, both named; say in the answer that no governed metric was used (the two Chinese copies add 「非指标口径」, as their fallback sentences already do); mention the measure as a declared metric that cannot be split that way; do not compute it. With more than one measure offered, all four switch to the plural: "each reading" and "any of them", 「这些」 and 「它们」, 「這些」 and 「它們」, 「それぞれの候補」. All four end by handing over to the question ("Otherwise:", 「否则:」, 「否則:」, 「それ以外の場合:」), and the question that follows is unchanged, so the exception form the note asks for is kept: the condition is an exception to asking, and the default after it is to ask. Files: The two strings are the same, character for character, and stand at the same place in both texts: after the own-word sentence and before the sentence about a word whose candidates are all dimensions. The sentence states the condition whole and within one dataset, the labelled fallback, and the mention in the note's wording. Both texts end by telling the client to follow Attempts to break it. These held. A question for one total ( These err toward asking, which is the behaviour on Findings. S1 (should-fix) — The spec's two statements about N1 (nit) — The shared door sentence says "no one of those candidates' datasets", where the note, the spec and the executor read the datasets of the measure candidates only. "Those candidates" are the word's candidates, and a word with a measure among them can have a dimension candidate in another dataset. Take a word with a measure candidate in a dataset that cannot give the grouping and a dimension candidate in a dataset that can: the door sentence read literally keeps the question, and the executor's sentence in the answer drops it, as the note rules. The executor's sentence governs ("follow its note") and the error is toward asking. The spec's wording, "those measures' datasets", would bring the two doors to the same reading. N2 (nit) — The door sentence says "the candidate is mentioned" and both spec texts say "the measure is mentioned", in the singular. The note rules that each measure candidate of the term is mentioned, and the executor writes "each reading" when more than one is offered. It is nit N6 of record 7368304065 again, on these texts. N3 (nit) — With two or more words asked about in one call, the executor writes one sentence for all of them: the datasets of every such word's measure candidates, one condition over "those datasets", and "do not ask about the word" in the singular. The note reads the condition per term. The pooled condition is the stricter one, so it never drops a question the note owes. But a word whose own readings cannot give the grouping is still asked about when another word's dataset can, where the note says it is not. No test added by this diff sends two such words in one call. Left as an accepted deviation or a follow-up card. N4 (nit) — The English and Japanese copies call the measures "readings" and 「候補」, the same words the sentence just before uses for all of the word's candidates, dimensions included ("possible readings: ..."). So "mention each reading as a declared metric" can be read to take in a dimension candidate, and "the reading" is said where two readings were just listed, one of them a dimension. The two Chinese copies say 「候选指标」 and 「候選指標」, candidate metrics, and do not have this. The four languages agree on the rule and differ on this one noun. N5 (nit) — No text a client reads states the note's point "Where the client cannot tell, the question is owed". The executor's sentence implies it by its form (the condition, then "Otherwise:" and the question), and I accept that. The changeset states it as behaviour ("a grouping the client cannot place are still asked about as before"), which is the note's rule and not something the door says. N6 (nit) — For a word left out beside a matched measure, the sentence says "say in the answer that no governed metric was used". The matched word's figure in the same answer does come from a governed metric. The existing sentence for left-out unknown words scopes its label ("for them"). One client could label the whole answer. N7 (nit) — Three comments still describe one grouping, the form N8 warned of: the first of the two stacked doc comments above Closing the round: S1 is open on this head and earns a delta review of its fix. The nits are in code and in published text, so a fix to any of them moves the head; they can ride with the fix for S1 or be left. The check-runs named in ③ had not concluded when this record was written. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-bill · os-bill · session_01Utp6CZZJZbv4C69FGSTHqa The brief the card thread handed its isolated contract reviewer for record 7370830784 on this pull request, as filled from Contract review brief — PR #39275 @
|
…out a candidate The page summarised the selection rule as 'a word with no match but with candidates is the same question', with no exception. It now says the question is about a measure candidate, and lists the four scopes the rule carries: the user's own word, the grouping no candidate's dataset carries, a word whose candidates are all dimensions, and a word that names the field a filtered candidate measure aggregates. Claude-Session: https://claude.ai/code/session_01Utp6CZZJZbv4C69FGSTHqa Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-bill · os-bill · session_01Utp6CZZJZbv4C69FGSTHqa Contract reviewServed-tier: Delta review of PR #39275 for card #39221, after record 7370830784 on ① Derived judgments
② Semver levelUnchanged. The changeset still takes ③ Boundary flagsCheck-runs, read at 2026-12-03T07:52Z. 78 runs under 74 names: 63 SQL push-down. The delta holds description text, comments and prose. Nothing to judge. Flags, each answered.
④ Design judgmentEarlier finding: S1: closed What the finding asked, and what the spec file says now. The finding had two halves: the two statements about The The Whether the fix says anything the executor or the note does not bear out. I read the three new passages against the note of 2026-12-03 on #39221 again. "Each such measure is mentioned" is the note's "mentions each measure candidate of the term". "On a complete answer" is the note's "That reading rests on a complete answer". Neither passage gives the reader an instruction, so M1 still holds. One phrase is wider than the code when read word for word, and it is N8 below. The implementing files. The delta changes comments only in the three of them. The two stacked doc comments above No must-fix, no should-fix. N8 (nit) — "on a Closing the round: S1 is closed on this head and nothing is opened that earns another round. Every check-run on the head has concluded and none is red. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd 维护者速读
席位核对ACCEPT · head
|
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd Landing · 2026-12-03T07:59Z · seat ACCEPT 7371676946 and contract review delta PASS 7371580901 at head |
Requested by Bill · project thread
Fixes #39221
Clause-②: no
Metadata-protocol: none
Skills-docs: follow-up #39285
The two lines above are the claim's (comment
7366924507on the card, amended by7368143683). This is the second of the card's two pull requests. The first, #39258, put the ADR-0149 note onmain; this one brings the executor's sentence, the two tool texts and the spec's descriptions to it.维护者速读
What changes
Ten files, 480 lines added and 24 removed, in three commits (
1ad166da;36d173cbfor the review round below;041fc8f8for the docs page the seat added to the claim, card comment7370879667). Nothing is selected and no key changes:nextStep.decision,nextStep.terms,candidatesandmatchesare what they were (term 2 of the ruling, record7363768737). Only text changes.packages/services/service-analytics/src/dataset-next-step.tsnextStep.note(groupingCheck), written after the re-send sentence and before the question about a word with a measure among its candidates, in both places that question is written:candidates_only, and a word left out beside a matched measure. English, Simplified Chinese, Traditional Chinese, Japanese.packages/services/service-analytics/src/dataset-tools.tsLIST_DATASETS_DESCRIPTIONgains one sentence (DATASET_GROUPING_TERM_SENTENCE).packages/mcp/src/mcp-server-runtime.tsDATASET_SELECTION_RULE(the MCPinitializeinstructions) gains the same sentence at the same place.packages/spec/src/ai/dataset-tools.zod.tscandidates,nextStep.note, and the JSDoc ofDatasetTermCandidateSchemasay when a measure candidate is owed no question. No schema shape changes.content/docs/references/ai/dataset-tools.mdxpackages/mcp/src/tools-list-weight-34689.test.tsTOOLS_LIST_BYTE_CEILING39,000 to 39,300, with its record, as the file's header prescribes (table below).content/docs/ai/connect-mcp.mdxinitializerule said "a word with no match but with candidates is the same question" with no exception. It now says the question is about a measure candidate and lists the four scopes the rule carries (the user's own word; this grouping case; a word whose candidates are all dimensions; a word that names the field a filtered candidate measure aggregates).The sentence, in English, for one measure in one dataset:
How it follows the note on
main(ADR-0149 D3, the grouping note of 2026-12-03):partial: trueanswer carries no sentence; the word is asked about as before.tools/list weight
tools/listbeforetools/listafterlist_datasetsdescription before, afterThe 351 bytes are the one sentence in
list_datasets' description. The seat agreed to the ceiling move (claim amendment7368143683). 9 bytes are left under the new ceiling; the seat read that headroom as fine (its note of 2026-12-03T07:20Z in the seat thread, not a card comment).Why
Step 2 of the ruling on #39152: "a measure candidate whose dataset cannot give the grouping the question asks for is not asked about, the records answer, labelled, and the measure is mentioned. Nothing is selected in either step." Term 4 orders the work: the ADR note first (#39258, merged as
a9af21b9), then the executor and the tool description (this pull request), then the skill row (a skills card of its own, the seat's to file).Review round (heads
36d173cb,041fc8f8)Contract review
7370830784on1ad166da: PASS, with one finding to fix and seven nits. The brief is comment7370842622.36d173cb: the spec's description ofnextStep.noteand the doc comment ofDatasetTermCandidateSchemasaid without condition that the note names the dimensions. The executor writes the sentence on a complete answer, before the question it writes about such a term, and not on apartial: trueanswer, where the term is asked about as before. The two descriptions and the doc comment now say so, and the reference page is regenerated.041fc8f8adds the docs page above and nothing else. Neither commit changes a sentence served.36d173cbchanges no sentence served throughtools/list,initializeornextStep.note:tools/listis still 39,291 bytes, and the executor's copy and the door sentence are byte-identical to1ad166da.7371580901on041fc8f8: PASS. S1 is closed and nothing new is opened at a blocking grade. It leaves one nit, not fixed here because a fix would move the reviewed head: the spec's "on apartial: trueanswer it names none" is wider than the code when read word for word, since on a partial answer the note can still name a dimension as the grouping another word equals; what is left out is the listing this pull request adds.Tests
packages/services/service-analytics/src/__tests__/dataset-tools.test.ts: a new describe, "[ADR-0149 D3 grouping note] list_datasets nextStep — a measure candidate whose dataset cannot give the asked grouping", 11 tests: the sentence's place in four languages; nothing selected (decision,terms,candidates,matches); a word left out beside a matched measure; the datasets of the measures offered, in listing order, and "nothing"; the date mark; one measure against several; the whole grouping with one dataset and with several; no sentence on a partial answer; a member not admitted for the caller is never named; no sentence where no question is owed; the description sentence's place. One existing control was rewritten, because the note now names the object tools inside the condition.packages/mcp/src/initialize-selection-rule-34686.test.ts: both doors carry the shared sentence at the same place.packages/mcp/src/tools-list-weight-34689.test.ts: the ceiling, as above.1ad166da:@objectstack/service-analytics5,968 passed, 345 skipped;@objectstack/mcp1,662 passed;@objectstack/spec29,282 passed, 3 todo;typecheckof the three packages exit 0. At36d173cb(describe text and comments only):@objectstack/specsrc/ai592 passed, the analytics file above 107 passed, the two MCP pin files 19 passed,typecheckof the three exit 0, and the spec'scheck:generatedreports its 14 artifacts up to date. At041fc8f8(one docs page): the 20 documentation gates of the derived list exit 0.Live check
The ruling names a premise for this step and bans building it if the premise fails: "at 5 reps on both arms
booked_by_categoryreaches 4/5 or better anddq_booking_totalanddq_claimed_so_fardo not fall."runCardin ask mode (packages/qa/scenarios) on the committed builds oforder_to_cashandtravel_expense, with the card's questions filtered to the four below:pnpm --filter @objectstack/scenarios exec tsx measure.mts --repeats 5 --arms off,on --plan '{"order_to_cash":["booked_by_category","dq_booking_total"],"travel_expense":["top_claimants","dq_claimed_so_far"]}'. Driver: Claude Code CLI 2.1.335, subscription login, model haiku (servedclaude-haiku-5-5), effort medium. Arm "off" has no skill; arm "on" installsskills/objectstack-askas it is onmain.mainat8d1a829c. The others are the executor's sentence as first written (846935f2), after the review round of docs(adr): ADR-0149 D3 — a measure candidate is not asked about when no offered reading's dataset carries the question's grouping #39258 (893b81b5), and with the whole-grouping wording of N8 (2c2b39e4), which is the wording of this pull request: its three packages' sources are byte-identical to that tree.846935f2893b81b5846935f2893b81b5booked_by_categorytop_claimantsdq_booking_totaldq_claimed_so_farbooked_by_categoryis 5/5 on both arms.dq_booking_totaldoes not fall on either arm.dq_claimed_so_fardoes not fall with the skill on. With the skill off it reads 0/5 against 1/5: see the next point and the Acceptance notes.dq_claimed_so_far, arm off. All 5 failing asks made nolist_datasetscall (the grader's note on each: "called no list_datasets"), so the executor's sentence was never served to them. The same holds for the 4 failing asks of each earlier reading. To see the cell's spread, the same question was asked 10 more times on the same build, arm off: 4 of 10 passed, and again each pass calledlist_datasetsand asked back, and each failure made no call. On this wording the cell is 4 of 15.candidates_onlyanswer, all 17 were served the new sentence (11 in the "each reading" form, 1 with several datasets listed) and 16 passed. The other 3 asks did not end oncandidates_onlyand passed.top_claimants, arm on) did not ask back. It took the records route as the sentence says, then gave up after itsaggregate_recordscall was refused: it grouped byclaimant__labeland wrote the status filter as a bare array.Acceptance notes
dq_claimed_so_farskill-off cell reads 0/5 on this wording against 1/5 before. The seat read the premise as holding (card comment7370879667): none of the failing asks calledlist_datasets, so the executor's sentence was never served to them, and the 10 extra asks give 4/10, so the cell is 4 of 15 on this wording against 1 of 5 before. The reading is the seat's, not the dev's; it is named here so a reviewer can disagree with it. One limit of the reason, from contract review7370830784: the sentence added tolist_datasets' description and to theinitializerule does reach every ask, including those that never call the tool, so the diff is not out of reach of those asks; what the readings show is that the cell did not fall.top_claimants, skill on, 4/5. The failing ask is anaggregate_recordsauthoring failure after the door's sentence was followed (grouping byclaimant__label, a bare array as an equality comparand). Not this diff's; not filed here.mainare still written for one grouping; the note is not edited here.skills/objectstack-ask/SKILL.md, step 2) restates the ask-back rule without this scope. Its card is skills/objectstack-ask: teach step 2 of ruling P (no ask-back when the candidate's dataset lacks the asked grouping) #39285, filed by the seat as a sub-issue of this card.Verification
dataset-next-step.ts, thegroupingCheckcopy in four languages andgroupingSentences(which datasets and dimensions are named, and thepartialguard); thendataset-tools.ts#DATASET_GROUPING_TERM_SENTENCE; then the two describe strings indataset-tools.zod.ts.pnpm --filter @objectstack/service-analytics exec vitest run --maxWorkers=2 src/__tests__/dataset-tools.test.tsprints 107 passed, 10 skipped.node scripts/pm/dispatch-gates.mjs --commandsderives for this diff was run locally with each exit code recorded; the counts and the--ranreconciliation are in the dev's report on the card. CI answers the families it runs.🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CZZJZbv4C69FGSTHqa