Skip to content

feat(spec): the dataset tools' output declares nextStep on list_datasets and sourceLine on query_dataset (ADR-0149 M1) - #34982

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-34918-dataset-next-step-source-line
Nov 18, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/issue-34918-dataset-next-step-source-line

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #34918

Clause-②: yes (widening: two optional output members on published schemas)
Metadata-protocol: added
Skills-docs: follow-up owed — skills/objectstack-ask/SKILL.md (follows nextStep and cites sourceLine once the executor fills them)

维护者速读

  • 改了什么:两个问数工具的返回结构各加一个可选成员。list_datasets 加 nextStep:平台按 D3 选数规则读用户的词,读到的是四种情况里的哪一种(命中一个度量、命中多个度量、只有候选、没有度量),说的是哪些词,外加一句成文的话。query_dataset 加 sourceLine:答案出处的一句成文的话。ADR-0149 M1 末尾加一段只增不改的修订说明。本 PR 只声明形状,不改执行器。
  • 为什么改:[Decision] Should the framework's dataset tools return the next step and the citation line themselves, so the MCP door gets what the product's agent gets #34894 的裁决(选 A,记录 6953671481,原话「两件都同意:构建提交进仓库,[Decision] Should the framework's dataset tools return the next step and the citation line themselves, so the MCP door gets what the product's agent gets #34894 选 A」):下一步和出处这两句话由平台执行器写进工具返回,产品自己的 AI 和 MCP 客户端读到的是同一份;规范只声明形状,句子的文字不进规范,M1 不变。
  • 风险与回滚:只加两个可选输出成员,不带它们的返回解析结果与之前相同。执行器在 service-analytics: the dataset executor computes nextStep and sourceLine, and the MCP door returns them #34919 填充,它落地前没有返回会带这两个成员,但 MCP 客户端读到的 outputSchema 从本 PR 起就多出这两项。decision 的四个取值发布后即对外契约,之后改名是破坏性变更。回滚即 revert 本 PR。
  • 先看:① packages/spec/src/ai/dataset-tools.zod.ts 里 DatasetNextStepDecision 的四个取值和 decision 的 .describe() 文字:取值写的是「平台查到了什么」,不是「接下来该怎么做」;② 同一文件里 nextStep.terms:它按词指向同一份返回里的 matches 与 candidates,自己不再列成员,理由在下面 Schema decisions;③ docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md M1 末尾的修订说明,看它是否如实转述裁决。
  • 两分钟验证:pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/ai/dataset-tools.test.ts,预期 Tests 44 passed (44)。
  • 需要你做的:席位 L2 复核后,亲手合并本 PR(Tier H:docs/adr/** 与 packages/spec/**)。

What changes

  • packages/spec/src/ai/dataset-tools.zod.ts (100 lines added, 2 removed; the two removed lines are module doc block lines, rewritten to name the two members):
    • ListDatasetsOutputSchema gains one optional member, nextStep, a DatasetNextStepSchema.
    • DatasetNextStepSchema (type DatasetNextStep): { decision, terms, note }, all three required. decision is DatasetNextStepDecision; terms is a list of strings with at least one entry; note is a non-empty string.
    • DatasetNextStepDecision: a closed enum, one_measure, several_measures, candidates_only, no_measure.
    • QueryDatasetOutputSchema gains one optional member, sourceLine, a non-empty string, declared in the tool's own .extend() beside provenance.
    • candidates, matches, provenance, AnalyticsResultResponseSchema and every other declaration are untouched.
  • packages/spec/src/ai/dataset-tools.test.ts: eleven new cases (44 run in the file now). Seven in a new list_datasets nextStep block, two in the query_dataset output block, two in the JSON Schema projection block.
  • packages/spec/src/type-alias-convention.pin.test.ts: two pin rows for the two new aliases and the pinned count 858 to 860. check:spec-parsed-alias (ADR-0122) refuses a new bare input alias with no pin.
  • Generated, by the generators only (check:generated --fix): packages/spec/{api-surface,authorable-surface,declaration-map,export-origins,json-schema.manifest}/ai.json, content/docs/references/ai/dataset-tools.mdx, content/docs/references/index.mdx (schema total 1670 to 1672, AI 82 to 84), docs/audits/2026-07-unknown-key-strictness-ledger.counts/ai.md (97 to 98 object sites). authorable-surface.base.json did not move.
  • docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md: an amendment note at the end of M1, in the form of the note under D3. 11 lines added, 0 removed or changed.
  • .changeset/34918-dataset-next-step-source-line.md: @objectstack/spec at minor.
  • Nothing under packages/services/**, packages/mcp/** or skills/**.

Why

Ruled by the maintainer on #34894, option A, verbatim 「两件都同意:构建提交进仓库,#34894 选 A」 (ruling record 6953671481). The record states what was ruled: the framework's executor returns nextStep (a closed decision, the candidates, a sentence) on list_datasets and sourceLine on query_dataset; the spec declares the shapes; the sentence's text is the executor's and does not enter the spec, so ADR-0149 M1 (ruled A) stands.

Today a client that asks through MCP is handed matches and candidates and works out what they mean, and what to cite, by itself. With the two members every client that made the call reads the same conclusion and the same source line from the result.

This PR is the spec half: the shapes, and the record. The executor that fills both members is #34919.

Schema decisions

Point Card or ruling Settled here Why
decision values a closed enum covering one metric matches, several match, near candidates only, nothing one_measure, several_measures, candidates_only, no_measure Lowercase snake_case, the casing AGENTS.md gives data values (Prime Directive 3). The cases are counted in measures because D3 selects a measure. The set is the four cases the card names and no more.
What a value names not stated what the platform found, not what a reader then does M1 A keeps guidance out of the spec, so no value is an instruction (ask, use, fallback). What follows from each case is D3's to say. M2 (the fallback posture) names its own revisits: a re-ruling of what to do in a case leaves the four findings as they are.
A term that equals only a dimension not stated no_measure; no fifth value D3 rule 5: a dimension alone is not an answer. The term keeps its entry in the dataset's matches, and the decision description says a dimension is not counted.
The reference to the candidates "the candidates it rests on", without declaring #34761's list twice terms: the caller's terms the decision is about. nextStep holds no member list Differs in form from the ruling record's "the candidates". Every entry of matches and of candidates already carries the caller's term, so the terms are the join key: the members are read under them from the same answer. No { dataset, member } pointer is declared a second time, so there is no second list that could disagree with the first.
note a string slot whose text is the executor's required inside nextStep, non-empty A nextStep without its sentence would not be the ruled result. The spec fixes no wording, no template and no language.
One nextStep or one per term "a closed decision" one object per answer When the caller's terms are in different cases, which case the answer reports is the executor's rule (#34919). terms says which terms the reported case is about. Raised in the dev report as an open question for #34919.
Presence of nextStep optional .optional(); described as present only when terms were sent An answer without the key parses to the same value as before. A schema cannot tie an output member to the input; holding it is the executor's.
sourceLine optional string z.string().min(1).optional() "No source line" has one spelling, the key's absence. An empty string does not parse.
Where sourceLine is declared on the query_dataset output, without widening the shared response in QueryDatasetOutputSchema's own .extend(), beside provenance The schema is already AnalyticsResultResponseSchema.shape.data with sql omitted and the tool's members added. Adding one more there leaves AnalyticsResultResponseSchema unedited; a test pins that the REST door's data shape has no sourceLine.
Description text says what the member is for; no guidance facts only Each description says what the member is, who composes it and what it is composed from. None says what a model should do with it.

The two new type aliases are bare input aliases with pins, not aliases paired with a Parsed twin: neither schema has a default or a transform, so input and output types are the same (ADR-0122).

Known overlaps

node scripts/pm/overlap-check.mjs exits 1 against two open PRs. The dispatching seat (area o3-E) read both overlaps and ordered the push.

Open PR (head) File Where the two sides meet
#34925 (8f6048c352), #34719 (5a05e4f2f4) packages/spec/src/type-alias-convention.pin.test.ts the pinned isomorphic-alias count (858 to 860 here): the header line, the case title, and the history comment with toHaveLength. The pin rows themselves merge
#34925 (8f6048c352), #34719 (5a05e4f2f4) content/docs/references/index.mdx (generated) the generated totals. The frontmatter description count and the Total row conflict (1672 here, 1671 there), in one hunk with the UI row (177 to 178 there). The AI row (82 to 84 here) moves beside them and merges

Remedy for whichever lands second: merge main, re-run gen:docs, re-sum the pin count. No other file conflicts (git merge-tree against each fetched head, read hunk by hunk). #34928 (3d92094558) shares the ADR-0149 file, with a note under D3, and merges cleanly. This PR touches none of those PRs nor their branches.

Outside the claimed surface

None. All 13 changed paths are in the claim's File surface (claim comment 6959561891), the pin test and the two generated totals files included.

Prior rulings read

The claim names these. None is crossed.

Tests

Readings are on head d10ea09296 with a clean working tree.

Command Result
pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/ai/dataset-tools.test.ts src/type-alias-convention.pin.test.ts (verify lock) Test Files 2 passed (2), Tests 47 passed (47); lock line VERDICT command-exit 0
pnpm --filter @objectstack/spec typecheck (verify lock) check:test-typecheck: OK; VERDICT command-exit 0
pnpm --filter @objectstack/spec test (verify lock) Test Files 849 passed (849); Tests 27213 passed | 1 todo (27214); VERDICT command-exit 0
pnpm --filter @objectstack/service-analytics test and pnpm --filter @objectstack/mcp test (verify lock) service-analytics Test Files 218 passed (218), Tests 5560 passed | 335 skipped (5895); mcp Test Files 71 passed (71), Tests 1252 passed (1252); VERDICT command-exit 0
pnpm exec eslint --no-inline-config on the three changed TypeScript files exit 0, no finding

The two downstream packages are the ones outside spec that import the dataset-tool schemas (direction: consumers of spec). They ran against a spec dist/ that carries the new members: the built getDatasetToolJsonSchemas() answers nextStep as type: object, required: ["decision","terms","note"], additionalProperties: false, with the four-value enum, and sourceLine as type: string, minLength: 1, neither in its output's required list.

What the new cases pin
  • decision takes each of the four values and refuses any other, at path nextStep.decision: an action word (ask), a near spelling (one_match), another casing (ONE_MEASURE), the empty string, a number and null.
  • An answer with nextStep beside candidates parses and keeps both. An answer without the key parses to the same value as before.
  • decision, terms and note are each required. An empty terms list and an empty note are refused.
  • nextStep has exactly those three keys. A { dataset, member } pointer in terms is refused at terms.0.
  • One list of candidates: ListDatasetsOutputSchema's candidates element is DatasetTermCandidateSchema itself, and a candidates or matches list written inside nextStep is not part of the shape (the parsed value does not carry it).
  • The reference is by term: the members a decision rests on are found by filtering the same answer's matches and candidates on nextStep.terms.
  • sourceLine is optional and non-empty; an empty string, a number, null and a list are refused at path sourceLine. An answer without it parses to the same value as before.
  • AnalyticsResultResponseSchema's data shape has no sourceLine, and a sourceLine sent to the door's data is not kept by its parse.
  • The projected list_datasets outputSchema: nextStep is not in required; it is an object requiring decision, note and terms, with additionalProperties: false; decision is an enum of the four values; terms is an array of strings with minItems 1; note has minLength 1.
  • The projected query_dataset outputSchema: sourceLine is a string with minLength 1 and is not in required.
Ablations (three, each restored)

Each mutation went through scripts/ablation-replace.mjs on dataset-tools.zod.ts; each anchor hit exactly once and the blob changed; each restore ended with "ok restored: blob == HEAD (332deaf8eec5) and git diff HEAD is empty". The command under each mutation was the two-minute one above, under the verify lock. The suite imports the schema by relative path from src/, so there is no dist/ leg.

Mutation Reading
a fifth value, ask, added to DatasetNextStepDecision (the enum no longer closed on the four) Tests 2 failed | 42 passed (44): the four-cases case and the list_datasets projection case
.optional() dropped from nextStep Tests 6 failed | 38 passed (44): the nextStep "without the key" case, the nextStep projection case, and four earlier cases (three whose answers carry no nextStep, one that reads the output's required list)
.optional() dropped from sourceLine Tests 4 failed | 40 passed (44): the sourceLine case, its projection case, and two earlier query_dataset cases whose answers carry no sourceLine

After the last restore the two files ran green again: Test Files 2 passed (2), Tests 47 passed (47).

Acceptance notes

Verification

  • Derived gates. node scripts/pm/dispatch-gates.mjs --commands (no paths) at d10ea09296 derives 109 commands. --ran answers: "109 derived famil(ies) accounted for — 109 run, 0 NOT-MEASURED", exit 0.
  • First pass. 103 exited 0. Six exited 3 (PREREQUISITE NOT MET), all for one cause, a package not built in this worktree: the two @objectstack/lint doc gates, check:skill-examples, check:docs-transcript-drift, check:dual-build-cjs-loads, check:lean-entry-closure. pnpm check:type-check-debt, itself a derived gate, runs a turbo run build over the packages under the verify lock (exit 0, "0 ledger entr(ies) re-measured"); after it all six exited 0 on a re-run.
  • Generators. pnpm --filter @objectstack/spec run check:generated exit 0, "All 14 generated artifacts are up to date". The artefacts were written by check:generated --fix only.
  • Changeset level. node scripts/check-changeset-no-major.mjs --base origin/main with a pull_request event carrying this title and body: exit 0, "LEVEL AXIS: this PR declares clause-② yes (widening) and metadata-protocol added, and no package whose published source ... it moves is graded patch". Control: the same event with Metadata-protocol: none exits 1, "metadata-protocol declares none while an authorable-surface or authorable-defaults baseline moved" (packages/spec/authorable-surface/ai.json). That confirms the claim's provisional added, with minor.
  • Review tier. node scripts/pm/dispatch-gates.mjs --tier: MANDATORY contract tier for docs/adr/**; 388 changed lines (372 added, 16 removed). node scripts/pm/check-governed-merges.mjs --branch claude/issue-34918-dataset-next-step-source-line: exit 3, GOVERNED, landing tier H, 1 of 13 paths governed (docs/adr/**), size 388 under the 3000 threshold.
  • Overlap. node scripts/pm/overlap-check.mjs at d10ea09296 against origin/main 2ce9c7f990: origin/main merges cleanly; docs(adr-0149): D3 rule 1 note — a member label matches as resolved along the caller's locale chain #34928 shares the ADR file and merges cleanly; feat(ui): a timesheet list view, an editable row × weekday entry grid #34925 and feat(spec, runtime, lint): an action body refuses in the caller's language through a declared refusal catalogue #34719 conflict in the two files under Known overlaps; "VERDICT overlap exit 1".
  • Local-state gates. pnpm check:skill-frame-freshness exit 0. pnpm check:dev-prereqs exit 1: "34 of 107 workspace packages declare an entry point under dist/ that is not on disk" in this worktree. That is this machine's state, not a reading of the diff.
  • Not run locally, CI's. test:repo, the repo-wide pnpm lint and the rest of the farm. No full dogfood run: the title has no ! and the declaration has no (narrowing) arm. check-platform-checklist --changed-from is not owed: no exported symbol is renamed or removed.
  • The branch is 4 commits behind origin/main (2ce9c7f990); none of the four touches a file of this PR.
Selected verdict lines
Gate Line
check:generated "All 14 generated artifacts are up to date"
check:spec-parsed-alias "1594 bare z.input aliases, 860 pinned isomorphic, 734 paired with an XParsed. OK"
check:api-surface "public API surface + factory signatures unchanged" (against the regenerated baseline)
check:export-origins "6228 exports across 19 entry points resolve exactly as recorded"
check:docs "248 generated files in sync with packages/spec"
check:strictness-ledger "docs/audits/2026-07-unknown-key-strictness-ledger.counts/ is current — 14 shard(s)"
check:adr-symbol-anchors "3738 anchors across 158 records resolve"
check-adr-links "1150 relative link destination(s) under docs/adr/ resolve"
check:adr-index "docs/adr/README.md is current, every record parsed"
check-adr-0087-registration "this PR adds no declared-breaking changeset (1 non-breaking changeset(s) seen)"
check:nul-bytes "no raw ASCII control bytes"

Human Minimum

Each item is one rule from
CONTRIBUTING.md › Human Minimum,
which links the AGENTS.md text that states it.

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; the repo-wide pnpm lint is left to CI (the three changed TypeScript files lint clean: exit 0, no finding).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English (the 维护者速读 block is Chinese by the dev agent's rule).
  • The Before Submitting list in CONTRIBUTING.md is done, with the repo-wide runs left to CI as stated above.

Generated by Claude Code

…ets and sourceLine on query_dataset (ADR-0149 M1)

ListDatasetsOutputSchema gains optional nextStep: a closed decision enum
(one_measure, several_measures, candidates_only, no_measure), the caller's
terms it is about, and a note string slot. It holds no member list: the
members are read under its terms from the answer's own matches and
candidates, so an answer keeps one list of candidates.

QueryDatasetOutputSchema gains optional sourceLine, a non-empty string,
declared in the tool's own extend so the shared analytics response is
not widened.

ADR-0149 M1 gains an add-only amendment note: M1 is unchanged, the spec
declares two string slots and one closed enum, and the two sentences are
written by the executor.

Generated artefacts follow in the next commit.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm
Generator output only, plus one description reworded so the nextStep
terms member names the tool's terms input and not itself:
api-surface, authorable-surface, declaration-map, export-origins and
json-schema.manifest for ai, the dataset-tools reference page, the
reference index totals (1670 to 1672, AI 82 to 84) and the strictness
ledger count for ai (97 to 98).

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

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

9 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 5 changed file(s) yielded no anchor (packages/spec/api-surface/ai.json, packages/spec/authorable-surface/ai.json, packages/spec/declaration-map/ai.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 5 changed file(s) yielded no anchor (packages/spec/api-surface/ai.json, packages/spec/authorable-surface/ai.json, packages/spec/declaration-map/ai.json, …) — pages documenting those are invisible to this run
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 173 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 4443014630c094cde840f9dd0b0b45ade45b48d9 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 4443014630c094cde840f9dd0b0b45ade45b48d9

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1: ACCEPT · 2026-11-17T21:51Z

Head-sha: d10ea09
Reviewer: seat 3 L1-c, for card #34918 (os-dev report 6961889053).

席位核对

PR shape. Fixes objectstack-ai/objectstack#34918, base main. 13 paths, +372/-16, in two commits:

  • fe96c22d adds the two shapes in dataset-tools.zod.ts, with the tests, the ADR-0149 note and the changeset;
  • d10ea092 regenerates the artefacts.

'@objectstack/spec': minor is right, because exports are added. Clause-②: yes (a widening) and Metadata-protocol: added both match the diff.

Governed / size. check-governed-merges --pr 34982: GOVERNED, Tier H, on docs/adr/**, 388 lines. So the route is the seat's L2, then the Tier H record and os-zhuang.

CI. 58 success, 10 expected skips, nothing failed. Test Core (10/10) is still running its re-run. This verdict holds on the condition that Test Core (10/10) finishes green on this head.

(a) Describe text says what each slot is (M1). Every new describe names a finding or a slot, and none tells a model what to do:

  • decision names the four cases by what the platform found (one measure, several measures, candidates only, no measure), and says what each rests on (matches or candidates);
  • note and sourceLine each say what the string is, that the executor writes it, and that the schema fixes no text.

The ADR note says the same in its second bullet: what follows from each case "stays D3's to say, in the three places D3 names". The note changes no word of M1, of its option table or of its Ruled A line, and the diff confirms it: the ADR change is 11 added lines, all inside the new note.

(b) Regenerated artefacts, pin and strictness rows. Each count follows from the zod change:

  • references/index.mdx: AI 82 → 84 schemas, total 1670 → 1672, and the dataset-tools.zod.ts row gains DatasetNextStep and DatasetNextStepDecision. Two new exported schemas, two new rows.
  • api-surface: the four entries are the const and type for each of the two.
  • authorable-surface: DatasetNextStep:{decision,note,terms}, ListDatasetsOutput:nextStep and QueryDatasetOutput:sourceLine. That is five keys, which is exactly the diff.
  • json-schema.manifest: the same two schemas. declaration-map and export-origins gain three lines each, consistent with that.
  • Type-alias pin: 858 → 860, with two Iso_ pins, one for the enum and one for the object, and both header numbers moved together. Neither shape has a default or a transform, so z.input equals z.infer, as the pin claims.
  • Strictness ledger: ai/ 97 → 98. That is one new z.object site (DatasetNextStepSchema). The ListDatasetsOutput and QueryDatasetOutput changes extend existing sites.

(c) The terms-reference form against the ruling's "the candidates". Ruling record 6953671481 says nextStep carries "a closed decision, the candidates, a sentence". The PR carries the candidates by reference: terms names the caller's terms, and the members are read under those terms from the same answer's matches and candidates. The tests pin that a member list written inside nextStep is stripped on parse. This is a strict refinement of the ruled wording, not a different result. Every candidate the ruling meant is reachable, from one list instead of two. The ADR note's "One list of candidates" bullet says so, with the reason (no pointer declared twice). The seat's L2 should state that reading, as it did for #34828 (N1).

The REST door. The test pins that sourceLine lives only on the tool's output, and that AnalyticsResultResponseSchema (the REST data) does not keep it. That is right: the extension sits on QueryDatasetOutputSchema alone, and the REST schema is untouched in the diff.

Value to a customer agent. After #34919, a client reads the case and a finished sentence from the answer instead of working them out of matches and candidates. Both clients, the product agent and any MCP client, get the same words.

Must-fix

None.

Should-fix

None.

Notes

Next: the seat's L2 (Tier H, an ADR-0149 amendment note and new spec shapes), then the Tier H record and os-zhuang. A later push owes an L1-c delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head d10ea09296e107c40685477e157d64ef8746e1a5 · 2026-11-17T21:52Z

…ames its PR

DatasetNextStepSchema's doc comment now says it outright: an answer carries
one nextStep and it reports one case, also when the terms sent are in
several. The precedence among the cases is the executor's, fixed and
documented by card #34919; the spec declares no order, and `terms` says
which of the terms sent the reported case covers.

No describe text changes, so each tool's outputSchema is what it was and no
generated artefact moves.

The header of the amendment note under ADR-0149 M1 names PR #34982 in place
of "this PR".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1: ACCEPT (delta) · 2026-11-17T22:02Z

Head-sha: d304f1b
Reviewer: seat 3 L1-c. This is a delta read of d10ea092..d304f1b8 against my 6962024627 (dev fix round 6962222527 on #34918).

席位核对

Delta. One commit whose parent is my ACCEPTed head. Two paths, +6/-3, prose only:

My N1: closed by the seat's ruling. One object per answer is now the ruled shape. That settles the object-or-array question before landing, which is what N1 asked for. The precedence is owed by #34919, and it is named in the spec's own comment, so that card's L1 can hold it to it.

My N2: folded. The report notes that the D3 note on main still reads "— this PR". That header belongs to another card and is untouched here, which is right.

CI. The previous head's Test Core (10/10) re-run went green. CI on this head is still running, with nothing failed. This verdict holds on the condition that Lint & Repo Gates, TypeScript Type Check and Test Core finish green on this head. The tier is still H (docs/adr/**).

Must-fix

None.

Should-fix

None.

Notes

None new.

Next: the seat's L2, then the Tier H record and os-zhuang. A later push owes an L1-c delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d10ea09296e107c40685477e157d64ef8746e1a5
Local-runs: none
Scope: packages/spec/src/ai/dataset-tools.zod.ts, docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md + none
Security-touching: no

This record covers d10ea09296 only. The PR head moved to d304f1b861 at 21:59Z while this review ran (one commit on top, 9 changed lines in the two hits files: the DatasetNextStepSchema doc comment and the ADR note's header). That head and anything after it are the seat's separate delta and are not judged here.

Read for this record: card #34918 (body and all four comments: triage 6954733026 and 6959430017, claim 6959561891, os-dev report 6961889053), ruling record 6953671481 on #34894, the body of #34919 (the first consumer, where the ruling's four-way sentence is quoted), PR #34982 (body, the 13-file list, the three comments including L1-c 6962024627, and the net diff from merge-base 44c7a4a415 to the head), contract record 6948719696 on #34828 (for its N1 form), and the check-runs on the head. Nothing was built or run. Read but not reviewed, outside the diff: packages/services/service-analytics/src/dataset-tools.ts (identical at the head and on origin/main db1a05cdae), packages/spec/liveness/README.md and packages/spec/liveness/dataset.json. + none: no file in the diff implements or enforces the two hits files apart from tests and generator output, which are the lane seat's remainder; the executor is #34919 and is not in this diff. Not read: the hosted wrapper (cloud 53a5844); every statement about it below rests on the two cards' quoted evidence.

① Derived judgments

  • Accept-set of ListDatasetsOutputSchema: widened by one optional key. Right. An answer without nextStep parses to the same value as before. An answer with { decision, terms, note } is now kept, where the plain z.object dropped the unknown key before.
  • Accept-set of QueryDatasetOutputSchema: widened by one optional key. Right. sourceLine is declared in the tool's own .extend(); AnalyticsResultResponseSchema is not edited in the diff, so the REST answer is what it was.
  • Two narrow refusals are new, and they are right. A malformed nextStep (a fifth decision value, empty terms, empty note, a missing member) and an empty-string sourceLine parsed before (the key was dropped) and are refused now. No producer in this repository emits either key: dataset-tools.ts at the head returns datasets, partial, warning, candidates only. The one known producer is outside it, the hosted wrapper; see ③.
  • Public surface: four new exports from @objectstack/spec/ai. Right. DatasetNextStepSchema, DatasetNextStepDecision (const and type), DatasetNextStep (type). Nothing is removed or renamed.
  • The generated surfaces agree with the zod, line by line. api-surface +4 (the four exports). export-origins +3 and declaration-map +3 (three names; the enum's const and type share one). json-schema.manifest +2 (ai/DatasetNextStep, ai/DatasetNextStepDecision). authorable-surface +5 (DatasetNextStep:decision, :note, :terms, ListDatasetsOutput:nextStep, QueryDatasetOutput:sourceLine); authorable-surface.base.json did not move. Strictness count ai/ 97 to 98 (one new z.object site; the two output schemas are existing sites). Pin count 858 to 860 with two Iso_ rows; neither schema has a default or a transform. Reference totals 1670 to 1672, AI 82 to 84. references/ai/dataset-tools.mdx carries the three describe strings and the sourceLine string byte for byte, the four enum values in declaration order, nextStep and sourceLine as optional, and the module text as rewritten.
  • MCP outputSchema of both tools gains the member from this PR on, before anything fills it. Right, and stated (changeset, ADR note's last bullet, PR body). The projected nextStep is closed (additionalProperties: false, three required members), pinned by a test in the diff.
  • matches, candidates, provenance, the input schemas and normalization: untouched. Confirmed in the diff.
  • Gate verdicts, read off the check-runs on d10ea09296 as they stood at 22:00Z, after the push of d304f1b861. 70 check-runs: 59 success, 10 skipped, 1 cancelled, none pending.
    • Success, among the 59: Check Changeset, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Lint & Repo Gates and its eight Lint · jobs, Type Check · source gates, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Build Core, Build Docs, Check Documentation Links, Dogfood Regression Gate, Test UI and its 16 shards, Test Core (1/10) to (9/10).
    • Test Core (10/10) has no green conclusion on this head, and now cannot get one. Attempt 1 (job 134374463545) concluded failure: per the dev report, plugin-hono-server adapter-drain.test.ts, the idle keep-alive case. Attempt 2 (job 134393738065) was cancelled at 21:59:26Z, annotation "Canceling since a higher priority waiting request for ci-CI-pull_request-34982 exists": the push of d304f1b861 superseded run 44177643620. Superseded, not settled. The diff holds no file under packages/plugins/** and the failing file names nothing from spec, but that is a reading of the diff, not a gate verdict: the shard's green is owed by the check-runs of the final head, and the delta record reads it there.
    • The roll-up Test Core of attempt 2 (job 134400799137) reads success although its tenth shard was cancelled. It is not counted as a verdict on the tenth shard here.

② Semver level

@objectstack/spec at minor, one changeset, no other package. That matches what the diff publishes: four additive exports and two optional output members, nothing removed or renamed. Check Changeset is success on the head.

Clause-②: yes (widening: two optional output members on published schemas). The line is the same in the PR body, the changeset and the claim, and it is correct: the only narrowing is the refusal of a malformed value under two keys no in-repo producer writes.

Metadata-protocol: added is right. The authorable-surface baseline gains five rows, and the level gate that reads the line is green.

③ Boundary flags

④ Design judgment

No must-fix, no should-fix.

packages/spec/src/ai/dataset-tools.zod.ts, against the ruling, ADR-0149 D3 and its first consumer.

  • The enum counts measures, and that agrees with the code that carries D3 to a model today. LIST_DATASETS_DESCRIPTION on main (dataset-tools.ts:85-99) reads: a word "that matches exactly one measure wins"; "One word matching several measures (in one dataset or two): ask"; a word that matched nothing may have candidates; "No match and no candidates: fall back"; "A dimension match alone picks a grouping, not a number". The four values are those four sentences as findings, in the same grain.
  • Every describe states a fact and none instructs a model, which is what M1 A asks. note and sourceLine fix no wording, template or language.
  • terms is a sound join key. Every matches entry and every candidates entry carries the caller's term as sent, and the description says which list to read for which case, including that only entries whose member is a measure count for the two measure cases.
  • sourceLine beside provenance holds: optional, non-empty, absence is the one spelling of "none", and the REST shape is not widened.
  • I tried to break it on seven cases. None breaks the declared shape; three leave a duty with service-analytics: the dataset executor computes nextStep and sourceLine, and the MCP door returns them #34919 (N1, N2, N5).
    1. Two terms, each equal to one different measure: one_measure with both terms. The description on main says "two such words are two metrics, so compute both". Expressible.
    2. One term equal to the same-named measure in two datasets: several_measures, D3 rule 3. Expressible.
    3. A term equal to one measure and one dimension: one_measure, because a dimension is not counted. See N3.
    4. A measure word with a dimension word, the input schema's own example ["营收", "销售阶段"]: see N1.
    5. A term whose only equal member is withheld from this caller: it has no match in the answer, so the case computed from the answer is candidates_only or no_measure, and nothing withheld is named, provided the sentence is composed from the answer too (N5).
    6. A degraded answer (partial: true): see N4.
    7. A client on an older spec: the plain z.object drops the unknown key, no failure.

The by-term reading of the ruling's "the candidates", stated so that nobody has to infer it. Ruling record 6953671481 lists what nextStep holds as "a closed decision, the candidates, a sentence". The shape holds decision, terms, note. It lists no member. "The candidates" are carried by reference: for each term in nextStep.terms, they are the entries carrying that term in the same answer, the measure entries of the datasets' matches for one_measure and several_measures, and the entries of candidates for candidates_only. This is within the ruling. Every member the ruling meant is in the answer, it is found by an exact string comparison on a key both lists already carry, and it exists once, so there is no second list that could disagree with the first (the card's own scope line: "does not declare the same list twice"). Two things the reference cannot say. It cannot name a subset: a term in terms refers to all of its entries, never to some of them. And it does not hand the reader the candidates ready to read, only where they are; N2 says why that matters and who carries it. 一句话:裁决记录写的是「一个封闭的判断、候选项、一句话」,实际形状是「判断 + 所指的词 + 一句话」;候选项不在 nextStep 里重复列出,而是按词到同一份返回的 matches 和 candidates 里去读。裁决所指的每个候选都读得到,而且全篇只有一份,所以仍在裁决范围内。表达不了的只有两点:不能只指其中几条,以及候选不是现成摆在 nextStep 里的,要靠那句成文的话把它们写出来。

N1 (nit) — a term that equals only a dimension is no_measure, the same value as an unknown word, and the commonest call mixes it with a measure word. The enum's doc comment puts a dimension-only term in no_measure (rule 5) and defines no_measure by rule 4. Rule 5 is about a question with no measure hit at all, not about one term. The input schema's own example, ["营收", "销售阶段"], is by this per-term definition already a mixed call: one term in one_measure, one in no_measure. The declared shape expresses the right answer (one_measure, terms: ["营收"], with the dimension match left in matches), and no declared sentence is false, so this does not block the head. But a precedence in #34919 that puts every non-computing case first, which L1-c offers as an example, would report "no measure" for the commonest ask-data question. #34919 must state and pin that a dimension-matched term never outranks a measure-matched one, and what the answer reports when the only term sent equals a dimension. If the seat would rather publish a fifth value for the dimension-only case, that is free before merge and a breaking change for exhaustive readers after; I do not ask for it: the finding "no measure" is true in both cases, the ruling names four, and matches tells the two apart. Carrier: #34919.

N2 (nit) — the by-term reference leaves the candidates for the reader to assemble unless note names them. #34919's evidence records the wrapper's measured reason for a finished string: a model handed one copies it, and one that assembles it from parts often does not. With no member list inside nextStep, the finished-string property rests on note alone. For several_measures and candidates_only, #34919's sentence should name each offered member by label and dataset label (D3 rule 3's listing), with a pin. Should measurement show that models still fail to gather them, an optional member list inside nextStep can be added later without breaking a reader. Carrier: #34919.

N3 (nit) — a term that equals one measure and one dimension is one_measure, where D3 rule 3 read literally ("two members answer to the word") would ask. The enum follows the reading the executor's tool description on main already publishes (hits are counted in measures), and the decision description says outright that a dimension is not counted, so the contract is self-consistent and agrees with its first consumer. The gap is between D3's rule 3 wording and that description, and it predates this PR. Left as an accepted deviation; a later add-only D3 note can state it.

N4 (nit) — on a degraded answer the reported case is true of an incomplete catalogue. With partial: true, no_measure or candidates_only may be an artefact of the datasets that failed to load, and the sentence "falls back and says so" would send a reader to the object query for a number a governed measure answers. The schema cannot hold this. #34919 should either omit nextStep on a partial answer or make note say that the catalogue was incomplete, and pin whichever it chooses. Carrier: #34919.

N5 (nit) — "composed by the tool from this answer" is a duty of the executor with a permission consequence, and no schema holds it. note and sourceLine are free strings. An executor that composed note from the unfiltered catalogue could name a withheld member. #34919's scope line already says "Only over what the caller was admitted to see"; it owes a test that a withheld member appears in neither sentence (its Done-when says "a withheld member appears in none"). Carrier: #34919.

N6 (nit) — nextStep.terms entries are z.string() while the input's are z.string().min(1). An empty term cannot have been sent, so it cannot be "as sent". The sibling term keys on a match and a candidate are plain strings too, so this is one convention, not a slip of this PR. Left as is.

docs/adr/0149-...md, against its first consumer and its execution plan.

  • Add-only: 11 lines added, none removed or changed, placed at the end of M1 before M2, in the form of the note under D3. The three in-page targets (D2, D3, D6) exist as headings at the head, and the lint check-runs that hold the ADR anchor and link gates are green.
  • The ruling quote 「两件都同意:构建提交进仓库,[Decision] Should the framework's dataset tools return the next step and the citation line themselves, so the MCP door gets what the product's agent gets #34894 选 A」 is the verbatim line of record 6953671481, and the note's account of "what was ruled" repeats that record's Ruled: bullet without adding to it. It leaves out the record's last sentence (the wrapper is removed), which is cloud's and not this record's.
  • The note agrees with the schema sentence by sentence: two string slots and one closed enum; the four findings by name; nextStep holds no member list and refers by term; both members optional; provenance stays the structured source.
  • It agrees with service-analytics: the dataset executor computes nextStep and sourceLine, and the MCP door returns them #34919, its first consumer: the executor composes both sentences, in the caller's locale, note from the answer's matches and candidates and sourceLine from provenance; the same card says the tool descriptions, the initialize rule and the skill carry "follow nextStep; cite sourceLine", which is the note's "what follows from each case stays D3's to say, in the three places D3 names".
  • It does not contradict the rest of the record. M1's text, option table and Ruled A line are untouched. D2's one-definition rule holds: each tool's one definition gains one optional member. M2 stays ruled A.
  • Execution plan: the last bullet names service-analytics: the dataset executor computes nextStep and sourceLine, and the MCP door returns them #34919 and says no answer carries either member until it lands, D6's "pending half named by card" form.

N7 (nit) — the note's header says "this PR", as L1-c's N2 and #34828's N5 found before. Already changed on the later head d304f1b861, which this record does not judge.

Nits only. N1, N2, N4 and N5 go to #34919; N3 and N6 are accepted deviations; N7 is in the fix round already pushed. The delta record on the final head owes two things this record could not give: the judgment of the lines changed after d10ea09296, and a green Test Core (10/10) read off that head's check-runs.

Implemented-by: claude/issue-34918-dataset-next-step-source-line
Reviewed-by: session_01WGufzgh1zkZzDXL36ckWAG

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head d304f1b86183c1a484c72b09b62606e0752da39b · 2026-11-17T22:29Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d304f1b86183c1a484c72b09b62606e0752da39b
Local-runs: none
Scope: packages/spec/src/ai/dataset-tools.zod.ts, docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md + none
Security-touching: no

Delta record. It covers head d304f1b861 only and is a delta of contract record 6962300533 (PASS at d10ea09296). That record stands for everything outside the delta; this one judges the one commit on top of it and re-reads the gates on the new head.

Read for this record: record 6962300533 in full; card #34918 (body and all five comments, the new one being dev fix round 6962222527); ruling record 6953671481 on #34894; the body of #34919 (the first consumer); PR #34982 (body, the 13-file list, its comments including L1-c delta ACCEPT 6962268269); the diff d10ea09296..d304f1b861 and the two hits files at the head; the check-runs on the head. Nothing was built or run. + none: the delta touches the two hits files only, and no file in the PR implements or enforces them apart from tests and generator output (the executor is #34919, outside this diff).

The delta. One commit, parent d10ea09296, two files, 6 lines added and 3 removed, prose only:

① Derived judgments

  • Accept-set and public surface: unchanged by the delta. Right. No schema expression, export or .describe() string is in the diff. Every derived judgment of 6962300533 holds as written.
  • No generated artefact needed regenerating. Right. The changed text is a doc comment on a const; it reaches no generated file. Read at the head: content/docs/references/ai/dataset-tools.mdx renders the module doc block, the property tables (the .describe() strings) and the enum values, and carries no per-schema doc comment; a search of the whole tree at the head for the paragraph's phrases ("reports one case", "declares no order") finds them in dataset-tools.zod.ts alone. declaration-map/ai.json maps names to schema ids and holds no line numbers, so the three-line shift moves nothing in it. The delta's file list holds no generated path, and the gate that would refuse a stale artefact is green on the head (Lint · docs & code guards, Lint · repo & tooling gates, Build Docs: success). Each tool's outputSchema and every JSON Schema description are byte for byte what they were at d10ea09296.
  • Gate verdicts, read off the check-runs on d304f1b861 at 22:31Z. 69 check-runs: 58 success, 10 skipped, 1 in progress, none failed, none cancelled.
    • Success: Check Changeset, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Lint & Repo Gates and its eight Lint · jobs, the four Type Check · jobs and TypeScript Type Check, Build Core, Build Docs, Build & E2E UI, Live E2E UI, Check Documentation Links, Dogfood Regression Gate, Test UI and its 16 shards, Test Core (1/10) to (8/10) and Test Core (10/10).
    • Test Core (10/10) is success on this head. That is the green 6962300533 said the final head owed.
    • Pending: Test Core (9/10) (job 134402640912, started 22:02:31Z, still running at 22:31Z), and with it the Test Core roll-up, which has no check-run on this head yet. This record does not count the shard as green. The delta holds one doc comment paragraph and one ADR header phrase, so no test can read it, but that is a reading of the diff and not a gate verdict: the seat reads the shard's conclusion off this head before it adopts the record.
    • Skipped (10): the opt-in and matrix-placeholder jobs, Queue verdict and Borrowed queue verdict among them, as on the previous head.

② Semver level

Unchanged: @objectstack/spec at minor, one changeset, untouched by the delta. A doc comment and an ADR phrase publish nothing new. Check Changeset is success on the head.

Clause-②: yes (widening: two optional output members on published schemas). The line is as it was in the PR body, the changeset and the claim, and it is still correct.

③ Boundary flags

  • Open question 1 (one nextStep or one per term): ruled A by the seat, and the delta writes the ruling into the contract. The paragraph now says an answer carries one nextStep and that it reports one case. 6962300533 found that ruling sound; nothing in the delta reopens it.
  • The condition on that ruling (the precedence sentence goes into the doc comment or a describe()): met in the doc comment. The paragraph names the precedence, says it is the executor's, names service-analytics: the dataset executor computes nextStep and sourceLine, and the MCP door returns them #34919 as the card that fixes and documents it, and says the spec declares no order. It was not put into a .describe(), and that is the right place for it: a describe() reaches every MCP client's outputSchema, and a sentence there about an order the spec does not hold would be a promise without a holder. See N8 for what the doc comment form leaves open.
  • Open question 2 (the four values): untouched by the delta.
  • Dev fix round's one stated deviation (the header form "PR feat(spec): the dataset tools' output declares nextStep on list_datasets and sourceLine on query_dataset (ADR-0149 M1) #34982" is N2's form and not a copy of the D3 note's header, which still reads "this PR" on main): accepted. The D3 note's header is spec: list_datasets answers a term with no match with a candidates list, never selected; ADR-0149 D3 gains the amendment note #34761's and is not this card's to edit.
  • The PR body describes d10ea09296. Its readings name that head, its line count for the spec file says 100 added (103 now), and its acceptance note says the mixed-case precedence "is not ruled and not in the spec"; the first half of that is now out of date (one case per answer is ruled; the order is still not in the spec). The body is the seat's to bring to the head before landing, as the dev's fix-round comment says. Not judged here: the tree is judged, not the body.
  • Skills-docs: follow-up owed still names no card number; the seat owes it before landing, as 6962300533 said.
  • SQL push-down: not applicable. The delta is prose.
  • Security-touching is no. Neither changed hunk states permission, sharing, credential, token or authentication behaviour. The paragraph is about which case an answer reports; the header is a PR number.

④ Design judgment

No must-fix, no should-fix.

packages/spec/src/ai/dataset-tools.zod.ts, the changed paragraph against the ruling, the rest of the contract and its first consumer.

  • Against ruling [Decision] Should the framework's dataset tools return the next step and the citation line themselves, so the MCP door gets what the product's agent gets #34894 A (record 6953671481). The record says nextStep holds "a closed decision", singular. "An answer still carries one nextStep, and it reports one case" is that sentence made explicit. Nothing in the record gives an order among cases, so "the spec declares no order" contradicts nothing in it.
  • Against the decision description, unchanged at the head. It reads: "Which case of the ADR-0149 D3 selection rule each term in terms is in". With the new sentence "terms says which of the terms sent the reported case covers", the two say one thing: every term listed is in the reported case, and a term in another case is left out of terms and keeps its entries in matches or candidates. I tried the mixed call the input schema's own example makes, ["营收", "销售阶段"]: the paragraph and the description agree on every answer an executor could give for it, whichever case it reports.
  • Against the paragraph below it ("that decision is the case the named terms are in, and that every term named was sent"): consistent; the new text adds the precedence to what the executor holds and takes nothing from that list.
  • Against M1 A. The paragraph is a doc comment, it reaches no model, and it states what the slot is. No instruction enters the spec.
  • Against service-analytics: the dataset executor computes nextStep and sourceLine, and the MCP door returns them #34919, the first consumer. Its Done-when is four single-word calls, one decision each, so its body states no order among cases today. The paragraph therefore assigns that card a duty its body does not yet carry. That is the ruling's condition working as intended, and the assignment is in the tree where the card's L1 can hold it; the seat should also write the line on service-analytics: the dataset executor computes nextStep and sourceLine, and the MCP door returns them #34919 so the duty is on the card and not only cited at it.
  • I tried to break the sentence "the spec declares no order". It would be false if any declared text implied one. The enum's declaration order (one_measure, several_measures, candidates_only, no_measure) is the D3 rule order and could be read as a precedence; the new sentence closes that reading in so many words. The module doc block, the ADR note and the changeset state no order either. It holds.

N8 (nit) — "card #34919 fixes and documents it" names a card as the place a contract lives, and a card closes. Once #34919 lands, a reader of this doc comment is sent to a closed issue for an order clients depend on (L1-c's N1: "the precedence is a contract readers will depend on"). The sentence is true now and stays true after, so it does not block. #34919 should put the order where a reader of the tool finds it (the executor's tool description or its own doc comment, with a pin per precedence step) and, in the same PR, turn this citation into a pointer to that place. Carrier: #34919.

docs/adr/0149-...md, the changed header.

N9 (nit) — the note's last bullet still begins "This PR declares the shapes". Inside a note whose header now names the PR, the phrase resolves, and the D3 note on main reads the same way. Left as an accepted deviation; fold it only if another push happens for a different reason.

Status of N1 to N7 of record 6962300533.

Nits only. N1, N2, N4, N5 and N8 go to #34919; N3, N6 and N9 are accepted deviations; N7 is closed. One thing is still owed before the record is adopted, and it is the gate's and not this review's: the conclusion of Test Core (9/10) on this head.

Implemented-by: claude/issue-34918-dataset-next-step-source-line
Reviewed-by: session_01WGufzgh1zkZzDXL36ckWAG

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

席位记录 · 2026-11-17T22:34Z

Head-sha: d304f1b86183c1a484c72b09b62606e0752da39b

维护者速读(终稿)

席位意见:建议批准。席位裁定的两个开放问题都已写进契约:Q1 选 A,一个 nextStep;Q2 选 A,四个取值;优先顺序那句话按条件写进了注释。没有放进 .describe(),理由是规范本身不持有这个顺序,L2 认可。

席位核对

@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 17, 2026
One conflict, in packages/spec/src/type-alias-convention.pin.test.ts: the
pinned isomorphic-alias count. main moved it 858 to 859 (one pin for an
action's declared refusal entry) and this branch 858 to 860 (two pins for
the dataset next step). Resolved by hand to the sum, 861, on the count lines
only: the header line, the case title, and the expectation with this branch's
history line re-based to 859 -> 861. main's history comment is kept as it is
and both sets of pin rows are present.

content/docs/references/index.mdx is generated and was not text-merged; the
regeneration follows in its own commit.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm
@os-zhuang
os-zhuang marked this pull request as ready for review November 17, 2026 22:50
@os-zhuang
os-zhuang enabled auto-merge November 17, 2026 22:50
content/docs/references/index.mdx is generated and was not text-merged in
the merge of origin/main. main's side was taken and the page regenerated
from the merged tree by `check:generated --fix`: 1673 schemas (main's 1671
plus DatasetNextStep and DatasetNextStepDecision), AI 84, UI 178 with main's
ActionRefusal. No other artefact was stale.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Seat provenance · merge-forward · 2026-11-17T23:02Z

Regen-provenance: 6962980723 · d304f1b861 → d80b2d888d · merge of main 4443014630 (f10de61) + regeneration (d80b2d8)

Read by the seat, not relayed:

  • f10de61e76 has parents d304f1b861 and 4443014630. git merge-tree --write-tree d304f1b861 4443014630 conflicts in packages/spec/src/type-alias-convention.pin.test.ts alone. Apart from that file, the merge commit's tree differs from merge-tree's only in content/docs/references/index.mdx, a generated file.
  • The hand resolution of the pin test changes count lines and comments only: the header // 861 isomorphic aliases, the case title all 861 isomorphic pins, the history comment (main's 858 -> 859 actions: an action body has no refusal catalogue — a person-facing throw from an action stays in the author's language #34273 block kept verbatim, then this PR's block restated as 859 -> 861), and toHaveLength(861). 859 on main + 2 from this PR = 861. No pin, schema, source or prose line was hand-resolved. The seat counts this as mechanical.
  • d80b2d888d differs from f10de61e76 in content/docs/references/index.mdx only, the regenerated reference index.
  • The ADR-0149 file auto-merged with both amendment notes intact.

The contract review records 6962300533 and the delta at d304f1b861 carry forward to d80b2d888d: the delta adds no reviewed line. CI is running on the new head. The Tier H seat record 6962980723 stands for this head, and os-zhuang's review is re-requested on it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1: ACCEPT (delta, merge and re-sum) · 2026-11-17T23:02Z

Head-sha: d80b2d8
Reviewer: seat 3 L1-c. This is a delta read of d304f1b8..d80b2d88 against my 6962268269 (note 6963503042).

席位核对

Delta. Two first-parent commits:

  • f10de61e merges main at 44430146. Its first parent is my ACCEPTed head.
  • d80b2d88 regenerates content/docs/references/index.mdx alone.

Only the two shared-count files carry anything new. I compared each file's diff against its base: from the old merge-base to d304f1b8, and from 44430146 to d80b2d88. Eleven of the 13 files have the same patch-id on both sides: the changeset, the zod and its test, the ADR note, the ledger, all five spec artefacts, and dataset-tools.mdx. So the merge brought in nothing of this PR's own, and the ADR auto-merged with both notes in place. The two that differ are the files whose totals are shared with main:

  • references/index.mdx. Against main it moves 1671 → 1673 and AI 82 → 84, and adds the two names. That is the same +2 as before, now on main's 1671. d80b2d88 is the regeneration, and the merge commit's stale count is gone.
  • type-alias-convention.pin.test.ts. Against main it moves 859 → 861 in the header, the case title and toHaveLength, and adds the same two Iso_ pins. The history comment keeps main's 858 → 859 block and re-bases this PR's block to 859 → 861. Hand re-summed, and correct: main's +1 plus this PR's +2.

Gates. The note reports check:generated, spec-parsed-alias (861), the ADR gates, typecheck and the 47 tests, all exit 0. CI on this head is running (40 pending, nothing failed). This verdict holds on the condition that Lint & Repo Gates, TypeScript Type Check and Test Core finish green on this head. Auto-merge is armed, so those checks are the gate.

Must-fix

None.

Should-fix

None.

Notes

  • N1. The decision .describe() one-case sentence the seat asked for (o3-E's note at 22:02Z) is not on this head. The doc comment carries it, which is what my earlier read accepted. If it is still wanted, it is now a follow-up after the merge, not a blocker, since auto-merge is armed.

Next: auto-merge lands it once green. A later push before that owes an L1-c delta read.

os-support-ai pushed a commit that referenced this pull request Nov 17, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 92a5cac Nov 18, 2026
70 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-34918-dataset-next-step-source-line branch November 18, 2026 00:06
os-support-ai pushed a commit that referenced this pull request Nov 18, 2026
type-alias-convention pin: main moved 859 -> 861 (#34982,
DatasetNextStepDecision + DatasetNextStepSchema); TimesheetConfigSchema
becomes 861 -> 862.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzgTk2cRpVHpSVk9tzF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

spec: the dataset tools' output declares nextStep on list_datasets and sourceLine on query_dataset

3 participants