Repository navigation
Description
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG
立卡门类别:④ 协调节点的子单,承父单 #34659(MCP 二期与问数专题);#34691 裁定后的执行卡,⛔ 不是认领。
Ruling: F1 B, #34691 comment 6943126855, option text verbatim 「B 零命中返回候选」 — 「现在就改服务器,list_datasets 零命中时返回候选数据集。专题席的新推荐。」, knocked to #34659 as comment 6943149235. It re-rules E2 of #34659 comment 6940528935 from "B with a premise" to A.
维护者速读
- 做什么:
list_datasets的返回结构加candidates:用户的词一个成员都没精确命中时,列出相近的成员,只供反问,平台永不替用户选。 - 为什么:今天零命中时客户端只能自己猜;候选放进工具结果,任何客户端都读得到,不靠技能措辞。
- 同卡给 ADR-0149 D3 加修订说明:「什么算命中」不变;有候选先反问,没有候选才按第 4 条回退。
- 需要你做的:PR 含
docs/adr/**,是 Tier H,要你亲手合并;没有别的要决定。
现状 (objectstack origin/main f6f5b50, read 2026-11-17; code read, nothing run)
ListDatasetsOutputSchemaisdatasets,partial,warning(packages/spec/src/ai/dataset-tools.zod.ts:168-178);matchesis per dataset, equality hits only (:161-164,:84-93). Nothing answers a zero-match.- With
termsthe whole admitted catalogue is still returned (packages/services/service-analytics/src/dataset-tools.ts:389-451): a zero-match gets every dataset and no pointer to the near ones. - ADR-0149 D3 rule 1 already lets a substring or neighbour "be offered in rule 3's question, never acted on"; rule 4: no hit falls back (
docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md:151,154). M1 A keeps AI guidance text out of the spec (dataset-tools.zod.ts:38-39).
要做的
ListDatasetsOutputSchemagains optionalcandidates. Proposed; the PR settles it and says why if it differs:- entry
{ term, dataset, member, matchedOn }:DatasetTermMatchSchemaplus the dataset; - present only when
termswere sent and a term hit no member of any listed dataset, for those terms only; absent otherwise, so an answer with a hit is unchanged; - order: terms as sent, datasets as listed, measures before dimensions (D3 rule 5); no score;
- cap: an exported per-term constant (proposed 5);
.describe(): not a match, for a clarifying question, never selected, only members this caller may read.
- entry
- Spec tests (
dataset-tools.test.ts); regeneratepackages/spec/*/ai.jsonandcontent/docs/references/ai/dataset-tools.mdx. - ADR-0149 add-only note under D3, in ADR-0011:238's
> **Amendment note**form: hits unchanged; a term with no hit getscandidates; with candidates the caller asks in rule 3's form and acts on none; with none, rule 4 unchanged. It names rule 4 too: asking before the fallback changes the path, not the matching.
不做的
- The near-match rule, executor and tool description: the server sibling.
- Skill text (skills: publish an ask-data skill for a client answering business questions over MCP (list_datasets → query_dataset → labelled fallback) #34685),
/mcp/skill(mcp: the open door's initialize instructions carry the ask-data selection rule and the skills install line; /mcp/skill renders from the published skill #34686), the cloud planner; any change tomatchesor normalization.
验收
- The schema parses answers with and without
candidates, today's unchanged; generated files committed; spec tests green. - The ADR note is add-only.
Governed: docs/adr/** is Tier H (scripts/pm/check-governed-merges.mjs:1375). Its add-only arm reads S only beside riders; packages/spec/** keeps this PR Tier H, landed by the maintainer's hand.
Reader: domain:spec · seat 3 area o3-E, L1-c review.
Blocked-by: none.
Dedupe: gh api -X GET search/issues -f q='repo:objectstack-ai/objectstack is:issue list_datasets candidates' → 10 (#34685, #34691, #34659 open; #32072 and QA runs closed; none this). … ADR-0149 D3 near → 2 (#34691, #34659).
Activity
objectstack-fleet commentedon Nov 17, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: first touch → p2 ·
domain:spec·pm:queue· 2026-11-17T09:59Z⛔ Not a claim.
list_datasetscandidates, never selected) plus the ADR-0149 D3 note →domain:spec. Tier H for the ADR line.objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzfR33NbV51QQU6R6bm
Claim: PM loop round 1 · 2026-11-17T10:52Z
Session:
session_01WGufzfR33NbV51QQU6R6bmAccount:
os-support-aiBranch:
claude/issue-34761-list-datasets-candidatesWorktree:
objectstack-issue-34761Domain:
domain:specSeat:
repo:objectstack#3File surface:
packages/spec/src/ai/dataset-tools.zod.ts(optionalcandidatesonListDatasetsOutputSchema, its entry schema and the exported per-term cap),packages/spec/src/ai/dataset-tools.test.ts, the generated spec artefacts the schema change regenerates (packages/spec/{api-surface,authorable-surface,declaration-map,export-origins,json-schema.manifest}/ai.jsonas the generators write them,content/docs/references/ai/dataset-tools.mdx),docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md(add-only> **Amendment note**under D3), root.changeset/34761-list-datasets-candidates.md. ⛔ No executor, matcher or tool description (packages/services/service-analytics/**,packages/mcp/**: #34763).Container & model:
M,mode:subagent(area o3-E),model: CONTRACT_REVIEW_TIER (dispatch-gates --tier MANDATORY: 'docs/adr/**', the 2026-10-25 order 「adr 这种任务都需要 fable extra」, effort floor xhigh; no one-line exit),effort: xhighClause-②: yes (widening — an optional output field on a published schema)
Metadata-protocol: none (provisional:
packages/spec/authorable-surface/ai.jsonlists the dataset-tools schemas; if the generators add a row there, the level axis needsaddedand the dev declares it in the PR body and changeset, as on PR #34674)Responsibility:
n/a — not a defect cardThread-read: 6944781005
Premise: holds (area reading at origin/main 6091b64:
ListDatasetsOutputSchemaisdatasets/partial/warningatpackages/spec/src/ai/dataset-tools.zod.ts:168-178;DatasetTermMatchSchema:84-93,matchesequality-only :161-164; AI guidance kept out of the spec :36-39 (ADR-0149 M1 A); ADR-0149 D3 rules 1-5 atdocs/adr/0149-…md:149-155, rule 1 already lets a substring be "offered in rule 3's question, never acted on"; ADR-0011 amendment-note form at :238)Serial constraints cleared:
none in flight on these files in this seat; #34763 (server fill) is Blocked-by this card; #34685 (PR #34792) and #34686 (PR #34790) touch no spec file; overlap-check runs at the first push and before every pushPre-claim lane:
domain:spec—packages/spec/src/ai/**and its generated artefacts, plusdocs/adr/0149-…md; seat 3 routed it to area o3-E (留道: card touching packages/spec stays in this lane, seat L1/L2)Pre-claim deps: none —
Blocked-by: noneon the cardPrior rulings read: candidates,list_datasets,zero-match → 6 hits; ADR-0078 Decision §8, ADR-0110 D2, ADR-0149 D2, ADR-0149 D6; thread: #34691 F1 B (6943126855, knock 6943149235) re-rules #34659 6940528935 E2 to A; repo: objectstack-ai/objectstack. ADR-0149 D3's "what counts as a match" is not changed: candidates are never a hit and never selected.
Lease
o3-E(seat post #34584); child of epic #34659. Tier H (docs/adr/**+packages/spec/**): after L1-c the seat runs L2 at CONTRACT_REVIEW_TIER and takes the PR to os-zhuang; o3-E does not land it.objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzfR33NbV51QQU6R6bm
os-dev-report
{ "issue": 34761, "status": "done", "branch": "claude/issue-34761-list-datasets-candidates", "pr": "https://github.com/objectstack-ai/objectstack/pull/34828", "session": "session_01WGufzfR33NbV51QQU6R6bm", "premise_still_valid": true, "summary": "Spec half of the #34691 F1 B ruling (record 6943126855). `ListDatasetsOutputSchema` gains one optional member, `candidates`: a list (`.min(1).optional()`) of the new `DatasetTermCandidateSchema` `{ term, dataset, member }`, with the exported cap `LIST_DATASETS_MAX_CANDIDATES_PER_TERM = 5` and the type `DatasetTermCandidate`. `matches`, `DatasetTermMatchSchema` and normalization are untouched; nothing under packages/services/service-analytics, packages/mcp or skills is in the diff. ADR-0149 D3 gains an add-only amendment note in ADR-0011's form (11 lines added, 0 removed or changed) that cites the ruling's option text verbatim with its record id. The changeset is `@objectstack/spec` minor with `Metadata-protocol: added`: the generators added four rows to packages/spec/authorable-surface/ai.json, and the level axis exits 1 on `none` (control run) and 0 on `added`. One point differs from the card's proposal, with the reason in the PR body: the entry carries no `matchedOn` (that key states an equality a candidate does not have) and no near-word key (D3 rule 1 lets an embedding neighbour be offered, which is near no single word, and the rule is the executor's, #34763). Presence, order and cap are as proposed; order and cap are stated in the description and enforced by no schema. Draft PR #34828 at head 666309be, assignee os-support-ai, no reviewer request. Tier H: this run never readied or queued it, and it owes the seat's L2 at CONTRACT_REVIEW_TIER, which this dev did not run. The #34720 qualifier for D3 rule 1 is PENDING: card #34761 carried no such amendment when the ADR edit was made, nor at a re-read after the last commit (body unchanged, two comments, neither names #34720), so the note is the candidates block only. It is one self-contained block and changes no existing D3 sentence, so a later sentence can be added to it. Skills-docs follow-up is owed for the seat to file: skills/objectstack-ask/SKILL.md, its zero-match row reads `candidates` once #34763 lands (that file arrives with PR #34792). The card assignee was not written by this run.", "deviations": [ "File surface: three files beyond the claim's list. packages/spec/src/type-alias-convention.pin.test.ts is a hand edit (one pin row, count 857 to 858) that `check:spec-parsed-alias` demands for a new bare input alias. content/docs/references/index.mdx (schema totals) and docs/audits/2026-07-unknown-key-strictness-ledger.counts/ai.md (96 to 97 sites) are generator output of `gen:docs` and `gen:strictness-ledger`, which the dispatch order covers as 'any other generator output the gates demand'.", "Overlap: `node scripts/pm/overlap-check.mjs` answers `VERDICT overlap exit 1` at head 666309be against open draft PR 34719 (conflicts in content/docs/references/index.mdx and packages/spec/src/type-alias-convention.pin.test.ts: both PRs move the same totals and the same pinned count); origin/main merges cleanly. I pushed and opened the draft anyway and report it: whichever of the two lands second merges main, re-runs `gen:docs` and sets the pin count to the sum. The seat decides the order.", "The #34720 qualifier was not written (see summary): the seat's heads-up made it conditional on the card carrying the amendment, and it did not.", "Ablation: the first attempt at the first ablation did not run. `scripts/ablation-replace.mjs` refused it (the replacement was a substring of the anchor, count 18 to 18) and restored the file. The reading in `tests` is the second attempt with a narrower anchor.", "The branch merged origin/main at 3bbda33b through `scripts/pm/os-regen-merge.sh` (the derivation had flagged a stale tree). The merge commit was amended locally, before it was ever pushed, to carry the model-free trailer pair. No force push was made.", "`test:repo` was not run locally: the diff edits no test of that project and the derivation does not name it. It is CI's (`Test Core`).", "`pnpm check:type-check-debt` runs `turbo run build` over packages/** by itself under the verify lock (held 44 s, shared-box seconds), which is wider than the targeted closure builds I ran by hand (`--filter '@objectstack/lint...'`).", "One foreground command (a commit followed by the spec typecheck and test) was moved to the background by the harness. I waited for it in the foreground with `tail --pid` and read the lock's VERDICT line.", "Attribution: the harness reminder asks for a commit trailer that names a model and for a different PR footer. Every commit on the branch carries the dispatch order's model-free pair (`Co-Authored-By: Claude` and `Claude-Session:`), and the PR body ends with the session-URL footer and the signed trailer line, as os-dev.md and the dispatch order rule. The harness wrote no trailer of its own.", "The checkout is shallow (`git rev-parse --is-shallow-repository` answers true). No claim in the PR or in this report rests on history dates or ancestry." ], "tests": "Head 666309be (`git rev-parse --short HEAD`), tree clean, branch equal to the remote. (1) `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/ai/dataset-tools.test.ts src/type-alias-convention.pin.test.ts` under the verify lock at 666309be: Test Files 2 passed (2), Tests 36 passed (36), VERDICT command-exit 0. The dataset-tools file alone is 33 tests, seven of them new. (2) `pnpm --filter @objectstack/spec typecheck` then `test` under the verify lock at a23b07c9: check:test-typecheck: OK; Test Files 847 passed | 1 skipped (848); Tests 27175 passed | 1 skipped | 1 todo (27177); VERDICT command-exit 0. The only later commit, 666309be, changes one sentence of the ADR note. (3) Downstream consumers (direction: the two packages outside spec that import the dataset-tool schemas), against a spec dist that carries the new export (`LIST_DATASETS_MAX_CANDIDATES_PER_TERM` found in packages/spec/dist/ai/index.js, index.mjs and index.d.ts): `pnpm --filter @objectstack/service-analytics test` Test Files 218 passed (218), Tests 5548 passed | 335 skipped (5883); `pnpm --filter @objectstack/mcp test` Test Files 66 passed (66), Tests 1226 passed (1226); one lock hold, VERDICT command-exit 0. (4) Built projection read from dist: `getDatasetToolJsonSchemas().list_datasets.outputSchema` has required = [datasets]; `candidates` is type array, minItems 1; its items are type object, required [term, dataset, member], additionalProperties false. (5) `pnpm exec eslint --no-inline-config` on the three changed TypeScript files: exit 0, no finding. Ablations, three, each through `scripts/ablation-replace.mjs` on packages/spec/src/ai/dataset-tools.zod.ts (blob bbb4dce7b5b8, the same blob at the final head), each with the on-disk proof 'ok mutation landed: anchor 1 -> 0' and the restore proof 'ok restored: blob == HEAD (bbb4dce7b5b8) and `git diff HEAD` is empty'. The suite imports the schema by relative path from src, so no dist leg applies. (a) `.min(1)` to `.min(0)` on `candidates`: Tests 2 failed | 31 passed (33), the empty-list case and the projection case, VERDICT command-exit 1. (b) the key `candidates` renamed: Tests 3 failed | 30 passed (33). (c) `member` to a plain string: Tests 1 failed | 32 passed (33), the member-format case. The first attempt at (a) was a no-op that the tool refused and restored (see deviations). Changeset level: `GITHUB_EVENT_NAME=pull_request GITHUB_EVENT_PATH=EVENT_JSON node scripts/check-changeset-no-major.mjs --base origin/main` with the PR's title and body: exit 0, 'LEVEL AXIS: this PR declares clause-② `yes (widening)` and metadata-protocol `added`'. Control with `Metadata-protocol: none` in the same event: exit 1, 'metadata-protocol declares `none` while an authorable-surface or authorable-defaults baseline moved', naming packages/spec/authorable-surface/ai.json.", "gates": "Local subset, head 666309be. `node scripts/pm/dispatch-gates.mjs --commands` derives 109 commands; each exit code was captured after a redirect, before any pipe. First pass: 96 exit 0; 11 exit 3 (PREREQUISITE NOT MET) and `check:generated` exit 1, all twelve for one cause (dist older than the sources after the pin edit, or a package not built); `check:type-check-debt` exit 124 (my runner's 300 s cap, NOT MEASURED on that pass). After `pnpm --workspace-concurrency=2 --filter '@objectstack/lint...' build` under the lock and `pnpm check:type-check-debt` run to its end (exit 0, 'check-type-check-coverage --re-measure: OK — 0 ledger entr(ies) re-measured'), the thirteen were re-run: all exit 0. Reconciliation: `node scripts/pm/dispatch-gates.mjs --ran RAN_LIST` exit 0, '✓ dispatch-gates --ran: 109 derived famil(ies) accounted for — 109 run, 0 NOT-MEASURED'. Verdict lines: `check:generated` 'All 14 generated artifacts are up to date'; `check:spec-parsed-alias` '1592 bare z.input aliases, 858 pinned isomorphic, 734 paired with an XParsed. OK'; `check:export-origins` '6223 exports across 19 entry points resolve exactly as recorded'; `check:docs` '248 generated files in sync with packages/spec'; `check:adr-symbol-anchors` '3734 anchors across 158 records resolve'; `check-adr-links` '1150 relative link destination(s) under docs/adr/ resolve'; `check:liveness` exit 0, no ledger row demanded for the new key; `check:nul-bytes` 'no raw ASCII control bytes'. An earlier `check:generated` run, before the merge of main, threw 'tsc -p tsconfig.test.json failed without diagnostics' inside `check:test-typecheck` (NOT MEASURED on that run, probable memory pressure on the shared box); the typecheck run alone under the lock exited 0, and every later `check:generated` run shows all 14 green. Outside the derivation: `node scripts/pm/overlap-check.mjs` exit 1 (see deviations). `pnpm check:skill-frame-freshness` exit 0. `pnpm check:dev-prereqs` exit 1, a local-state reading: '34 of 107 workspace packages declare an entry point under dist/ that is not on disk' (the three it names are under ui/; the gates above needed none of them). `node scripts/check-platform-checklist.mjs --changed-from origin/main` not owed: no exported symbol was renamed or deleted. CI, PR 34828 check-runs on 666309be, read once after the PR opened and not waited on (37 runs). success (10): Auto Label; Dogfood Regression Gate; Lint · PM dispatch-gates; Lint · scoped · tooling self-tests; Governed Surface Queue Guard; filter; Check PR Size; Check Documentation Links; PR-body guards (claim · duplicate · Part-of · single-writer path); Spec property liveness. skipped (9): Dogfood Verify CLI; Temporal Conformance (live PG + MySQL); the Dogfood Regression Gate shard matrix row; UI Published Artifacts; 18.x upgrade harness (opt-in); Schedule gate; Borrowed queue verdict; Packed-tarball smoke (opt-in); Queue verdict. in_progress (18): Build UI Deps; Build Core; Plan Test Core shards; Live E2E UI; Build Docs; Plan Test UI shards; Type Check · consumer gates; Type Check · debt ledger; Type Check · source gates; Type Check · workspace; Lint · scoped · query-options erasure; Lint · docs & code guards; Lint · ESLint; Lint · repo & tooling gates; Lint · CI, release & engine gates; Lint · scoped · slot lookup & corpus; Check Changeset; Flag docs affected by code changes. `test:repo`, the repo-wide `pnpm lint` and the rest of the farm are CI's and were not run locally.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0 — no MCP GitHub call was made; card, comment, PR and check-run reads went through single-item REST reads", "api_writes": "2 relay strokes, 3 requests. (1) `fleet-write/dispatch.mjs` `pr_create` (request fw-20261117T121455Z-02db57, run 44081354642, conclusion success): POST /repos/objectstack-ai/objectstack/pulls (draft) and POST /repos/objectstack-ai/objectstack/issues/34828/assignees; read-back 'identical', 17870 bytes sent and stored, assignees os-support-ai, no label sent. (2) `post-stamped.mjs --comment=34761`: POST /repos/objectstack-ai/objectstack/issues/34761/comments (this report). Three `git push` to the branch (the empty-branch probe and two pushes of work), no force push.", "open_questions": [ { "question": "Ruling record 6943126855 describes candidates as 'near matches, with a note that several readings may exist'. Is that note a text member of the tool result, or the description that travels with the schema?", "options": [ "A — no result field (as built): the `candidates` description says they are 'possible readings of a term ... for a clarifying question', it reaches every MCP client through the tool's outputSchema, and how to ask stays in the tool description that #34763 writes. Cost: none beyond this PR.", "B — add an optional text member beside `candidates` that the executor fills per answer. Cost: a second contract key (spec minor, generators, ADR sentence) and a per-answer copy of guidance text in the spec's shape, which ADR-0149 M1 A keeps out of the spec; it would need a ruling before #34763 fills it." ], "recommendation": "A, because the fact a client needs (these are possible readings to ask about, none is selected) is already in the published description of the member, and M1 A places wording for the model in the tool description, not in a spec shape. B is a contract-shape addition and would be a `needs_decision`, not a dev call." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: the seat (repo:objectstack#3) · Skills-docs follow-up owed, for the seat to file and then rewrite the PR body line to `follow-up #N`: skills/objectstack-ask/SKILL.md, the zero-match row reads `candidates` once #34763 lands. The file is not on main yet; it arrives with PR #34792. Dedupe words: objectstack-ask, candidates, zero-match, list_datasets, Skills-docs.", "carrier: #34763 · noted, not filed: the per-term cap and the listing order are stated in the `candidates` description and enforced by no schema (the list is flat, so it carries no per-term maxItems); the executor holds both. The projected outputSchema lists the entry with `additionalProperties: false`, so the executor cannot add a key to a candidate without a spec change.", "carrier: epic seat (#34659) · noted, not filed: the #34720 qualifier for ADR-0149 D3 rule 1 is pending; the amendment block in this PR is self-contained so the sentence can be added once the card carries it.", "carrier: cloud · noted, not filed: the card's 不做的 list names the cloud planner. Whether its prompt needs its own sentence for `candidates` was not read here.", "carrier: PR 34719 and the seat · noted, not filed: the two PRs conflict on generated totals in content/docs/references/index.mdx and on the pinned count in type-alias-convention.pin.test.ts; a merge-order matter, no defect." ] }objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG
Claim amendment · 2026-11-17T12:21Z
Claim 6945989234, on PR #34828 @
666309be(o3-E's report to the seat):packages/spec/src/type-alias-convention.pin.test.ts(the pinned count, demanded bycheck:spec-parsed-alias), and the generatedcontent/docs/references/index.mdxanddocs/audits/2026-07-unknown-key-strictness-ledger.counts/ai.md.Metadata-protocol: added(four rows inauthorable-surface/ai.json, specminor), replacing the claim's provisionalnone; the level gate agrees.matchedOn(it would assert an equality a candidate lacks) and no near-word key (the selection rule for candidates is service-analytics: list_datasets fillscandidateswith near members (name, label, synonym) on a zero-match, only from what the caller may read #34763's).describeand in service-analytics: list_datasets fillscandidateswith near members (name, label, synonym) on a zero-match, only from what the caller may read #34763's tool description; no result text field. A second contract key would need its own ruling and is not opened here.skills/objectstack-ask/SKILL.md's zero-match row should readcandidatesonce service-analytics: list_datasets fillscandidateswith near members (name, label, synonym) on a zero-match, only from what the caller may read #34763 lands; sent to epic:Decision: open-source MCP — the client thinks locally, the server keeps a thin door (a metadata draft write entry for building; the data door for 问数), plus policy, version skew and the 问数 eval #34659#1 to file. The PR body names the follow-up once it has a number.Review: Tier H (
docs/adr/**,packages/spec/**): L1-c, then the seat's L2 at CONTRACT_REVIEW_TIER, then os-zhuang.