Skip to content

fix(service-analytics): list_datasets asks nothing when a word that falls back stands beside a grouping word - #36509

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-34996-ask-skill-over-asking
Nov 22, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/issue-34996-ask-skill-over-asking

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Part of #34996. The card stays open: the 5-rep round that keeps or drops this change set is the eval seat's, and the ask-back over a single measure candidate is ruled behaviour this PR leaves as it is (see Acceptance notes).

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用 AI 问数的人问「各状态的销售订单各有多少」这类问题时,助手以前会停下来反问「你想看哪个数字」,现在直接按记录统计并注明这不是指标口径的数。
  • 为什么做:属于「AI 问数」专题;最近一轮样板应用验收里,助手反问过多是丢分最多的一项。
  • 出错会怎样:最坏情况是助手在本该先问清楚的时候直接给出一个按记录统计的数,答案里带着「非指标口径」的标注;撤回这一个改动即可恢复原样。
  • 要你做什么:评测席跑完一轮五次重复的问数评测并确认有效之后,审批这份对外发布的技能文字。

What changes

One over-asking path, measured and fixed at its root, plus one term-lifting line. A question that names its number ("How many sales orders are in each status?") was asked back "which number do you mean?" whenever its grouping word equalled, or was near, a dataset dimension and no dataset measure answered to the number word. One object answers that question through the labelled fallback; the served text said to fall back and to ask in the same breath, and a careful client asked.

The served sentences, and why each reads as "ask" when one object matches

Where it is served Sentence on main Why it over-triggers
list_datasets answer, nextStep.note (dataset-next-step.ts, the groupingTail copy, four locales) "A grouping alone is no answer: ask the user which number they mean." Written whenever a grouping word had no measure word matched beside it, also when another word in the same call falls back. The note then held "Answer with the object query tools ..." and this sentence together. The grouping is not alone there.
list_datasets tool description (dataset-tools.ts) "A dimension match alone picks a grouping, not a number: a measure must still match." "a measure must still match" reads as a stop when the number word matched nothing, where the rule two sentences earlier says to fall back.
Published skill, step 2 (skills/objectstack-ask/SKILL.md, served again by GET /mcp/skill) "Only a dimension matches: That is a grouping, not a number. Without a measure match, ask which number is meant." "Only a dimension matches" is literally true of a call whose number word matched nothing and whose grouping word matched, so this row and the fallback row both apply, and this one says ask.
Published skill, step 1 "A term is the noun phrase for the thing, kept whole (travel budget, not travel and budget)" It does not say a counting head is part of the phrase. The eval reading on the card (4 of 4 runs): "number of claims", a declared synonym of one measure, was sent as "claims", which equals nothing and comes back near two measures, so the client rightly asked.

The fix

  • composeDatasetNextStep writes the "which number" sentence only when every word sent is a grouping (it equals a dimension, or has only dimensions among its candidates). With an unknown word beside it (no measure, no dimension, no candidate) the note carries that word's labelled fallback and no question. Two branches change: the no_measure note, and the candidates_only note whose reported words are all possible groupings. decision, terms, matches and candidates are untouched. Round 2 (head 4342cf009, after L2 record 7081905010 S1) adds one copy key, noNumberTail, in four locales: beside such a fallback the note ends with "Only when the question has no word for a thing measured, ask the user which number they mean instead." The executor sees words, not which one names the number, so the client judges; the outright question stays for a call whose every word is a grouping, and is never written beside a fallback sentence.
  • The tool description now reads: "A dimension match picks a grouping, not a number: when the question has no word for a thing measured, ask which number is meant; beside a word for a thing measured that falls back, ask nothing and take the fallback." The dataset-next-step.ts jsdoc states the executor's presumption and where it is wrong.
  • Skill step 2: the row becomes "No word for a thing measured, only grouping or filter words", and the fallback row reads "Step 4, without asking: a grouping word's match, or another word's, is no reason to ask." The clause under the table that said the same of another word's matches is cut, since the row now holds it.
  • Skill step 1: the kept-whole example gains a counting head ("number of deals", not "deals").
  • packages/mcp/src/ask-skill.generated.ts is regenerated by scripts/gen-mcp-ask-skill.mjs, never hand-edited.
  • Eval cases 21 to 24 in skills/objectstack-ask/evals/metric-selection-fallback.json: the fallback beside a grouping candidate (quoting the note as the executor now writes it), the fallback beside a dimension match, the whole counting phrase as the first call, and (case 24, round 2) a grouping plus a filter word with no word for a thing measured, where the reply is the which-number question alone. Round 2 rewords the forbidden tokens of cases 21 to 23 to the question as put to the user and the cut-down word as a term sent; a grader proof ran 13 of 13 checks as wanted.

What does not change, on purpose

  • A word that equals several measures is still asked about; a word with a measure among its candidates is still asked about and never selected, a single candidate included (ADR-0149 D3 and its notes of 2026-11-17 and 2026-11-19). Their pins stay green and one new pin holds the candidate question beside an unknown word.
  • The MCP initialize rule (DATASET_SELECTION_RULE, mcp-server-runtime.ts) is not edited: read sentence by sentence, it asks only in those two ruled cases and says "No match and no candidates: fall back". It carries no dimension-alone sentence.
  • A grouping word alone ("by stage", "this quarter") still asks which number is meant (D3 rule 5).

Read first (by risk)

  1. packages/services/service-analytics/src/dataset-next-step.ts: the two conditions in composeDatasetNextStep (candidates_only and no_measure), and the header section "A grouping beside a word that falls back asks nothing".
  2. skills/objectstack-ask/SKILL.md: step 2 rows five and six, and the cut clause in the paragraph under the table.
  3. packages/services/service-analytics/src/dataset-tools.ts: one sentence of LIST_DATASETS_DESCRIPTION.

Skill size (governed catalog; growth is paid by deletion in the same file)

Reading Before After
skills/objectstack-ask/SKILL.md lines 128 127
skills/objectstack-ask/SKILL.md tokens (the ratchet's count; ceiling 1877, not moved) 1875 1875 (round 1: 1872)
All 14 SKILL.md files, lines 4950 4949
Ratcheted authored tokens, whole catalog 197507 197504
evals/metric-selection-fallback.json (eval fixture, measured, not ratcheted): lines, tokens 205, 7007 235, 8425
Bundle total tokens (whole shipped tree) 290262 291677

Added to the skill: the counting-head example (+32 bytes) and the two reworded rows (+75). Deleted: the clause "; when their word matched nothing and has no candidates, go to step 4 instead of asking about some other word's matches" (-119), whose content the fallback row now carries. Net -12 bytes at round 1 (7520 to 7508); round 2 adds " or filter words" to row five: 7518 bytes, 1875 tokens, headroom 2.

Tests

Measured: what list_datasets serves for the gallery's failing questions. The scenario cards pin their datasets, so the real matcher, candidate finder and note composer were run over docs/qa/scenarios/order_to_cash.json and travel_expense.json (a scratch script, one node process, locale en), at base 59392ed1d and at head 6c5c5e2ae. The terms are this author's lifting of each question by the skill's step 1, not a recording: the gallery recordings are not readable from this container.

Question (card item) Terms sent Note at base Note at head
"How many sales orders are in each status?" (orders_by_status) sales orders, status candidates_only: offers Order status as a possible grouping, then "A grouping alone is no answer: ask the user which number they mean.", then the fallback for "sales orders" the same note without the question
the same, grouping word as the dimension is labelled sales orders, order status no_measure: "Answer with the object query tools ..." and "A grouping alone is no answer: ask the user which number they mean." the fallback sentence only
"How does the outstanding balance break down by aging bucket?" (receivables_aging) outstanding balance, aging bucket no_measure: fallback and the question, both the fallback sentence only
"number of claims ... by status" (claims_by_status, the eval reading) claims, status candidates_only: Claimed amount and Claim count offered, asked about (correct for that word) unchanged
the same, counting head kept number of claims, status one_measure: Claim count, computed, status offered as a grouping unchanged
"how much has been booked per product category" (booked_by_category) booked, product category candidates_only: one measure candidate (Booked amount), asked about unchanged, by ruling
The three notes that changed, in full (base, then head)
terms ["sales orders","status"]
base: "status" matches no member exactly; it may name a grouping: Order status (dataset: Order book). A possible grouping is not a question: do not ask the user about it, and it does not stop a matched measure; group the answer only as the question asks. A grouping alone is no answer: ask the user which number they mean. "sales orders" equals no measure and has no possible reading. For those words, use the object query tools (query_records, aggregate_records) and say in the answer that no governed metric was used for them.
head: "status" matches no member exactly; it may name a grouping: Order status (dataset: Order book). A possible grouping is not a question: do not ask the user about it, and it does not stop a matched measure; group the answer only as the question asks. "sales orders" equals no measure and has no possible reading. For those words, use the object query tools (query_records, aggregate_records) and say in the answer that no governed metric was used for them.

terms ["sales orders","order status"]
base: "sales orders" equals no measure and has no possible reading. "order status" equals a grouping, not a number: Order status (dataset: Order book). Answer with the object query tools (query_records, aggregate_records) and say in the answer that no governed metric was used. A grouping alone is no answer: ask the user which number they mean.
head: "sales orders" equals no measure and has no possible reading. "order status" equals a grouping, not a number: Order status (dataset: Order book). Answer with the object query tools (query_records, aggregate_records) and say in the answer that no governed metric was used.

terms ["outstanding balance","aging bucket"]
base: "outstanding balance" equals no measure and has no possible reading. "aging bucket" equals a grouping, not a number: Aging bucket (dataset: Billing). Answer with the object query tools (query_records, aggregate_records) and say in the answer that no governed metric was used. A grouping alone is no answer: ask the user which number they mean.
head: "outstanding balance" equals no measure and has no possible reading. "aging bucket" equals a grouping, not a number: Aging bucket (dataset: Billing). Answer with the object query tools (query_records, aggregate_records) and say in the answer that no governed metric was used.

Of 22 term sets tried over the two cards, these 3 changed and 19 are byte-identical at base and head.

Round 2, at head 4342cf009 (under the verify lock unless said): service-analytics dataset-tools.test.ts 95 passed | 10 skipped; package suite 5730 passed | 345 skipped (224 files), typecheck exit 0; mcp typecheck exit 0; mcp suite 1466 passed with 1 failed on two runs, the failure being mcp-file-tools.test.ts "a worker past its wall-clock ceiling is terminated" (a 200 ms load-sensitive worker-pool test this diff does not reach; 54 of 54 alone, green on CI). Ablations through scripts/ablation-replace.mjs, restore proven by blob: the closing condition dropped from no_measure (2 red) and from candidates_only (1 red); the outright question written beside a fallback again in candidates_only (1 red) and no_measure (2 red), the vitest red legs round 1 left NOT MEASURED. A fifth (condition written with no grouping beside the unknown word) was read by a single-process probe (red in 4 locales, restored green); its vitest leg is NOT MEASURED, the lock not obtained. gen-mcp-ask-skill.mjs --check exit 0; skill-evals --dry-run 31 cases.

The round 1 readings below are kept as measured at 6c5c5e2ae.

All at head 6c5c5e2ae, each under the shared verify lock, exit read from the lock's VERDICT line.

  • pnpm --filter @objectstack/service-analytics test: Test Files 224 passed (224), Tests 5729 passed | 345 skipped (6074); pnpm --filter @objectstack/service-analytics typecheck: exit 0. VERDICT command-exit 0.
  • pnpm --filter @objectstack/mcp test (after rebuilding @objectstack/service-analytics and @objectstack/mcp, since the MCP pins read the description from the built package): Test Files 83 passed (83), Tests 1467 passed (1467); pnpm --filter @objectstack/mcp typecheck: exit 0. VERDICT command-exit 0. This run holds skill-single-source-34686.test.ts (the generated mirror equals the skill) and initialize-selection-rule-34686.test.ts (the sentence the two doors share is unchanged).
  • New and changed pins, in packages/services/service-analytics/src/__tests__/dataset-tools.test.ts: the mixed no_measure note falls back and asks nothing, in four locales, with the lone grouping word as the same-locale control; a grouping candidate beside an unknown word falls back and asks nothing, with a lone candidate and two groupings as controls that still ask; an unknown word beside a measure candidate keeps the question about that candidate.
  • Eval file: pnpm --filter @objectstack/scenarios skill-evals --dry-run --skills objectstack-ask: exit 0, "objectstack-ask: 30 case(s)", "23 behaviour case(s) × 2 arms + 7 trigger case(s)", "dry run: no login read, no model called, nothing written". By script: ids 1 to 23 distinct, each new case holds every must_contain token in its expected output and no must_not_contain token.
Ablation: each changed branch, once (narrowed, declared)

The fix was committed first. Each mutation went through scripts/ablation-replace.mjs (anchor hit once, blob changed, restore proven: blob equals HEAD b241cbd65a5a, git diff HEAD empty).

  • Mutation 1, the candidates_only branch back to if (asked.length === 0): the note for a grouping candidate beside an unknown word asks "which number" again in all four locales; the no_measure case stays fixed.
  • Mutation 2, the no_measure branch back to writing both sentences: the mixed note asks again in all four locales; the candidates_only case stays fixed.
  • Restored: neither asks, and a lone grouping word still asks, in all four locales.

Narrowing, declared. The red runs were read through a single-process probe of the composer (the pins' two fixtures and the same sentences, no test runner), not through vitest. The vitest red leg is NOT MEASURED: four attempts to take the verify lock for it each ended VERDICT queue-timeout (exit 99) over about 45 minutes while another worktree's full dogfood battery held the lock (pid 17598, alive, held over 70 minutes at the last reading). The green leg of the pins is the package run above.

Acceptance notes

  • The round this PR is waiting for (eval seat). With-skill arm, ask only, 5 repetitions, haiku medium, --packages workspace built from this branch (the note is composed in @objectstack/service-analytics, so npm 18.6.0 cannot show it), against the last kept round on main. Cards: travel_expense (the loop's card; claims_by_status is the counting-head item) and order_to_cash (orders_by_status and receivables_aging are the fallback-beside-a-grouping items). Keep when asked-back on ordinary questions falls on those items and the dataset ask-back cases (the several-match and measure-candidate cases) hold at their last kept score; drop otherwise. No model round ran here: NOT MEASURED, reason: paid rounds and the gallery belong to the eval seat.
  • Not re-measured wording. The fallback row's new sentence replaces a clause iteration 2 measured ("go to step 4 instead of asking about some other word's matches"). The meaning is kept and moved into the row; the wording itself is new and unmeasured until the round above.
  • What this PR does not move, and why. The 2026-11-21 gallery reading counts 12 failing ask items. This PR addresses the ones where the number word matched nothing and a grouping word matched or neared a dimension. Items where the number word comes back with one measure among its candidates ("booked" near Booked amount, measured below) are asked about by ruling: a measure candidate is offered for a question and never selected. Changing that is the maintainer's decision, raised in the report's open questions and not taken here. The gallery ran on npm 18.6.0, which also still asks about a word whose candidates are all dimensions; main stopped that before this PR.
  • The reading of ADR-0149 D3 this rests on, for the contract review. Rule 4 (no hit: labelled fallback) and rule 5 (a dimension hit without a measure hit is not an answer; the AI still needs a measure hit, or asks) both apply to a call with an unknown number word and a matched grouping word, and the record does not say which governs. main wrote both instructions into one note. This PR reads rule 4 as governing the unknown word and rule 5 as the rule for a question with no number word, on M2 ruled A ("answers everything it answers today, and the governed answers are marked"). A reviewer who reads rule 5 as governing the mixed case should stop this PR at review.
  • Ratchet row. The skill file is 1875 tokens at round 2, 2 under its ceiling, as on main. The ceiling is not moved.
  • Closed in round 2 (L2 S1). The executor cannot tell which word is the number word. The note beside a fallback now ends with the conditional sentence, row five names filter words, and case 24 covers "by stage for the west region". L2 delta record 7083451259 PASS at 4342cf009; its nits N3 to N5 are accepted (N5 folds into the ADR-0149 amendment carried by ADR revisions, week of 2026-11-21: rolling checklist of ADR text out of step with main (one governed PR) #36086, with the rule-4 reading and the noNumberTail sentence).
  • New wording, unmeasured by a model. The conditional sentence puts "ask" back into the note, under a condition. No model round has read it; the eval round above, on this head, is what measures it.

Verification

Two minutes: pnpm --filter @objectstack/service-analytics exec vitest run --maxWorkers=2 src/__tests__/dataset-tools.test.ts prints Test Files 1 passed (1) and Tests 95 passed | 10 skipped (105). Then node scripts/gen-mcp-ask-skill.mjs --check prints "is current with skills/objectstack-ask/SKILL.md", and node scripts/check-skills-token-ratchet.mjs prints "skills/objectstack-ask/SKILL.md is 1875 tokens (ceiling 1877; headroom 2)".

Gates
  • node scripts/pm/dispatch-gates.mjs --commands at 6c5c5e2ae (7 paths vs merge base 59392ed1d): 83 commands, run serially, each exit code recorded before any pipe. --ran: "83 derived famil(ies) accounted for — 81 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)", 0 unrun; the 81 exited 0.
  • NOT MEASURED: check:dual-build-cjs-loads (exit 3, needs a whole-workspace build) and check:type-check-debt (exit 3, its re-measure could not take the verify lock). CI carries both.
  • Named by the dispatch: node scripts/gen-mcp-ask-skill.mjs --check exit 0 ("is current with skills/objectstack-ask/SKILL.md"); node scripts/check-skills-token-ratchet.mjs exit 0 ("skills/objectstack-ask/SKILL.md is 1872 tokens (ceiling 1877; headroom 5)").
  • node scripts/pm/overlap-check.mjs: "VERDICT clean exit 0" (origin/main and the one open PR sharing the skill file merge cleanly).
  • node scripts/pm/check-governed-merges.mjs --branch HEAD: exit 3, GOVERNED, Tier H (skills/**, 2 paths). This PR stays draft; no reviewer is requested here.
  • node scripts/pm/dispatch-gates.mjs --tier: mandatory contract-review tier for skills/**; this change was authored at that tier. A contract-review-tier review is owed before the governed landing.
  • test:repo not run locally (CI owns it; the diff touches no test of that project).

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY

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

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/mcp, @objectstack/service-analytics, touching 9 documentable anchor(s).

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/deployment/self-hosting.mdx (via COPY (symbol, a top-level const object))
What this run could not see
  • the SDK route bridge reached 68 of 251 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 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; 124 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 — 19 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 0b2118f49c0f5b0a4b267b327bc8cfd257f182a8 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 0b2118f49c0f5b0a4b267b327bc8cfd257f182a8

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 0b2118f49c0f5b0a4b267b327bc8cfd257f182a8 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head 6c5c5e2 · 2026-11-22T16:07Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6c5c5e2ae3c4b205179894d77e69160d7fbae118
Local-runs: none
Scope: skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json + packages/services/service-analytics/src/dataset-next-step.ts, packages/services/service-analytics/src/dataset-tools.ts, packages/mcp/src/ask-skill.generated.ts
Security-touching: no

Read for this record: card #34996 (body and all 17 comments), PR #36509 (body, file list, net diff of 7 files against merge base 59392ed1d), the check-runs on the head, and in the tree at the head or on main: ADR-0149 D3 rules 1 to 5 with the notes of 2026-11-17 and 2026-11-19, M2, dataset-next-step.ts whole, LIST_DATASETS_DESCRIPTION, DATASET_SELECTION_RULE, the skill whole, and the count-measure synonyms of the example apps and scenario cards. The test file and the changeset are the lane's and were read as evidence only.

① Derived judgments

  • Check-runs on the head, second read at about 16:11Z: 52 runs. 25 completed success, 16 completed skipped, 11 in_progress (Test Core 1/10 to 10/10 and Build Core), 0 failed. Green among the completed: Check Changeset, Governed Surface Queue Guard, PR-body guards, every Lint family (repo and tooling gates, docs and code guards, ESLint, PM dispatch-gates, CI/release/engine, the three scoped ones), every Type Check family (workspace, source gates, consumer gates, debt ledger). NOT YET ANSWERED on this head: the Test Core shards, which carry the rewritten and new pins in dataset-tools.test.ts, skill-single-source-34686.test.ts (mirror equals skill) and initialize-selection-rule-34686.test.ts. The adopting seat reads them before it acts on this record.
  • list_datasets output shape: unchanged. decision, terms, matches, candidates are computed as before; only which sentences note holds differs, in two branches. Right: no spec schema, enum or accept-set moves, and note is declared a free string (M1 note of 2026-11-17).
  • nextStep.note, no_measure branch: with an unknown word among the words, the note ends in the fallback sentence alone; with every word a dimension hit it ends in the which-number sentence alone. Right against the jsdoc and the changeset.
  • nextStep.note, candidates_only branch whose reported words are all possible groupings: the which-number sentence is written only when no word sent falls back. Right; the left-out sentences then carry the unknown word and its labelled fallback, as before.
  • Unchanged and verified in the code: several_measures, one_measure, the measure-candidate question (candidateHit and candidateTail), the left-out sentences, the partial tail, all four locales' copy strings.
  • list_datasets description: one sentence replaced. DATASET_SELECTION_RULE is not edited and carries no dimension-alone sentence, so the two doors do not contradict each other; the sentence the two share ("A word whose candidates are all dimensions ...") is untouched.
  • Skill: two table rows reworded, one clause under the table cut, one example added in step 1. The generated mirror changes in the same three places and reads identical to the skill at the head, hunk for hunk (read, not run; the gate that proves it is in the pending Test Core shards, and the --check form sits in the green lint families).
  • Eval file: cases 21 to 23 appended, ids 1 to 23, no earlier case edited.

② Semver level

  • Changeset .changeset/34996-ask-fallback-beside-grouping.md: @objectstack/service-analytics patch, @objectstack/mcp patch, @objectstack/skills patch. Each named package has a changed published file in the diff, and no changed package is missing. Patch is the right level: a behaviour fix in a served sentence and guidance text, no export, key, shape or accepted input added or removed. Check Changeset is green on the head.
  • Clause-②: no, on the PR body and in the changeset, and the tree agrees: no file under packages/spec, no published schema, no declared capability taken away. Metadata-protocol: none agrees too.

③ Boundary flags

  • Q1 (dev open question 2), answered on my own reading of ADR-0149: rule 4 governs a word for a thing measured that has no hit and no candidate, also when a grouping word beside it hits a dimension. The change is right for that case and is not graded as a blocking finding. Grounds, from the record itself: (a) rule 5 says a dimension hit "is not an answer" and that the AI "still needs a measure hit (or asks)"; its own example is a grouping with no number word, and in the mixed case the dimension hit is not used as the answer, the number comes from rule 4's fallback; (b) the note of 2026-11-17 says "With no candidate, rule 4 is unchanged" and that rule 4 "still governs" a term with no hit, and the note of 2026-11-19 lists "Rule 4, for a term with no hit and no candidate" under what does not change and calls rule 5's question "a question about the missing measure": a measure word that is present and unmatched is rule 4's case; (c) M2, ruled A, states its consequence as no regression in coverage, "answers everything it answers today": under the other reading, adding a status dimension to any dataset would turn an answered records question into a question back; (d) the skill on main already said it since PR docs(skills): objectstack-ask iteration 2: trigger on every records question, ask back with no figure of its own, whole terms, hidden record kinds declined #35038 ("go to step 4 instead of asking about some other word's matches"), and the executor's one_measure note already sends an unknown word to the fallback beside a grouping. The record does not say this in so many words, and D3 is carried by cloud's planner as well. Escalated, not blocking: ADR-0149 should gain an amendment note recording this reading, on a follow-up card, so the second consumer does not read rule 5 the other way. The limit of the reading is S1 below: where the question has no word for a thing measured, rule 5 governs, and the executor cannot see that.
  • Q2 (dev open question 1), confirmed: a single measure candidate is still asked about and never selected, per ruling record 7024577075 and seat scope note 7032849227. In the diff, asked, candidateHit, candidateTail and leftCandidateTail are untouched; the only edited conditions gate groupingTail. The skill row "A word with a measure among its candidates" and the description's measure-candidate sentence are unchanged. The new pin holds the question beside an unknown word in four locales. The dev's recommendation A (keep the ruling, bring a re-ruling to the maintainer only on a count after a release) stands; the choice is the maintainer's.
  • Dev flag, new row wording unmeasured: accepted as declared. The keep-or-drop of this change set is the eval seat's 5-rep round on a workspace build of this branch; this record does not stand in for it, and the PR stays draft until that round reports.
  • Dev flag, ablation narrowed to a single-process probe, vitest red leg not measured: the lane seat's to accept or re-run; not a contract matter. The green leg is the pending Test Core shards.
  • Dev flag, ratchet row 5 tokens above the file: the seat's call; the ratchet gate is green as it stands.
  • Dev flag, executor cannot tell which word is the number word ("observation, not filed"): not accepted as an observation. It is S1.
  • SQL push-down: no query, no id materialisation and no in-app join is added or changed. No finding.
  • Security: no changed hunk teaches permission, sharing, credential, token or authentication behaviour; the membersWithheld row and the hidden-records lines of the skill are untouched.

④ Design judgment

skills/objectstack-ask/SKILL.md. Holds against the spec it teaches and the card's scenarios. Row five is now keyed on what the client knows and the executor does not (whether the question has a word for a thing measured), and row six takes the fallback "without asking", which is rule 4 as read under Q1 and what the gallery items orders_by_status and receivables_aging need. The cut clause's content is in row six; "Ask only about matches or candidates for words the user wrote" still stands alone and is true. Step 1's counting head agrees with the eval reading 7041940806 and with the vocabulary the tree authors: every count measure in the example apps and both scenario cards declares "number of X" as a synonym and none declares the bare noun, so the whole phrase is the one that can equal a measure. Tried to break it with a several-match word beside an unknown word: row two still asks and the several_measures note says to compute nothing, the same tension the cut clause had on main, not a new one.

skills/objectstack-ask/evals/metric-selection-fallback.json. Case 21 quotes the note sentence for sentence as composeDatasetNextStep composes it at the head for a grouping candidate beside an unknown word (groupingCandidateHit, groupingCandidateTail, unknownHit, leftFallbackTail, no which-number sentence), with the decision and terms the executor reports. Case 22 is the dimension-hit form, and rightly refuses Open Balance as a reading by similarity. Case 23 is the first call with the whole counting phrase. Expected outputs agree with steps 1, 2 and 4 of the skill at the head, the dataset line of step 4 included.

packages/services/service-analytics/src/dataset-next-step.ts. The two edited conditions do what the jsdoc section says, checked case by case: under no_measure every reading is no_measure, so reported.some(fallsBack) is exactly "an unknown word is among the words"; under candidates_only with no asked word and no word that falls back, every word sent is a possible grouping or a dimension hit, which is the jsdoc's "every word sent equals only a dimension, or has only dimensions among its candidates". fallsBack is the predicate leftOutSentences already used, now named once. "One note never says both" holds for the which-number sentence and the fallback sentence in every branch.

packages/services/service-analytics/src/dataset-tools.ts. The replaced sentence agrees with the executor's two branches as written. It shares the overreach of S1.

packages/mcp/src/ask-skill.generated.ts. Equals the skill at the head in all three changed places.

S1 (should-fix) — The executor, its jsdoc and the tool description treat every unknown word as the word for the thing measured; the skill does not, and for a question with no such word rule 5 still governs. A call whose words are a grouping that hits and an unknown word that is not a number word (a filter value or a second grouping no dataset lists: ["stage", "west region"] for "break it down by stage for the west region") was told to fall back and to ask on main; at the head the note says only "Answer with the object query tools", the description says "beside a word that falls back it asks nothing, and the fallback stands", and the jsdoc says the fallback "computes the number the user named", which is false there: the user named none. The skill's row five says to ask in that same case and the skill also says to follow note, so the two served texts now disagree where on main they agreed. The PR body names this and files nothing. Smallest fix that keeps the measured gain: state the condition in the client's terms in LIST_DATASETS_DESCRIPTION, as the skill's rows do (the question is owed when no word names a thing measured; nothing is asked beside a word for a thing measured that falls back), and correct the jsdoc section to say the executor reads an unknown word as the number word and that the client's rule decides when it is not. The note's wording for that case can stay or gain a pin; if it stays, a follow-up card owns it. An eval case for the no-number-word mixed call would hold the skill side.

N1 (nit) — Eval assertions 21 to 23 forbid strings a correct reply may use in negation. Case 23 forbids 'claims' and "claims", while the skill's own step 1 teaches the contrast form ("number of deals", not "deals"): a reply that says the term is 'number of claims', not 'claims', fails the case. Cases 21 and 22 forbid "which number" the same way ("no need to ask which number"). This costs false fails in the with-skill arm, not correctness of the contract; loosen on the prose face or leave as an accepted deviation.

N2 (nit) — Case 22 expects a sum "of the balance field grouped by the aging bucket field" on invoice, and the prompt states no such fields; an aging bucket is commonly a computed dimension with no stored field. The expected output would read better conditioned on what describe_object shows. No effect on the contract.

Verdict basis: the reading the change rests on is the record's (Q1), the ruled ask-back is untouched (Q2), the implementing code agrees with its contract in the case the PR targets, and no finding blocks. S1 is open on this head and earns a delta review of its fix. The pending Test Core shards and the eval seat's round are named above and are not covered by this record.

Implemented-by: claude/issue-34996-ask-skill-over-asking
Reviewed-by: session_01ADHkmT4eA4YqtxfiPyLPih

VERDICT: PASS

…s a closing condition the client judges

The executor cannot tell a word for a thing measured from a filter value, so a
grouping beside an unknown word gets the fallback and then one conditional
sentence: ask which number is meant only when the question has no word for a
thing measured. The description states the same condition in the client's
terms, and the jsdoc no longer says the fallback computes a number the user
named. Skill row five names filter words; eval case 24 covers the call with
no word for a thing measured; cases 21 to 23 forbid the question put to the
user and the cut-down term as sent, not words a correct reply uses in negation.

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

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head 4342cf0 · 2026-11-22T18:08Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 4342cf00921f946bc92b393dad8232a95d5fe2a7
Local-runs: probe — one Python one-liner split the saved card-comments JSON for reading; nothing built, run or re-run
Scope: skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json + packages/services/service-analytics/src/dataset-next-step.ts, packages/services/service-analytics/src/dataset-tools.ts, packages/mcp/src/ask-skill.generated.ts
Security-touching: no

Delta round on the record of comment 7081905010 (head 6c5c5e2ae3c4b205179894d77e69160d7fbae118). Read for this record: card #34996 (body and all 18 comments), PR #36509 (body, file list, the net diff of 7 files against merge base 59392ed1d, and the rework diff 6c5c5e2ae..4342cf009), the prior record, all 53 check-runs on the head, and in the tree at the head or on main: dataset-next-step.ts whole, LIST_DATASETS_DESCRIPTION, DATASET_SELECTION_RULE, the skill whole, ADR-0149 D3 rules 4 and 5 with the notes of 2026-11-17 and 2026-11-19 and M2, docs/qa/scenarios/order_to_cash.json, and the eval grader's token rule (packages/qa/scenarios/src/skill-evals/grade.ts). The test file and the changeset are the lane's and were read as evidence only.

① Derived judgments

  • Check-runs on the head, both pages read: 53 runs, 37 success, 16 skipped, 0 failed, 0 pending. Green at this head: Build Core, Test Core and its shards 1/10 to 10/10 (they carry the rewritten pins in dataset-tools.test.ts, skill-single-source-34686.test.ts and initialize-selection-rule-34686.test.ts, which the prior record had to leave unanswered), Check Changeset, Governed Surface Queue Guard, PR-body guards, every Lint family, every Type Check family, Dogfood Regression Gate, Live E2E UI.
  • list_datasets output shape: unchanged. decision, terms, matches, candidates are computed as on main; only the sentences of note differ. Right: no spec schema, enum or accept-set moves.
  • DatasetToolCopy gains one key, noNumberTail, written in all four locales (en, zh-Hans, zh-Hant, ja). Right: the interface makes the key required, so no locale can lack it, and Type Check is green. No existing copy string is edited.
  • nextStep.note, no_measure branch, three outcomes: every word a dimension hit ends in groupingTail alone; an unknown word with no grouping ends in fallbackTail alone; an unknown word beside a dimension hit ends in fallbackTail then noNumberTail. Right against the jsdoc.
  • nextStep.note, candidates_only branch with no measure-candidate word: no word that falls back ends the grouping offer with groupingTail; a word that falls back gets the left-out sentences (unknownHit, leftFallbackTail, any dimension-hit word) and then noNumberTail as the last sentence before a partial tail. Right against the jsdoc.
  • Unchanged and verified in the code at the head: several_measures, one_measure and its left-out sentences (no conditional sentence beside a matched measure), the measure-candidate question (candidateHit, candidateTail, leftCandidateTail), the partial tail.
  • list_datasets description: one sentence replaced, now stated in the client's terms. DATASET_SELECTION_RULE is not in the diff and carries no dimension sentence, so the two doors do not contradict each other.
  • Skill: step 1 example, rows five and six, the cut clause. Against the prior head only row five moves ("only grouping or filter words"). The generated mirror differs from main in the same three hunks with the same text, line for line; the gate that proves it (gen-mcp-ask-skill --check in the lint families, skill-single-source-34686.test.ts in Test Core) is green at this head.
  • Eval file: cases 21 to 24 appended in one hunk after case 20; no case on main is edited. Against the prior head: case 21 re-quotes its note and has new forbidden strings, cases 22 and 23 have new forbidden strings, case 24 is new.
  • A tree search at the head finds no remaining restatement of the replaced sentences ("a measure must still match", "Only a dimension matches", the cut clause) outside the changeset's own before-and-after account.

② Semver level

  • Changeset .changeset/34996-ask-fallback-beside-grouping.md: @objectstack/service-analytics patch, @objectstack/mcp patch, @objectstack/skills patch. Each named package has a changed published file in the diff and no changed package is missing. Patch is the right level: served sentences and guidance text, no export, key, shape or accepted input added or removed (noNumberTail is a member of a module-private interface). Check Changeset is green on the head.
  • Clause-②: no, on the PR body and in the changeset, and the tree agrees: nothing under packages/spec, no published schema, no declared capability taken away. Metadata-protocol: none agrees too.

③ Boundary flags

  • Q1 (answered in the prior record: ADR-0149 D3 rule 4 governs a word for a thing measured with no hit and no candidate, also beside a dimension hit; rule 5 governs a question with no such word). The rework does not contradict that reading anywhere. The conditional sentence asks only "when the question has no word for a thing measured", which is rule 5's own case as the note of 2026-11-19 words it ("a question about the missing measure"); where the word is present and unmatched the condition is false and rule 4's fallback stands, with no question. The jsdoc now says exactly this and calls the executor's reading a presumption. The escalation of the prior record still stands and is widened by one item: the ADR-0149 amendment note on a follow-up card should record both the reading and the conditional sentence, so the second consumer (cloud's planner) does not read rule 5 the other way. The dev report names the same carrier; docs/adr is not in this diff.
  • Q2, reconfirmed untouched at this head: a single measure candidate is still asked about and never selected, per ruling record 7024577075 and seat scope note 7032849227. In the net diff asked, candidateHit, candidateTail and leftCandidateTail are not edited; the edited conditions gate only groupingTail and noNumberTail, and noNumberTail is written only when no reported word has a measure candidate (asked.length === 0). The skill row "A word with a measure among its candidates" and the description's measure-candidate sentence are unchanged, and the pin holding the candidate question beside an unknown word in four locales now also holds that the conditional sentence is absent there.
  • Dev flag, the conditional sentence is new wording no model round has read: accepted as declared, and named here as the one risk of the rework. The sentence puts the word "ask" back into the note of a question that named its number, which is the note the PR set out to clear of it. It is conditional and placed last, and whether a small model still over-asks on it is exactly what the eval seat's 5-rep round on a workspace build of this branch measures. This record does not stand in for that round, and the PR stays draft until it reports.
  • Dev flag, PR body still describes the round-one head ("no copy string changes in any locale", "cases 21 to 23", 1872 tokens): this record judged the tree. The body is the seat's to rewrite before the PR is readied.
  • Dev flags, ablation 5 narrowed to a single-process probe, and one local @objectstack/mcp suite failure in mcp-file-tools.test.ts (a wall-clock test the diff does not reach): the lane seat's; Test Core and all ten shards are green at this head.
  • Dev note, eval cases 12 to 15 on main whose expected_output prose does not pass their own assertions: outside this diff, not reviewed; the grader reads assertions only, so nothing in this diff is misgraded by it.
  • Rework report open_questions: none.
  • SQL push-down: no query, no id materialisation and no in-app join is added or changed. No finding.
  • Security: no changed hunk teaches permission, sharing, credential, token or authentication behaviour; the membersWithheld row and the hidden-records lines of the skill are untouched.

④ Design judgment

No must-fix, no should-fix.

S1: closed — the three served texts and the jsdoc now agree in the case the finding named. For ["stage", "west region"] the note composed at the head is the grouping sentence, the unknown-word sentence, the fallback sentence, then "Only when the question has no word for a thing measured, ask the user which number they mean instead."; the skill's row five says to ask for a question with only grouping or filter words, and the description states the same condition. A client that follows note, as the skill tells it to, asks. The jsdoc no longer claims the fallback computes a number the user named. The fix is in the note itself, pinned in four locales with three controls (grouping alone, unknown word alone, matched measure beside both), and eval case 24 holds the skill side.

N1: closed — cases 21 and 22 forbid the question as put to the user ("Which number do you", "Which number would you" and their lower-case forms), not the bare phrase, and case 23 forbids the cut-down word as a term sent, not the quoted word. Under the grader's literal-substring rule a correct reply that uses the old strings in negation, or the skill's own contrast form, now passes.

N2: closed — the dev's ground holds in the tree: docs/qa/scenarios/order_to_cash.json stores balance and aging_bucket on every invoice seed row, the dataset's open_balance measure sums balance and its aging dimension reads aging_bucket. The scenario the case is accepted against has the stored fields; left as is.

skills/objectstack-ask/SKILL.md. Holds. Row five is keyed on what only the client knows, and with "or filter words" it now covers the unknown word that is not a number word, which is the gap S1 named. Row six is unchanged from the prior head. Rows five and six partition the mixed call by one test (does the question have a word for a thing measured), the same test the note's closing sentence and the description use, in the same words. Tried to break it with a count question ("How many sales orders are in each status?"): "sales orders" is the word for the thing measured by step 1's own examples (商机数), row six applies, no question. Tried a several-match word beside an unknown word: row two still asks, as judged in the prior record.

skills/objectstack-ask/evals/metric-selection-fallback.json. Cases 21 and 24 quote their notes sentence for sentence as composeDatasetNextStep composes them at the head, checked against the English copy: case 21 is groupingCandidateHit, groupingCandidateTail, unknownHit, leftFallbackTail, noNumberTail with decision: candidates_only and terms: ['status']; case 24 is groupingHit, unknownHit, fallbackTail, noNumberTail with decision: no_measure and both terms, in the order sent. Case 21's expected output says why the closing condition does not apply; case 24's says why it does, and asks with no tool call, which is the skill's "the reply is the question alone". Case 22 carries no nextStep in its prompt and tests the table alone, as before.

packages/services/service-analytics/src/dataset-next-step.ts. The code agrees with the rewritten section sentence by sentence. "Writes that question outright only where the words settle it": under no_measure every reading is no_measure, so !reported.some(fallsBack) is "every word equals a dimension"; under candidates_only with no asked word and no word that falls back, every reading is a grouping-only candidate or a dimension hit. "The fallback sentence and then ONE conditional sentence": fallbackTail then noNumberTail in one branch, leftFallbackTail (inside the left-out sentences) then noNumberTail in the other. "groupingTail is never written beside a fallback sentence": the no_measure branch is either-or, and in candidates_only groupingTail needs !beside while leftFallbackTail is written exactly when beside. The conditional sentence is not written under one_measure, several_measures, beside a measure candidate, or for an unknown word with no grouping. The four locale strings state one condition; the three non-English ones phrase it as the question not saying which number is wanted, in the vocabulary of their own groupingTail.

packages/services/service-analytics/src/dataset-tools.ts. The replaced sentence states the condition in the client's terms and agrees with the skill's rows five and six and with the note's closing sentence. It keeps the measured gain ("ask nothing and take the fallback") for the case the PR targets.

packages/mcp/src/ask-skill.generated.ts. Equals the skill at the head in all three changed places.

N3 (nit) — Case 23's forbidden spellings catch the cut-down word only at the start or the end of the terms array. The lifting the card's own eval reading reports (7041940806), ["claim","claims","status"], puts it in the middle and matches none of them, and must_contain "number of claims" is met by a reply that merely quotes the question. A wrong reply of that shape passes. Tighten on the prose face or leave as an accepted deviation.

N4 (nit) — Case 24's only must_contain is "?", and its forbidden strings are the call spellings with an opening parenthesis. A reply that takes the fallback while naming the tools without that spelling, and carries a question mark anywhere, passes. A token of the question itself would hold the case better. No effect on the contract.

N5 (nit) — Row five's "or filter words" also covers a call with no grouping at all, only an unknown filter word (["west region"]), where the note is the fallback sentence with no closing condition and the description's condition is keyed on a dimension match. The texts differ there, in a corner where the question gives nothing to compute and a client asks anyway; it belongs with the ADR-0149 follow-up card, or stands as an accepted deviation.

Verdict basis: S1 is closed in the note, the description, the jsdoc, the skill row and an eval case, with the pins green on the head; the reading of Q1 is kept and Q2 is untouched; the implementing code agrees with its contract in every branch read; nits only. The eval seat's round on the new conditional sentence and the ADR-0149 amendment note are named above and are not covered by this record.

Implemented-by: claude/issue-34996-ask-skill-over-asking
Reviewed-by: session_01ADHkmT4eA4YqtxfiPyLPih

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Regen-provenance: 7083451259 · 4342cf00921f946bc92b393dad8232a95d5fe2a7 → bf7199432678a81f7878fe8f969a54bb8a66e802 · unexplainedPathsBetween(from, to, origin/main) → (empty)

The hop is a merge of main into the branch; every path it moves is main's carry-over, and none of the PR's own paths changed. The PASS at 4342cf0 carries to this head.

@objectstack-fleet

objectstack-fleet Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

维护者速读(席位记录 · head bf71994326)

席位核对

ACCEPT at head bf71994326 (seat repo:objectstack#2, reviewer of record).

  • Shape: draft → main. Part of #34996. The card stays open for the eval seat's round. Clause-②: no · Metadata-protocol: none. l1-face.mjs CLEAN, 13 items. +245 / −30, 7 files. Tier H (skills/**), under 3000 lines.
  • Contract review: CONTRACT_REVIEW_TIER, skills face.
    • First record 7081905010: S1 and N1 open.
    • Delta 7083451259: PASS at 4342cf009, S1/N1/N2 closed.
    • Regen-provenance 7083516648 carries it to bf71994326, a merge of main with no unexplained paths.
  • Premise and behaviour:
    • The note composer writes the outright "which number" question only when every word is a grouping.
    • Beside a fallback, the note now ends with the conditional noNumberTail sentence, in 4 locales.
    • The ruled ask-backs (several measures, a measure candidate) are untouched and pinned.
  • Test evidence (dev report 7083332706):
    • Pins: service-analytics 5730 passed. Ablations: four red as predicted; the fifth was read by a single-process probe and its vitest leg is NOT MEASURED.
    • The grader proof ran 13 of 13 checks as wanted. The token ratchet reads 1875 of 1877.
    • The mcp suite shows one load-sensitive failure (mcp-file-tools wall clock) that this diff does not reach. It passes alone and on CI.
  • Gates: check-runs at bf71994326: 37 success · 16 expected skip · 0 failed · 0 pending. mergeable_state clean. K was 23 at 4342cf009, so main was merged by the seat (relay pr_update_branch). K = 0 at this head.
  • Changeset read: the @objectstack/service-analytics / @objectstack/mcp / @objectstack/skills patch changeset matches the round 2 sentences.
  • Accepted deviations:
  • Out of scope: ADR-0149 D3 reading plus noNumberTail is a row on ADR revisions, week of 2026-11-21: rolling checklist of ADR text out of step with main (one governed PR) #36086 (comment today). The mcp-file-tools wall-clock flake is an observation, not filed. Skills-docs: not owed (Metadata-protocol: none).
  • Landing: Tier H. pm:awaiting-merge plus a review request to the governed approver. The seat lands it after an approval.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head bf71994 · 2026-11-22T18:44Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: bf7199432678a81f7878fe8f969a54bb8a66e802
Local-runs: none
Scope: skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json + packages/services/service-analytics/src/dataset-next-step.ts, packages/services/service-analytics/src/dataset-tools.ts, packages/mcp/src/ask-skill.generated.ts
Security-touching: no

Same-head record after a merge-of-main hop, on the record of comment 7083451259 (head 4342cf00921f946bc92b393dad8232a95d5fe2a7, PASS). Read for this record: that record, the carry claim 7083516648 (treated as a claim and checked against the trees, not relied on), the PR body and file list, card #34996 (body and its last three comments, context only), all 53 check-runs on the head, and git read-only: the head commit object, the hop diff and log, the PR's own patch at both heads, and the hop's diff of every cited file main moved.

① Derived judgments

  • The hop is one commit. bf7199432 is a merge with two parents: 4342cf009 (the reviewed head) and 0b2118f49, which is an ancestor of origin/main and is the PR's base sha. 4342cf009..bf7199432 holds that merge and 23 commits of main, no other commit.
  • The hop moves 310 files. Its diff (4342cf009 to bf7199432) is the same as main's own diff between the old merge base 59392ed1d and 0b2118f49: same path list, same content once blob index lines are set aside. So every path the hop moves is main's carry-over, and the merge commit adds nothing of its own.
  • The PR's own patch is unchanged in content. Merge base to head, before (59392ed1d to 4342cf009) and after (0b2118f49 to bf7199432): the same 7 files, +245 and -30 both times, the two diffs identical line for line apart from blob index lines, and the same git patch-id (ab961d09). The hop touches none of the 7 paths. No PR-side difference exists; the carry claim's reading of the hop holds on the trees.
  • Cited code the prior record read, as main moved it. Not moved by the hop: dataset-next-step.ts, dataset-tools.ts, everything under packages/mcp (so DATASET_SELECTION_RULE), skills/objectstack-ask/**, ADR-0149, packages/qa/scenarios/src/skill-evals/grade.ts, examples/**. Moved: docs/qa/scenarios/order_to_cash.json, 2 lines (the seed comment, and pay044 dated 2026-10-02 instead of 2026-10-01); docs/qa/scenarios/travel_expense.json, 1 line (a via key on one operation); packages/qa/scenarios/src/loader.ts and schema.ts (that via key). None changes a judgment: at this head the card still stores balance and aging_bucket on its invoice rows, open_balance still sums balance, the aging dimension still reads aging_bucket, and order_count still declares "number of orders" as a synonym. Main also moved skills/objectstack-data/** (another skill) and packages/spec/**; neither is cited by this PR's texts.
  • Check-runs on bf7199432678a81f7878fe8f969a54bb8a66e802: 53 runs, 37 success, 16 skipped, 0 failed, 0 pending. Success: Build Core, Test Core and its shards 1/10 to 10/10, Plan Test Core shards, Check Changeset, Check PR Size, Governed Surface Queue Guard, PR-body guards, Lint and Repo Gates and every Lint family (repo and tooling gates, docs and code guards, ESLint, PM dispatch-gates, CI/release/engine, the three scoped ones), TypeScript Type Check and every Type Check family (workspace, source gates, consumer gates, debt ledger), Dogfood Regression Gate, Live E2E UI, Test UI, Auto Label, filter, Flag docs affected by code changes. Skipped: the UI lane jobs (Lint UI, Build UI Deps, UI Published Artifacts, Type Check UI, Build and E2E UI, Plan Test UI shards, the Test UI matrix), Temporal Conformance, the Dogfood matrix and Dogfood Verify CLI, Build Docs, the two opt-in jobs, Queue verdict, Borrowed queue verdict, Schedule gate. The pins the prior record named (dataset-tools.test.ts, skill-single-source-34686.test.ts, initialize-selection-rule-34686.test.ts) and the mirror --check ran green again on this head, on top of main's 23 commits.
  • The derived judgments of the prior record (output shape of list_datasets, the noNumberTail key in four locales, the note in the no_measure and candidates_only branches, the untouched ruled ask-backs, the description sentence, the skill hunks and their mirror, eval cases 21 to 24) rest on the PR's patch and on files main did not move. They stand at this head as written there.

② Semver level

  • Unchanged. .changeset/34996-ask-fallback-beside-grouping.md is byte-identical in the PR's patch at both heads: @objectstack/service-analytics, @objectstack/mcp and @objectstack/skills, each patch. Main's 22 added changesets are its own. Check Changeset is green on this head.
  • Clause-②: no, on the PR body and in the changeset, unchanged; the PR's patch still holds nothing under packages/spec. Metadata-protocol: none unchanged.

③ Boundary flags

  • Q1 (ADR-0149 D3: rule 4 governs a present, unmatched word for a thing measured; rule 5 governs a question with no such word): as it was. ADR-0149 is not moved by the hop. The escalation stands: an amendment note recording the reading and the conditional sentence, on a follow-up card, for the second consumer.
  • Q2 (a single measure candidate is asked about, never selected): as it was; the code and the pins are unmoved.
  • The conditional sentence is still unread by any model round: as it was. The eval seat's round is not covered by this record, and the PR is still draft.
  • PR body describing the round-one head: the body now describes round 2 (noNumberTail, cases 21 to 24, 1875 tokens). That flag is answered.
  • Lane-seat flags (the fifth ablation's vitest leg, the local mcp-file-tools wall-clock failure): as they were, the lane seat's. Test Core is green on this head.
  • SQL push-down: the PR's patch is unchanged; no query, id materialisation or in-app join. No finding.
  • Security: unchanged reading. No changed hunk of the PR teaches permission, sharing, credential, token or authentication behaviour.

④ Design judgment

No must-fix, no should-fix.

This is a merge-only hop: the PR-side patch did not change, so nothing new is judged in full.

skills/objectstack-ask/SKILL.md. The prior judgment stands: the file is not moved by the hop and reads at this head as it did at 4342cf009.

skills/objectstack-ask/evals/metric-selection-fallback.json. Stands. Unmoved; the composer whose notes cases 21 and 24 quote is unmoved; the card case 22 is accepted against still stores the two fields.

packages/services/service-analytics/src/dataset-next-step.ts. Stands. Unmoved, and no file under service-analytics is in the hop.

packages/services/service-analytics/src/dataset-tools.ts. Stands. Unmoved.

packages/mcp/src/ask-skill.generated.ts. Stands. Unmoved, as is the skill it mirrors; the gate that proves the two equal is green on this head.

S1, N1, N2: closed, as before.

N3: accepted deviation, as before.

N4: accepted deviation, as before.

N5: accepted deviation, as before.

Verdict basis: the hop is main's carry-over alone, the PR's patch is content-identical at both heads, no cited file moved in a way that reaches a judgment, and every check-run on this head is success or an expected skip. The PASS of 7083451259 holds at bf7199432678a81f7878fe8f969a54bb8a66e802. Not covered here, as there: the eval seat's round and the ADR-0149 amendment note.

Implemented-by: claude/issue-34996-ask-skill-over-asking
Reviewed-by: session_01ADHkmT4eA4YqtxfiPyLPih

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

Hand-off for approval: L1 ACCEPT at head bf7199432678a81f7878fe8f969a54bb8a66e802, all checks green. Tier H (skills/**). Same-head contract review PASS 7083886290 (CONTRACT_REVIEW_TIER), on the record of 7083451259. The seat lands it after an approval is on record.

@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 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 22, 2026 22:17
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit e25207d Nov 22, 2026
59 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-34996-ask-skill-over-asking branch November 22, 2026 22:45
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 30, 2026
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… the base ref (objectstack-ai#37032)

<!-- claude-projects-attribution: {"github_login":"huangyiirene"} -->
_Requested by **Irene** · [project
thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_
Fixes objectstack-ai#36537
Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:用户无感;席位在合入主干后把受管 PR 交给维护者时,已由重生成说明续管的审核记录不再被误拒。
- 为什么做:车队交接工具的缺陷——交接时读不到合法的重生成续管记录,席位只能多请一轮审核。
- 出错会怎样:最坏是交接被拒(与今天相同),不会把没审过的改动交给维护者;可直接撤回。
- 要你做什么:无。

## What changes

`scripts/pm/label-write.mjs --handoff` (and its `--dry-run` per-round
reading) now hands the queue guard's PASS reader the two things its
`regenCarry` needs to judge a PASS carried from an older head by a
`Regen-provenance:` line:

- `runGit` — `handoffGitReader(repo)`: this checkout's git
(`checkoutGit`: argv plus optional stdin, stdout back, throws on any
failure), the shape `check-governed-queue-guard.mjs` passes. It is null
when the pull's repository is not this checkout's `origin`, as
`check-governed-merges.mjs --pr` hands none outside its own checkout;
the guard's reader then reads the carry as a gap (exit 3), never as
clean.
- `baseRef` — the pull's own `base.sha` from the same pull read, null
when it is not a full sha.

The injectable seam is `handoffDeps.gitReader` (default
`handoffGitReader`); the self-test's `driveOffline` defaults it to "no
reader", so the suite stays offline. No regen-carry logic is re-spelled
here: `record-recognisers.mjs` decides, and its pins (no reader is
unreadable, no base ref is unreadable, an unreachable tree is
unreadable) are untouched.

## Why

The card: the hand-off built its `pair` without `runGit` or `baseRef`,
so every carried PASS read "this run holds no git reader" and a valid
record refused the hand-off (measured on PR objectstack-ai#36509).

**Which base ref, measured.** Real trees of PR objectstack-ai#36509 (old head
`4342cf009`, merge-of-main head `bf71994326`, second parent `0b2118f4`),
through the guard's own `unexplainedPathsBetween` / `regenCarry` against
this checkout:

| base handed | unexplained paths | `regenCarry` |
|---|---|---|
| `pull.base.sha` = `0b2118f4` (the merged main) | 0 | `carried`, record
7083451259 |
| a base older than the merge (`e4e3bcfe`, what a stale `origin/main`
would hold) | 14 (main's own files read as hand edits) | `refused` |
| `origin/main` in this shallow checkout | git throws | `unreadable` |
| none (before this change) | n/a | `unreadable`, "holds no git reader"
|

`base.sha` is an immutable commit from the same pull read, and the base
`--pr` and the guard's `pull_request` leg hand the same reader. A
remote-tracking ref is shared by every worktree and may be stale, and a
stale base turns main's carry-over into "hand edits". If the checkout
lacks that commit, `merge-base` throws and the guard reads it as
unreadable with its own fetch hint, so it is never carried.

## Tests

`node scripts/pm/label-write.mjs --self-test` at head `4c0570e0`: `✓
label-write self-test: 407 cases pass across 19 batteries` (was 398).
The `--handoff` battery gains nine cases and its pin goes 59 → 68:

1. a PASS on an older head carried by `Regen-provenance:`, fake git
clean (main brought `AGENTS.md`, the pull touched nothing hand-written)
⇒ records ✓, handed off, exit 0; plus a check that the reader's
`merge-base` got `base.sha`;
2. the same chain with the pull's own hand-written path ⇒ no same-head
PASS, refused, exit 2, zero sends;
3. a git reader that throws ⇒ PREREQUISITE, exit 3, zero sends, with the
guard's fetch hint;
4. no reader ⇒ the guard's "holds no git reader" gap, exit 3; no base
sha ⇒ the "base ref" gap, exit 3;
5. `--dry-run` reads the carried PASS through the same reader (records
✓, exit 7, nothing sent);
6. `handoffGitReader` origin matching (spelling and case, another
repository gives null, an unreadable remote gives null), and the real
`checkoutGit` hands git its stdin (`check-attr --stdin` answers
`os-regen` for a literal `.gitattributes` row).

<details><summary>Red before the fix, and three ablations after
it</summary>

Before the implementation (tests in place, fix absent): `✗ label-write
self-test: 7 of 406 case(s) failed`. Case 1 read `got [3,0,false,false],
want [0,1,true,true]` with `② PREREQUISITE NOT MET — PR objectstack-ai#7's
Regen-provenance: chain — this run holds no git reader`.

After committing the fix, each mutation went through
`scripts/ablation-replace.mjs` (the anchor hit on disk, restored blob
equal to HEAD, `git diff HEAD` empty):
- `runGit` changed to `runGit: null` in the pair ⇒ 6 of 407 failed;
- `baseRef` changed to `'origin/main'` ⇒ 2 of 407 failed (the base-sha
check and the no-base control);
- `input` removed from the `checkoutGit` spawn ⇒ 1 of 407 failed (the
stdin case).
</details>

## Acceptance notes

- The changes are in one file: `scripts/pm/label-write.mjs`. The guard
instruments were read but not edited.
- On a sibling-repository pull (the run's checkout is not that repo),
the hand-off still reads a carried PASS as unreadable ("holds no git
reader"). That matches `--pr`. Run it from that repository's checkout.
- When the base commit is missing, the guard's fetch hint names the pull
head and the old head but not the base. That text belongs to
`record-recognisers.mjs`, so this PR leaves it alone.
- No changeset: `scripts/pm/**` publishes nothing from any released
package, so this PR carries `skip-changeset`.

## Verification

Read first: the `pair` line in `handoffGate` (the risk hunk: `runGit`
and `baseRef` added), `checkoutGit` / `handoffGitReader` above it, then
the `R1` cases in the `--handoff` battery.

Two-minute check: `node scripts/pm/label-write.mjs --self-test`.
Expected output: `✓ label-write self-test: 407 cases pass across 19
batteries`.

<details><summary>Local gates at 4c0570e</summary>

`node scripts/pm/dispatch-gates.mjs --commands` derived 64 commands.
Each ran with its exit code captured before any pipe. 63 exited 0. `pnpm
check:i18n-coverage` exited 3 (PREREQUISITE NOT MET: no built `dist/`
for the configs it lints; it does not read `scripts/pm`; left to CI).
`dispatch-gates --ran`: `64 derived famil(ies) accounted for — 63 run, 1
NOT-MEASURED (1 DERIVED from a recorded exit 3)`. Also: `overlap-check`
VERDICT clean exit 0; `check-commit-card-trailers --range
origin/main..HEAD` ✓.
</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` is left to CI.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. Publishes nothing: `skip-changeset`; both declaration lines are
above.
- [x] 6. `packages/spec` not touched.
- [x] 7. No hand edits to generated docs, changelogs or release notes.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01J8VVAm5Tp3iBkiJk6nMwa5

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…of 2026-11-21) (objectstack-ai#37045)

<!-- claude-projects-attribution: {"github_login":"huangyiirene"} -->
_Requested by **Irene** · [project
thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_

Fixes objectstack-ai#36086

Clause-②: no
Metadata-protocol: none

## 维护者速读
-
用户能看到什么变化:用户无感;十二份内部设计记录在与现行代码不一致的地方各加一条注明日期的补注,原决定文字不动,只有访客模型里一句已被裁决撤回的接口说明照裁决改掉。
- 为什么做:这是本周的设计记录修订合集;AI 席位改代码前会读这些记录,这十五处已与上线代码不一致,会把 AI 带偏。
- 出错会怎样:只改说明文字,不动代码和功能;补注若写错,读记录的 AI 和人会拿到错误说明,整个合并可以直接撤回。
- 要你做什么:审阅后批准一次(设计记录必须由你亲手批)。

## What changes

Seventeen append-only dated notes, for the 15 rows of this week's card
whose code is on `main`, in twelve records. Each note sits directly
under the passage it amends, says what `main` does now, and links its
card and its landing PR. One clause is rewritten, in ADR-0138, as its
row and the ruling on it ask. No other decision text is rewritten,
struck or reordered. Six records whose header indexes their amendments
gain a pointer entry there (ADR-0050, 0066, 0090, 0138, 0151, 0158).

| # | ADR · section | What it said | What `main` does | Landing PR |
Note location |
|:--|:--|:--|:--|:--|:--|
| 1 | ADR-0158 · Open item 12 | Which aggregates count as "raw" is left
to the aggregate card | `sum`, `avg`, `min` and `max` over a
`record`-mode quantity are refused unless the query groups by the
quantity's own `unitField`: ObjectQL aggregate `INVALID_FIELD` / 400,
`summary` field `INVALID_METADATA` / 422, cube measure `INVALID_FIELD` /
400 on each query. `count`, `count_distinct`, a `fixed`-mode quantity
and a plain number are not judged. No error code is added | objectstack-ai#36060 |
under Open item 12; status entry |
| 2 | ADR-0066 · D2 ⑧ | View All and Modify All are the bits that vote
on every field of an object | A set may carry `viewAllFields`: a read
vote, never an edit vote, on every field of the object. The set's own
`readable: false` row beats it. It grants no object access, no record
and no admin posture | objectstack-ai#36085 | under D2 ⑧, after the 2026-11-15 note;
status entry |
| 3 | ADR-0090 · D5 | The high-privilege list refused on an `everyone`
binding | The list gains `viewAllFields` on any object entry | objectstack-ai#36085 |
under D5; status entry |
| 4 | ADR-0090 · D12, condition (a) | No `viewAllRecords` or
`modifyAllRecords` on `'*'` | Condition (a) also refuses `viewAllFields`
on `'*'`; the bit on a named object stays inside the boundary | objectstack-ai#36085 |
under D12's 2026-10-17 amendment |
| 5 | ADR-0151 · D3 | The bits the agent ceiling removes | The clamp
also clears `viewAllFields` on every object entry; assigning a set that
carries it to an account is refused by name | objectstack-ai#36085 | under D3; header
entry |
| 6 | ADR-0050 · Decision 2, the 2026-10-20 note | "a per-list open
mode, if ever wanted, is the list's existing `navigation.mode`" | On an
object's list `navigation.mode` is deprecated and no longer picks how a
record opens: the name opens the full page, the hover icon the side
panel. `none` still means the rows open nothing. A page block still
honours every value | objectstack-ai#35910 | under Decision 2, after the 2026-10-20
note; status entry |
| 7 | ADR-0050 · the same note | The create form is chosen by convention
from the object's form views | The console's record create and edit
forms are the object's own, laid out by `fieldGroups`, less a
`showOnCreate: false` field on a create. An internal form view steers
nothing there. A public form and a named form an action opens keep their
own definition | objectstack-ai#36543 | second note under Decision 2 |
| 8 | ADR-0052 · section 5b, tier 1 | "Opt-in (like Feed Tracking) keeps
the stream from becoming change-noise" | Old and new values show by
default. Off per object with `enable.fieldHistory: false`, per field
with `fieldHistory: false`. An entry serves a field's values only to a
reader who is served that field | objectstack-ai#36399, objectstack-ai#36580, objectstack-ai#36613, objectstack-ai#36641, objectstack-ai#36661
| under tier 1 |
| 9 | ADR-0146 · D1 | Studio is where metadata is edited | A workspace
administrator also edits in the running app: the menu and the pinned
header actions in design mode, a dashboard on its page, a report on its
builder page, a view's settings on the view. Each save is one item's
draft and publish, and writes nothing over a pending draft | objectstack-ai#36397,
objectstack-ai#36437, objectstack-ai#36629, objectstack-ai#36405, objectstack-ai#36644, objectstack-ai#36411, objectstack-ai#36848 | end of D1, after the
2026-11-24 amendment's table |
| 10 | ADR-0146 · D5 (two card rows) | The bridge draws on the app
switcher row and the app bar entry | From 768 px up the entries are two
rows of the app-name menu. "Design layout" turns on design mode. "Edit
app" opens Studio, and reads "View in Studio" for a read-only package.
The page header draws neither | objectstack-ai#36437, objectstack-ai#36621, objectstack-ai#36789 | under D5 |
| 11 | ADR-0146 · D10, the 2026-11-22 note | An extension places only
what it brings; the base's arrangement stays the base's | The App's
paired `.custom` package may declare whole `fieldGroups` and
`relatedLists`. Each key it writes replaces the folded result whole. Any
other package is refused and prescribed `place` | objectstack-ai#36517 | under D10,
after the 2026-11-22 note |
| 12 | ADR-0146 · D10, the same note | (the same) | `actionLayout` is
the third such key. Only the paired `.custom` package writes it on an
extension. Each arm it writes replaces the served arm whole. The server
refuses the shape; the reference is refused by design mode's Save and by
the CLI rule only | objectstack-ai#36629 | second note under D10 |
| 13 | ADR-0138 · D2, the 2026-11-20 amendment | The restriction profile
is served on the unscoped route "and its environment-scoped twin" | Only
the unscoped route is mounted. A request to the twin gets the host's
ordinary not-found answer. A server that mounts the scoped base alone
serves no profile | objectstack-ai#36531 | the clause is rewritten in place; a dated
amendment under it; status entry |
| 14 | ADR-0149 · D3, rules 4 and 5 | Both rules apply to an unknown
word beside a grouping word; the record did not say which governs | Rule
4 governs the unknown word: the labelled fallback, nothing asked. Rule 5
is the rule for a question that names no number. Beside a fallback the
note ends with one conditional sentence | objectstack-ai#36509 | under D3, after the
2026-11-19 note |
| 15 | ADR-0027 · roadmap row M2 | "explicit, batched publish" | In
Studio's designers a person's Save writes the draft and publishes that
one item at once. Drafts and the package's batch publish remain for an
AI's changes | objectstack-ai#36597, objectstack-ai#36634, objectstack-ai#36652 | under the roadmap table |
| 16 | ADR-0037 · the product-boundaries amendment | "Publish remains
the single commit gate shared by every surface" | The publish is the
item's own, issued by the Save itself. The top bar's Publish is drawn
only while a draft is pending | objectstack-ai#36597, objectstack-ai#36634, objectstack-ai#36652 | under that
sentence |
| 17 | ADR-0085 · section 2 | `relatedLists` is "the one place" where
the re-arrange rejection yields | `actionLayout` is the second: a ruled
exception (the maintainer's ruling on objectstack-ai#36635), on the object, with a
`list` arm and a `record` arm | objectstack-ai#36629, objectstack-ai#36815 | under section 2, after
the 2026-11-22 note; dated 2026-11-23 |

The 15 card rows are the 17 lines above: the `viewAllFields` row is
lines 2 to 5, and the two ADR-0146 D5 rows are line 10.

**Rows not carried**

- ADR-0085, the `fieldGroups[].collapse` row: already on `main` through
objectstack-ai#36817. The record carries "Addendum (2026-11-22): on the synthesized
record page the reader folds every titled group", which says what the
row asks for. Nothing is added.

No `scripts/adr-anchors/**` entry moves. No `**Status**:` line changes
in the part the index projects, so `docs/adr/README.md` stays current.

## Why

AI seats read the ADRs before they change code in governed territory
(AGENTS.md Prime Directive objectstack-ai#13). These passages say something `main` no
longer does, so a seat that trusts them is steered wrong. This is the
week's rolling ADR revisions card: its rows land together as one
governed `docs/adr/**` PR and one approval, on the maintainer's word of
2026-11-20 (「adr接受你的建议」).

## Tests

Docs-only diff: no package, test or build input is touched, so no
package test or typecheck applies, and nothing a test pins changes.

## Acceptance notes

- Every row was read against the code on `main` at `a73edb3cd`, not
against PR state. Each landing commit is an ancestor of the branch, and
each note names the file or symbol that makes it true. `main` has moved
once since (`9c57bd283`); that commit touches no `docs/adr/**` file and
no file a note names.
- Where a row's claim is not what `main` does, the note states what
`main` does:
- **ADR-0052.** The row gives the per-field switch as `trackHistory:
false`. On `main` it is `fieldHistory: false`; `trackHistory: false`
reads as unset.
- **ADR-0146 D1.** Three sentences of the row are not written. "The fate
of Studio's Interfaces pillar is still open": the 2026-11-24 amendment
of D1, already on `main`, retires the pillars. "Studio is not changed by
this batch": the same amendment changes it. "Each of these writes the
same paired package": a report's save and a change to an existing view's
settings name no package, and the menu, the action arrangement and a
dashboard go to the item's own package when it is writable. The note
says where each save lands. It does not repeat what that amendment
already says about dashboards and reports opening in the app.
- **ADR-0146 D5.** Both card rows describe a state objectstack-ai#36789 has since
replaced: the row of objectstack-ai#36437 has the page header's button enter design
mode, and the row of objectstack-ai#36621 has the app-name menu's "Edit app" enter it.
On `main` the entry into design mode is "Design layout", and "Edit app"
opens Studio. The two rows are written as one note that states the end
of that sequence.
- **ADR-0027.** The row says later PRs will move the other Studio
editors. They have landed (objectstack-ai#36634, objectstack-ai#36652) and the note cites them. It
quotes the maintainer's own sentence on the epic, not the epic's summary
line.
- **ADR-0037.** The row says a pending draft now means an AI's draft.
Studio's generic item page still saves a person's drafts (its move is
declared by D1's amendment and not built), and the note says so.
- **ADR-0085.** The row says the row menu is queued and not built.
objectstack-ai#36815 built it, and it follows the `record` arm; the note says so. The
`list` arm still has one reader.
- Header entries: added where a record's header indexes its amendments
(ADR-0050, 0066, 0090, 0138, 0151, 0158). Not added to ADR-0146: its
status block lists only the maintainer's in-place amendments, its
2026-11-22 note under D10 has no entry there, and open PR objectstack-ai#36957 edits
that block. Not added to ADR-0027, 0037, 0052, 0085 and 0149, whose
headers hold no such list.
- Dates: every note is dated 2026-11-24, except ADR-0085's, dated
2026-11-23 as its row sets (that record dates its notes by ruling).
ADR-0138's amendment is dated 2026-11-24 and names the ruling's date,
2026-11-22.
- ADR-0151 is `Proposed`; its note follows the form of the dated notes
it already carries.
- The spec docblock sentence the ADR-0085 row mentions landed with
objectstack-ai#36629, so nothing outside `docs/adr/**` is owed.
- Noted, not filed (read-only observations, nothing was run to exercise
them):
- A report's save, and a change to an existing view's settings, from the
running app name no package. For an item of an installed package whose
stored rows are not bound to exactly one package, the server then
addresses the package-unbound row, not the paired `.custom` package
ADR-0146 D2 points customizations to. Whether a door refuses that write
was not measured.
- Two source comments still say design mode is entered from "Edit app"
(the page-actions module header and the design-mode module's gate
paragraph). Comments only.
- Landing tier: Tier H (`docs/adr/**`, governed; the maintainer
approves). The diff is +243 / -5 over 12 files.

## Verification

Read first, by risk:

1.
`docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md`,
the D2 hunk: the one place earlier text is rewritten.
2.
`docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md`,
the note at the end of D1: the widest claim, where each in-app save
lands.
3. `docs/adr/0066-unified-authorization-model.md`, the note under D2 ⑧,
with its ADR-0090 D12 twin: permission semantics.

Two-minute check: `pnpm check:adr-symbol-anchors` prints a green line
that starts `check-adr-symbol-anchors: 3904 anchors across 160 records`,
and `git diff origin/main...HEAD --stat` shows 12 files, 243 insertions
and 5 deletions.

<details><summary>Gate readings on e5c60bf</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived the same 21 families on `8c705bc2c`
and on `e5c60bff0`. The readings below are the second run, on
`e5c60bff0`, each exit captured before any pipe:

```text
node scripts/check-adr-links.mjs :: exit 0
node scripts/check-adr-links.mjs --self-test :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:adr-index :: exit 0
pnpm check:adr-symbol-anchors :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-prior-rulings :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:watch-hint-literal :: exit 0
```

On the first run `check:doc-formula-expressions` answered 3,
prerequisite not met, until `formula` and `lint` were built under
`os-verify-lock` (VERDICT command-exit 0, 5 of 5 tasks). `--ran`
reconciliation: 21 derived, 21 run, 0 NOT-MEASURED (a derived zero).
`node scripts/adr-index.mjs --check`: exit 0, the README is current.
`check-commit-card-trailers --range origin/main..HEAD`: exit 0, 2 commit
messages. `overlap-check`: `origin/main` and objectstack-ai#36957 both merge cleanly,
VERDICT clean exit 0. `check-governed-merges --branch`: GOVERNED, 12 of
12 paths on the register, Tier H. Control-byte scan of the twelve files:
0 hits.

</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No schema touched.)
- [x] 2. Every name I added uses the casing for its kind. (No name
added.)
- [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. `pnpm
lint` was not run locally on this Markdown-only diff; CI judges it.)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (Publishes
nothing: `skip-changeset`.)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (Not touched.)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [ ] The *Before Submitting* list in CONTRIBUTING.md is done. (Not
walked item by item; the derived gates above are what ran.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01J8VVAoUbebHyRXKT4GxBTV

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…arries stdin (objectstack-ai#37071)

<!-- claude-projects-attribution: {"github_login":"huangyiirene"} -->
_Requested by **Irene** · [project
thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_

Fixes objectstack-ai#37038

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:用户无感;车队席位落地前的预读和合并后的受管审计,现在能正确指出"重生成链里夹带的手改文件",之前一律读成"已解释"。
- 为什么做:修车队受管合并审计工具里一个读数错误(席位预读与事后审计会漏报夹带手改的重生成 PR)。
- 出错会怎样:只影响席位预读和事后审计这两份报告,合并队列自己的守卫不受影响;有问题可直接撤回此 PR。
- 要你做什么:这是守卫工具本身,属人合档,请你审阅后合并。

## What changes

`scripts/pm/check-governed-merges.mjs` only.

- `git(root, args, input)`: takes an optional `input`. With one, git
gets it on a piped stdin; without one, stdin stays `'ignore'` exactly as
before, so every existing plain caller (`tryGit`, the enumeration reads)
is unchanged. The options live in `gitSpawnOptions(root, input)` so the
self-test can pin them.
- `checkoutGitReader(root)` returns `(argv, input) => git(root, argv,
input)`, the queue guard's own `runGit` shape. Both handoffs now use it:
- `--pr` into `pullRecordStage`: was `sameCheckout ? (argv) => git(root,
argv) : null`.
- the post-merge sweep into `readArmLanding`: was `(argv) => git(root,
argv)`.
- `readArmLanding`'s two wrappers around that reader (`armGit`, and the
`git` wrapper in `armSettledWithoutUnread`) forward `input` too. Neither
carries a stdin read today, but both are git readers handed to
`guard.readLowRiskTier`, so a later stdin read there would hit the same
hole.

Every `(argv) => git(root, argv)` style handoff in this file, as grep
finds it at the base `938a48f1`:

| Line at base | Handed to | Reaches a stdin command? | Changed |
|---|---|---|---|
| `runGit:` in `--pr` | `pullRecordStage` → `readLowRiskRecordStage` →
`regenCarry` → `unexplainedPathsBetween` (`check-attr --stdin`) | yes |
yes |
| `runGit:` in the sweep's arm leg | `readArmLanding` → record pair →
`regenCarry` → `unexplainedPathsBetween` | yes | yes |
| `armGit` / `armSettledWithoutUnread` `git` | `guard.readLowRiskTier`
(show, ls-tree, diff-tree) | no, today | forwarded anyway |
| `git:` into `readWorkflowDiff` (`--branch` and `--pr`) | `ls-tree`,
`show` | no | no |
| `run:` (`tryGit`) into `deriveBranchPaths`, `pullWorkflowDiff`,
`pullChangesetReading`, `pullCatalogReading` | plain reads | no | no |

The only stdin command across `record-recognisers.mjs`,
`check-governed-queue-guard.mjs` and this file is
`unexplainedPathsBetween`'s `check-attr --stdin`. The guard and the
recognisers are not edited, and no regen-carry logic is restated here.

## Why

`unexplainedPathsBetween` passes the moved paths as `runGit`'s second
argument to `git check-attr --stdin`. The handoffs dropped that argument
and `git()` ignored stdin, so check-attr read nothing and every moved
path read as explained. That let `regenCarry` read a false carry in
`--pr`'s pre-landing reading and in the post-merge governed audit. The
queue guard passes input itself, so the merge gate was never affected.

## Tests

<details><summary>Self-test, final head 4d8079f: 972 assertions, exit 0
(base 938a48f: 963)</summary>

`bash scripts/pm/os-verify-lock.sh -c 'node
scripts/pm/check-governed-merges.mjs --self-test'` gives `VERDICT
command-exit 0`, `972 assertions`. That is 9 new cases:

- New battery `⭐ the git reader handed to the guard's readers carries
STDIN (check-attr --stdin)`, floor 6. The roster floor goes from 41 to
42. It runs offline, with real git, on a throwaway repo. The repo has
`.gitattributes` routing `gen/out.json` to `merge=os-regen`, and a
branch that moves `scripts/pm/x.mjs` and `gen/out.json` together, then
the generated path alone.
1. `check-attr --stdin` through `checkoutGitReader` answers
`unspecified` for the hand path and `os-regen` for the generated one.
2. Through the guard's own `unexplainedPathsBetween`, the moved
non-regen path reads **unexplained**. This is the card's case that fails
today.
  3. Control: a hop that moves only the `os-regen` path reads explained.
  4. A read with no input still answers (empty) on an ignored stdin.
5. `gitSpawnOptions` with no input gives `stdio[0] === 'ignore'` and no
`input` key.
6. `gitSpawnOptions` with input gives a piped stdin carrying it byte for
byte.
- The low-risk arm battery gets one seam pin for `--pr`.
`pullRecordStage` is handed `checkoutGitReader(fixture)`, and the reader
the guard's `readLowRiskRecordStage` receives reads the moved non-regen
path as unexplained.
- The post-merge arm battery gets two seam pins for `readArmLanding`.
First, every git reader it hands the guard (to `readLowRiskTier` and the
record pair given to `recordVerdict`) passes stdin through. Second, the
sweep's checkout reader reaches real git through the landing's wrapper
and reads the moved non-regen path as unexplained.
</details>

<details><summary>Red before, green after: three ablations on committed
head 4d8079f (blob aced044)</summary>

Each leg goes through `node scripts/ablation-replace.mjs`: the anchor
hits once, the mutation lands with its blob moving, and the restore is
verified as blob equal to HEAD with an empty `git diff HEAD`.

- **A**: `git()` drops input, which is origin/main's spawner. Exit 1
with 5 failures: battery cases 1, 2 and 6, the `--pr` pin, and the sweep
real-git pin. Case 2 reads `[]` in place of `scripts/pm/x.mjs`.
- **B**: the handoff drops its second argument, which is origin/main's
`(argv) => git(root, argv)`. Exit 1 with 4 failures: battery cases 1 and
2, the `--pr` pin, and the sweep real-git pin.
- **C**: `armGit` drops input. Exit 1 with 2 failures: the
forward-through pin (`{"state":"pass","arm":2,"pair":1}`) and the sweep
real-git pin.
- Restored: exit 0, 972 assertions.
</details>

<details><summary>The card's repro on PR objectstack-ai#36509's real trees</summary>

`4342cf009..bf71994`, base `e4e3bcfe`, fetched into a scratch ref
that has since been deleted. Run through `unexplainedPathsBetween`:

- before, with origin/main's ignored stdin: **0** unexplained
- after, with `checkoutGitReader`: **14** unexplained

The 14 begin with `packages/spec/src/ui/component.zod.ts`,
`scripts/sdui-manifest.record.json` and `sdui.manifest.json`. This
matches the card's measured 14 and 0.
</details>

## Acceptance notes

- The two seam pins drive the reader the handoffs are built from
(`checkoutGitReader`) through the real `pullRecordStage` and
`readArmLanding`. They do not run `--pr` or the sweep end to end,
because both read GitHub. The two call sites themselves are one token
each. Ablation B shows that any reader with the old `(argv) => git(root,
argv)` shape reds the battery.
- `pnpm check:i18n-coverage` is derived for this path, but it reads
`packages/cli/dist` and the examples' build closure, which are not built
here. It exited 3 (PREREQUISITE NOT MET) locally, so it is NOT MEASURED;
CI runs it.

## Verification

Read first, by risk:
1. `git()` / `gitSpawnOptions`: the no-input branch must stay `'ignore'`
for every plain caller.
2. The two `runGit:` handoffs (`--pr`, sweep arm leg), now
`checkoutGitReader(root)`.
3. `armGit` and the `armSettledWithoutUnread` wrapper, which only
forward `input`.

Two-minute check: `node scripts/pm/check-governed-merges.mjs
--self-test` should print `✓ … 972 assertions`, ending in the stdin
clause.

<details><summary>Local gates, head 4d8079f</summary>

- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 63 families. Run reconciliation
(`--ran`) printed `✓ dispatch-gates --ran: 63 derived famil(ies)
accounted for — 62 run, 1 NOT-MEASURED`.
- Every derived family exits 0 except `pnpm check:i18n-coverage` (exit
3, prerequisite not met, above). That includes `pnpm
check:pm-governed-merges`, `pnpm check:pm-record-recognisers`, `node
scripts/pm/check-governed-queue-guard.mjs --self-test`, `pnpm
check:pm-dispatch-gates` (fast tier, 2273 cases), `pnpm
check:commit-card-trailers` and `pnpm check:nul-bytes`.
- `ui/scripts/__tests__/check-governed-queue-guard.test.ts` spawns this
script and passes 10/10.
- `npx eslint --no-inline-config scripts/pm/check-governed-merges.mjs`
exits 0. The repo-wide `pnpm lint` is CI's.
- `node scripts/pm/overlap-check.mjs` reports `VERDICT clean exit 0`.
</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; eslint is clean on the file (repo-wide `pnpm
lint` in CI).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. Publishes nothing (`scripts/pm`), so `skip-changeset`; both
declaration lines are above.
- [x] 6. `packages/spec` not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01J8VVAm5Tp3iBkiJk6nMwa5

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
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.

3 participants