You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chat answer source block: render dataset provenance (metric and dataset) from query_dataset, not only ObjectQuerySource #33734
Found by the cloud os-dev agent on objectstack-ai/cloud PR #4557 (card cloud#4551, epic cloud#3825). Out-of-scope finding, class b, with a named producer.
What happens
DatasetProvenanceSchema says "An answer renders its source from this block (ADR-0149 D3)". But plugin-chatbotdetectAnswerSource reads only the ObjectQuerySourceSchemasource. So when the ask agent answers through query_dataset, the console's "How this was computed" block does not show the metric and dataset the answer used. The text sourceLine carries them, but the structured block does not.
Change
Teach detectAnswerSource / AnswerSource.tsx to render a DatasetProvenance block. Show:
Triage: first touch → domain:ui · p2 · 2026-11-15T08:46Z
⛔ Not a claim.
The chat answer source block renders dataset provenance (metric and dataset) from query_dataset, not only ObjectQuerySource. p2 (pre-graded). It pairs with #33733.
Claim: PM loop round 1 · 2026-11-15T09:10Z
Session: session_01FEkQ5kWtEXh64E1jg6WPCD (card thread, dev) · seat session_01FEkQ5oF8GgTHN2jBZoDwz8
Account: os-project-manager
Branch: claude/project-thread-7gd240
Worktree: objectstack-issue-33734
Domain: domain:ui
Seat: domain:ui#2
File surface: ui/packages/plugin-chatbot/src/AnswerSource.tsx, ui/packages/plugin-chatbot/src/mapMessages.ts, ui/packages/plugin-chatbot/src/index.tsx (exports only), ui/packages/app-shell/src/hooks/useChatConversation.ts (call sites, only if needed), the i18n packs the block uses, their tests, root .changeset/. ⛔ No spec edit. ⛔ Off ChatbotEnhanced.tsx / useAiModels.ts / AiChatPage.tsx (seat 2's PR #33746) unless reported first. ⛔ Not #33733's server surface.
Container & model: M, mode:thread, model: default tier, effort: default
Clause-②: no if confined to internals; yes (widening) on @object-ui/plugin-chatbot if detectAnswerSource's exported return type or AnswerSource's props widen, then a contract record is owed
Metadata-protocol: none
Responsibility: an answer computed through query_dataset shows no structured 'How this was computed' block (metric, dataset, filters) | detectAnswerSource reads only ObjectQuerySourceSchemasource, not DatasetProvenanceSchema (ADR-0149 D3) | a person asking the AI a metric question in the console
Thread-read: 6891892481
Premise: holds: read on main by the card author (cloud PR #4557 finding); triage#1 first touch 6891892481 graded p2; the dev measures first
Serial constraints cleared: no other pm:dispatcheddomain:ui card claims a file in this surface (live label read; ui seat 1's live cards #33657#33186#33187 are disjoint; ui seat 1 left this card to seat 2); no other ui seat holds a Claim: on these files
Clause-②: now yes (widening) on @object-ui/plugin-chatbot (ChatToolInvocation.answerSource, detectAnswerSource's return, AnswerSourceBlock's props); contract record owed.
Scope: the "non-metric reading" label on a fallback is NOT delivered here. DatasetProvenanceSchema marks no fallback; per ADR-0149 D3 rule 4 a fallback answer is an object-query answer whose 「非指标口径」 words are in the producer's source.line; the object-query rendering stays as it is. A follow-up card names the marker the label needs.
os-dev-report
{
"issue": 33734,
"status": "done",
"branch": "claude/project-thread-7gd240",
"pr": "#33870",
"session": "session_01FEkQ5kWtEXh64E1jg6WPCD",
"premise_still_valid": true,
"summary": "Measured on base bd96ec9: detectAnswerSource (mapMessages.ts) read only parseResultEnvelope(result)?.source through ObjectQuerySourceSchema, so query_dataset's top-level provenance was dropped and a dataset answer drew no 'How this was computed' block (red-first pins: 'Unable to find ... button ... How this was computed'). Now the lift reads provenance through DatasetProvenanceSchema first, AnswerSource.tsx draws a DatasetSourceSection (dataset; each metric's label with its name beside it and its description; grouping; runtimeFilter rows or as served, or 'No filter added to the dataset definition'), the object-query section is unchanged (filter markup moved byte for byte into a shared AnswerSourceFilter), and sanitizeChatMessagesForCache writes a dataset lift back under provenance. Three keys in all 11 locale packs, one docs sentence (amendment 2), changeset. The fallback 'non-metric reading' leg is NOT delivered: the schema marks no fallback; ruled out of this PR by the seat (follow-up, needs a producer/spec marker). Head ee612b4, rebased onto main after #33746 merged.",
"tests": "New ChatbotEnhanced.answerSource-dataset-33734.test.tsx (11 tests, rendered through uiMessageToChatMessage + ChatbotEnhanced, block opened by clicking its trigger; fixture accepted by QueryDatasetOutputSchema) + one reload pin in useChatConversation.test.tsx. Red-first on base bd96ec9 (production files restored, tests at head): 7 failed / 84 passed over the new file + 31868 file + useChatConversation.test.tsx; controls green. Head: 91/91. Ablations via scripts/ablation-replace.mjs (ui vitest aliases plugin-chatbot to src, no rebuild), each landed on disk and restored to the HEAD blob with git diff HEAD empty: lift ignores provenance 7 failed; no dataset section 5 failed; cache under source 1 failed (first attempt was refused, replacement contained the anchor, re-run on another anchor line); metric name dropped 1 failed; CONTROL all blocks routed to dataset section 8 failed; CONTROL empty-turn guard removed 6 failed. Final head ee612b4 under the lock: plugin-chatbot + i18n 203 files / 2878 passed / 13 skipped; app-shell hooks + console/ai 153 files / 1255 passed.",
"gates": "Local on ee612b4: dispatch-gates --commands derives 71 families; all 71 exit 0 (captured before any pipe); --ran: 71 derived, 71 run, 0 NOT-MEASURED. Outside the derivation: type-check plugin-chatbot / i18n / app-shell exit 0 (app-shell^... closure built); eslint on changed files exit 0 (0 errors, no warning on a changed line); ui check:new-line-citations exit 0. CI check-runs on #33870: in_progress at report time (not waited on, per os-dev.md).",
"line_budget": "20 files, +473 / -51 against base; 232 lines are the new pin file, 33 the locale keys, 16 the changeset; production about 170.",
"files_changed": [
".changeset/33734-answer-source-dataset-provenance.md",
"content/docs/frontend/plugins/plugin-chatbot.mdx",
"ui/packages/app-shell/src/hooks/tests/useChatConversation.test.tsx",
"ui/packages/app-shell/src/hooks/useChatConversation.ts",
"ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts",
"ui/packages/plugin-chatbot/src/AnswerSource.tsx",
"ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx (2 lines: type import + answerSource member type; seat-approved)",
"ui/packages/plugin-chatbot/src/tests/ChatbotEnhanced.answerSource-dataset-33734.test.tsx",
"ui/packages/plugin-chatbot/src/index.tsx",
"ui/packages/plugin-chatbot/src/mapMessages.ts"
],
"deviations": [
"ChatbotEnhanced.tsx touched (2 lines) and useChatConversation.ts cache write-back: reported first, approved by the seat, landing ordered after #33746 (rebased).",
"content/docs/frontend/plugins/plugin-chatbot.mdx: one sentence, seat amendment 2.",
"Fallback 'non-metric reading' leg not delivered: seat ruling (schema marks no fallback).",
"Metric description drawn under each metric (the order listed label, dataset, filters); ADR-0149 D3 names it as the sentence that explains the number.",
"test:repo not run locally (CI's)."
],
"clause_2": "yes (widening) on @object-ui/plugin-chatbot: detectAnswerSource return ObjectQuerySource -> AnswerSource; exported type AnswerSource ObjectQuerySource -> ObjectQuerySource | DatasetProvenance; ChatbotEnhancedToolInvocation.answerSource same union; AnswerSourceBlockProps.sources[].source (package-internal) same union. Contract record owed (seat asks review#1).",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "6 — reads only: mcp__github__issue_read x4 (#33734 get + get_comments x2, #33733 get), mcp__github__pull_request_read x2 (#33746 get_files, get)",
"api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches, run 43715189224, created #33870, read-back identical, no labels, no assignees); this os-dev-report comment via post-stamped.mjs. Plus 1 git push (not REST).",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: ui seat 2 (seat ruling) · fallback 'non-metric reading' label: DatasetProvenanceSchema has no fallback marker; per ADR-0149 D3 rule 4 the words live in the producer's ObjectQuerySource.line, which the block does not draw · noted, the seat files the follow-up"
]
}
Seat review: PR #33870 ACCEPT on head 5fb9c6fb (2026-11-15T13:25Z). Base synced (K was 15), CI is green, so ready + auto-merge are set in the same stroke. Contract records: review#1 PASS 6894567503 on ee612b49 and review#2 merge-delta PASS 6894983267 on 5fb9c6fb (TIER_DEFAULT).
MERGED as a78781a1 on main (closes this card via Fixes #33734)
State: pm:dispatched removed, assignee cleared; card closed by the merge. The seat ACCEPT is 6894993780. Contract records (TIER_DEFAULT): review#1 PASS 6894567503 on ee612b49, and review#2 merge-delta PASS 6894983267 on 5fb9c6fb.
A query_dataset answer now draws its dataset, metrics, grouping and added filter in "How this was computed". The fallback "non-metric reading" leg stays with #33752, which this merge unblocks.
Activity
objectstack-fleet commentedon Nov 15, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: first touch →
domain:ui· p2 · 2026-11-15T08:46Z⛔ Not a claim.
The chat answer source block renders dataset provenance (metric and dataset) from
query_dataset, not onlyObjectQuerySource. p2 (pre-graded). It pairs with #33733.objectstack-fleet commentedon Nov 15, 2026
domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8
Claim: PM loop round 1 · 2026-11-15T09:10Z
Session:
session_01FEkQ5kWtEXh64E1jg6WPCD(card thread, dev) · seatsession_01FEkQ5oF8GgTHN2jBZoDwz8Account:
os-project-managerBranch:
claude/project-thread-7gd240Worktree:
objectstack-issue-33734Domain:
domain:uiSeat:
domain:ui#2File surface:
ui/packages/plugin-chatbot/src/AnswerSource.tsx,ui/packages/plugin-chatbot/src/mapMessages.ts,ui/packages/plugin-chatbot/src/index.tsx(exports only),ui/packages/app-shell/src/hooks/useChatConversation.ts(call sites, only if needed), the i18n packs the block uses, their tests, root.changeset/. ⛔ No spec edit. ⛔ OffChatbotEnhanced.tsx/useAiModels.ts/AiChatPage.tsx(seat 2's PR #33746) unless reported first. ⛔ Not #33733's server surface.Container & model: M,
mode:thread,model: default tier,effort: defaultClause-②: no if confined to internals; yes (widening) on
@object-ui/plugin-chatbotifdetectAnswerSource's exported return type orAnswerSource's props widen, then a contract record is owedMetadata-protocol: none
Responsibility: an answer computed through
query_datasetshows no structured 'How this was computed' block (metric, dataset, filters) |detectAnswerSourcereads onlyObjectQuerySourceSchemasource, notDatasetProvenanceSchema(ADR-0149 D3) | a person asking the AI a metric question in the consoleThread-read: 6891892481
Premise: holds: read on main by the card author (cloud PR #4557 finding); triage#1 first touch 6891892481 graded p2; the dev measures first
Serial constraints cleared: no other
pm:dispatcheddomain:uicard claims a file in this surface (live label read; ui seat 1's live cards #33657 #33186 #33187 are disjoint; ui seat 1 left this card to seat 2); no other ui seat holds aClaim:on these filesScope: p2. Order:
/mnt/project-files/pm-orders/ui/order-33734.md. Summons: the maintainer's 「同意 给队列最深的 ui 和 spec 各再开一个座位」 (this project, 2026-11-14T22:46Z) and 「任务进展如何,后续只处理 p1 p2」 (2026-11-15T05:05Z).objectstack-fleet commentedon Nov 15, 2026
domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8
Claim amendment 1 · 2026-11-15T09:11Z · to claim 6892143272, on the dev's measurement:
File surface:addsui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx(one type line: the tool invocation'sanswerSourcemember widens to the union;mapMessages.tsassignsdetectAnswerSource's result undersatisfies ChatToolInvocation) andui/packages/app-shell/src/hooks/useChatConversation.ts(the cache write-back keeps a dataset lift underprovenance, the producer's key, so it survives a reload). ⛔ Serial:ChatbotEnhanced.tsxis in seat 2's PR feat(spec, plugin-chatbot, console): the AI model picker shows each model's cost multiplier and asks before a ×20 pick #33746; this card pushes only after feat(spec, plugin-chatbot, console): the AI model picker shows each model's cost multiplier and asks before a ×20 pick #33746 merges.Clause-②:nowyes (widening)on@object-ui/plugin-chatbot(ChatToolInvocation.answerSource,detectAnswerSource's return,AnswerSourceBlock's props); contract record owed.DatasetProvenanceSchemamarks no fallback; per ADR-0149 D3 rule 4 a fallback answer is an object-query answer whose 「非指标口径」 words are in the producer'ssource.line; the object-query rendering stays as it is. A follow-up card names the marker the label needs.objectstack-fleet commentedon Nov 15, 2026
domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8
Claim amendment 2 · 2026-11-15T09:23Z · to claim 6892143272:
File surface:addscontent/docs/frontend/plugins/plugin-chatbot.mdx: one sentence in the paragraph that describes the "How this was computed" block, covering the dataset case (dataset, metrics, grouping, added filter). Seat 2's PR feat(spec, plugin-chatbot, console): the AI model picker shows each model's cost multiplier and asks before a ×20 pick #33746 also edits this page. The serial hold already covers it: this card pushes after feat(spec, plugin-chatbot, console): the AI model picker shows each model's cost multiplier and asks before a ×20 pick #33746 merges, then rebases.objectstack-fleet commentedon Nov 15, 2026
domain:ui#2 · os-project-manager · session_01FEkQ5kWtEXh64E1jg6WPCD
os-dev-report
{
"issue": 33734,
"status": "done",
"branch": "claude/project-thread-7gd240",
"pr": "#33870",
"session": "session_01FEkQ5kWtEXh64E1jg6WPCD",
"premise_still_valid": true,
"summary": "Measured on base bd96ec9: detectAnswerSource (mapMessages.ts) read only parseResultEnvelope(result)?.source through ObjectQuerySourceSchema, so query_dataset's top-level provenance was dropped and a dataset answer drew no 'How this was computed' block (red-first pins: 'Unable to find ... button ... How this was computed'). Now the lift reads provenance through DatasetProvenanceSchema first, AnswerSource.tsx draws a DatasetSourceSection (dataset; each metric's label with its name beside it and its description; grouping; runtimeFilter rows or as served, or 'No filter added to the dataset definition'), the object-query section is unchanged (filter markup moved byte for byte into a shared AnswerSourceFilter), and sanitizeChatMessagesForCache writes a dataset lift back under provenance. Three keys in all 11 locale packs, one docs sentence (amendment 2), changeset. The fallback 'non-metric reading' leg is NOT delivered: the schema marks no fallback; ruled out of this PR by the seat (follow-up, needs a producer/spec marker). Head ee612b4, rebased onto main after #33746 merged.",
"tests": "New ChatbotEnhanced.answerSource-dataset-33734.test.tsx (11 tests, rendered through uiMessageToChatMessage + ChatbotEnhanced, block opened by clicking its trigger; fixture accepted by QueryDatasetOutputSchema) + one reload pin in useChatConversation.test.tsx. Red-first on base bd96ec9 (production files restored, tests at head): 7 failed / 84 passed over the new file + 31868 file + useChatConversation.test.tsx; controls green. Head: 91/91. Ablations via scripts/ablation-replace.mjs (ui vitest aliases plugin-chatbot to src, no rebuild), each landed on disk and restored to the HEAD blob with git diff HEAD empty: lift ignores provenance 7 failed; no dataset section 5 failed; cache under source 1 failed (first attempt was refused, replacement contained the anchor, re-run on another anchor line); metric name dropped 1 failed; CONTROL all blocks routed to dataset section 8 failed; CONTROL empty-turn guard removed 6 failed. Final head ee612b4 under the lock: plugin-chatbot + i18n 203 files / 2878 passed / 13 skipped; app-shell hooks + console/ai 153 files / 1255 passed.",
"gates": "Local on ee612b4: dispatch-gates --commands derives 71 families; all 71 exit 0 (captured before any pipe); --ran: 71 derived, 71 run, 0 NOT-MEASURED. Outside the derivation: type-check plugin-chatbot / i18n / app-shell exit 0 (app-shell^... closure built); eslint on changed files exit 0 (0 errors, no warning on a changed line); ui check:new-line-citations exit 0. CI check-runs on #33870: in_progress at report time (not waited on, per os-dev.md).",
"line_budget": "20 files, +473 / -51 against base; 232 lines are the new pin file, 33 the locale keys, 16 the changeset; production about 170.",
"files_changed": [
".changeset/33734-answer-source-dataset-provenance.md",
"content/docs/frontend/plugins/plugin-chatbot.mdx",
"ui/packages/app-shell/src/hooks/tests/useChatConversation.test.tsx",
"ui/packages/app-shell/src/hooks/useChatConversation.ts",
"ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts",
"ui/packages/plugin-chatbot/src/AnswerSource.tsx",
"ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx (2 lines: type import + answerSource member type; seat-approved)",
"ui/packages/plugin-chatbot/src/tests/ChatbotEnhanced.answerSource-dataset-33734.test.tsx",
"ui/packages/plugin-chatbot/src/index.tsx",
"ui/packages/plugin-chatbot/src/mapMessages.ts"
],
"deviations": [
"ChatbotEnhanced.tsx touched (2 lines) and useChatConversation.ts cache write-back: reported first, approved by the seat, landing ordered after #33746 (rebased).",
"content/docs/frontend/plugins/plugin-chatbot.mdx: one sentence, seat amendment 2.",
"Fallback 'non-metric reading' leg not delivered: seat ruling (schema marks no fallback).",
"Metric description drawn under each metric (the order listed label, dataset, filters); ADR-0149 D3 names it as the sentence that explains the number.",
"test:repo not run locally (CI's)."
],
"clause_2": "yes (widening) on @object-ui/plugin-chatbot: detectAnswerSource return ObjectQuerySource -> AnswerSource; exported type AnswerSource ObjectQuerySource -> ObjectQuerySource | DatasetProvenance; ChatbotEnhancedToolInvocation.answerSource same union; AnswerSourceBlockProps.sources[].source (package-internal) same union. Contract record owed (seat asks review#1).",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "6 — reads only: mcp__github__issue_read x4 (#33734 get + get_comments x2, #33733 get), mcp__github__pull_request_read x2 (#33746 get_files, get)",
"api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches, run 43715189224, created #33870, read-back identical, no labels, no assignees); this os-dev-report comment via post-stamped.mjs. Plus 1 git push (not REST).",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: ui seat 2 (seat ruling) · fallback 'non-metric reading' label: DatasetProvenanceSchema has no fallback marker; per ADR-0149 D3 rule 4 the words live in the producer's ObjectQuerySource.line, which the block does not draw · noted, the seat files the follow-up"
]
}
Generated by Claude Code
objectstack-fleet commentedon Nov 15, 2026
domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8
Seat review: PR #33870 ACCEPT on head
5fb9c6fb(2026-11-15T13:25Z). Base synced (K was 15), CI is green, so ready + auto-merge are set in the same stroke. Contract records: review#1 PASS 6894567503 onee612b49and review#2 merge-delta PASS 6894983267 on5fb9c6fb(TIER_DEFAULT).objectstack-fleet commentedon Nov 15, 2026
domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8
Landed · 2026-11-15T13:55Z
a78781a1onmain(closes this card viaFixes #33734)State:
pm:dispatchedremoved, assignee cleared; card closed by the merge. The seat ACCEPT is 6894993780. Contract records (TIER_DEFAULT): review#1 PASS 6894567503 onee612b49, and review#2 merge-delta PASS 6894983267 on5fb9c6fb.A
query_datasetanswer now draws its dataset, metrics, grouping and added filter in "How this was computed". The fallback "non-metric reading" leg stays with #33752, which this merge unblocks.feat(spec, i18n): list the ask agent's dataset pair (list_datasets, q…
feat(plugin-chatbot): an AI chat answer computed from a dataset shows…