Conversation
Contributor
Replace the single deep research loop with deterministic phases: a structured planner produces N falsifiable hypotheses, investigators run in parallel with isolated context and budget slices, and an independent judge compares the evidence and synthesizes the final report through the existing report path. Effort now scales both breadth (maxHypotheses 2/3/4/6) and per-hypothesis depth, with the run-level budgets enforced as hard aggregate ceilings across every phase. Closes PROD-9230 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🧪 Test Selection✅ Tests that will run
⏭️ Tests skipped (no relevant file changes detected)
|
🛡️ Upgrade safety for self-hosted customers
What we looked at
Technical details (raw JSON){
"schemaVersion": "1",
"version": "pr-26545",
"previousVersion": "3e0402aefb",
"releaseDate": "2026-07-30T12:57:36.577Z",
"capabilities": [
"migrations",
"ai-review",
"rest",
"mcp",
"upgrade"
],
"migrations": {
"present": false,
"count": 0,
"files": [],
"ee": false
},
"compatibility": {
"rollingUpdateSafe": true,
"recommendedStrategy": "RollingUpdate",
"notes": "AI rolling-update review: The only inputs are two REST response changes that add new toolName enum values (submitInvestigationReport, submitResearchHypotheses) to a thread-fetch endpoint. Widening a response enum is backward compatible for the in-flight frontend, which handles unknown tool names via default switch cases and an MCP fallback rather than throwing. No migrations or MCP changes were provided, so the release is rolling-update safe. This marker only reflects the checks listed in `capabilities`. It does NOT detect code-only or config-only breaking changes (env defaults, removed Helm values, serialization/protocol changes), which can also break old pods during a rolling update."
},
"api": {
"rest": {
"checked": true,
"breaking": true,
"changes": [
"GET /api/v1/projects/{projectUuid}/aiAgents/{agentUuid}/threads/{threadUuid} — added the new `submitInvestigationReport` enum value to the `results/allOf[subschema #2]/messages/items/anyOf[#/components/schemas/AiAgentMessageAssistant]/toolResults/items/allOf[subschema #2]/anyOf[subschema #1]/toolName` response property for the response status `200`",
"GET /api/v1/projects/{projectUuid}/aiAgents/{agentUuid}/threads/{threadUuid} — added the new `submitResearchHypotheses` enum value to the `results/allOf[subschema #2]/messages/items/anyOf[#/components/schemas/AiAgentMessageAssistant]/toolResults/items/allOf[subschema #2]/anyOf[subschema #1]/toolName` response property for the response status `200`"
]
},
"mcp": {
"checked": true,
"breaking": false,
"changes": []
}
},
"upgrade": {
"minPreviousVersion": null,
"requiredStop": false,
"note": null,
"sourceVersion": null,
"kind": null,
"requiredStops": []
}
}Automated upgrade-safety check. Once merged, it ships a small |
joaoviana
added a commit
that referenced
this pull request
Jul 30, 2026
main's #26545 added submitInvestigationReport and submitResearchHypotheses to the common tool definitions without registering them in the frontend's exhaustive icon map and description switch, breaking frontend typecheck on the merge ref. Register both like the sibling submitResearchReport. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NQwb9DsKLgM6L6wZi5rLjd
lightdash-bot
pushed a commit
that referenced
this pull request
Jul 30, 2026
# [1.42.0](1.41.0...1.42.0) (2026-07-30) ### Features * add a big number data model for sql charts ([#26524](#26524)) ([3d0d62b](3d0d62b)), closes [#11194](#11194) * add big number charts to the sql runner ([#26525](#26525)) ([af91c7c](af91c7c)), closes [#11194](#11194) * add conditional formatting to sql big numbers ([#26528](#26528)) ([9122b33](9122b33)), closes [#11194](#11194) * add display and comparison options to sql big numbers ([#26526](#26526)) ([daf8fa8](daf8fa8)), closes [#11194](#11194) * **ai:** deep research tests competing hypotheses in parallel ([#26545](#26545)) ([e821f8a](e821f8a)) * complete big number parity for sql charts ([#26527](#26527)) ([94cd876](94cd876)), closes [#11194](#11194) * manage feature flags in preview environments ([#26542](#26542)) ([5e3fa26](5e3fa26)), closes [/linear.app/lightdash/issue/SPK-741/add-programmatic-feature-flag-management-for-okteto-previews#agent-session-ef19aa39](https://github.com//linear.app/lightdash/issue/SPK-741/add-programmatic-feature-flag-management-for-okteto-previews/issues/agent-session-ef19aa39) * persist homepage recommended-action skips per project ([#26539](#26539)) ([dd6ed4b](dd6ed4b)) * support un-grouped aggregate pivot queries ([#26523](#26523)) ([0bb17ed](0bb17ed)), closes [#11194](#11194)
Collaborator
|
🎉 This PR is included in version 1.42.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes PROD-9230
Summary
Deep Research previously ran one agent loop that could converge on a plausible correlation and present it as a causal explanation. This PR replaces that loop with deterministic phases: a structured planner produces N distinct falsifiable hypotheses, investigators examine each one in parallel with isolated context, and an independent judge compares the evidence and synthesizes the final report through the existing report path.
How it works
Backend
AiDeepResearchExecutor— orchestrates plan → parallel investigation → judge. Fan-out is application-driven (Promise.allSettled), never model-driven. Run-level budgets stay hard aggregate ceilings across every phase via shared counters; oneAbortSignalreaches every child, so cancellation or budget exhaustion aborts all active investigators and prevents the judge from starting.AiAgentExecutionConfiggains aresearchrole (planner/investigator/judge) andparentToolCallId.agentV2shapes the toolset per role: planner and judge are single-purpose structured calls (only their submission tool, small step caps); investigators keep the agent's full toolset + the run's MCP selection withsubmitResearchReportswapped forsubmitInvestigationReport.execution.research === undefinedpreserves the previous single-loop behavior exactly.onHypotheses/onReport), so schema enforcement is structural and the executor never parses child transcripts. Schemas cap string/array sizes so a runaway investigator cannot overflow the judge's context.parent_tool_call_idsentinels (deep-research:<runUuid>:planner/:<hypothesisId>): rebuilt model history filters them (investigators never see sibling hypotheses; later turns replay only the judge's report), whilegetToolCallsAndResultsForPromptgainsincludeSubagentToolCallsso chart-evidence provenance still sees child rows.AiDeepResearchService—AiDeepResearchBudget.maxHypothesesper effort (low 2 / medium 3 / high 4 / xhigh 6); validation requires ≥2 and toolCalls > hypotheses; legacy budget snapshots normalize with a default of 3 and keep stripping legacy limits.unavailablemarker instead of discarding successes; a report submitted before a crash is salvaged; fewer than two completed investigations fails the run with an actionable reason; each investigator and the judge get one forced-submission retry.Regression analysis
execution.mode: 'deep_research'with aresearchrole set.planning/investigating/synthesizing), cancellation, heartbeat, and stale-run sweep.maxHypotheses→ defaults to 3; legacy limits still stripped from API responses.No migration:
budget_snapshotis jsonb; the entity type marksmaxHypothesesoptional for legacy rows.Test plan
pnpm -F common typecheck && pnpm -F backend typecheck && pnpm -F frontend typecheck— cleanpnpm -F common lint && pnpm -F backend lint— clean;pnpm -F common test— passee/services/AiDeepResearchService,ee/services/ai,ee/services/AiAgentService,ee/models— 831 tests / 75 files passpnpm generate-api— TSOA resolves the extended budget type (artifacts not committed)low): planner produced exactly 2 competing hypotheses; investigators ran interleaved under distinctdeep-research:<run>:hypothesis-1/2parent rows; judge submitted top-level; progress eventsplanning → investigating → synthesizing; final report refused causation on a deliberately spurious correlation ("we cannot establish causation… inconclusive"), compared both hypotheses with per-section confidence tags, carried a failed investigation as an explicit caveat, and listed the missing evidence needed to establish causationFollow-ups (separate PRs)
ai-agent-integration-tests.ymlhas none today).🤖 Generated with Claude Code