Repository navigation
[KDM-TEST-FIX-417] Fix multi-agent council timeouts and fallback - #417
Conversation
|
Caution Review failedThe pull request is closed. Warning
|
| Layer / File(s) | Summary |
|---|---|
Timeout configuration and resolution src/analysis/types.ts, src/commands/analyze.ts, src/analysis/analysis.ts, src/agent/python-bridge.ts |
The analyze command validates --council-timeout as a positive safe integer and passes it through analysis options. The bridge resolves the per-call value, KDM_COUNCIL_TIMEOUT_MS, or the 120,000 ms default. |
Council execution and fallback details src/analysis/analysis.ts, src/analysis/__tests__/analysis-baseline.test.ts, src/__tests__/cli-flags.test.ts, src/__tests__/e2e-system.test.ts, src/ui/AnalyzeDashboard.tsx |
Council execution checks dependencies and passes the configured timeout to the bridge. It selects a result with errors when available and applies rule-engine, legacy-AI, then raw-summary fallbacks after failure. The dashboard reports OK only when there are no problem items and the status is not ProblemDetected. Related tests mock council dependencies and verify council diagnosis details. |
Interactive prompt and UI options
| Layer / File(s) | Summary |
|---|---|
Interactive options and test rendering src/remediation/safety-prompt.ts, src/__tests__/safety-prompt.test.ts, src/__tests__/analyze-dashboard-events.test.tsx |
PromptSafetyOptions adds an optional interactive value, which resolveIOOptions returns. Ink tests set interactive mode explicitly, except the null-tool case, which sets it to false. |
Estimated code review effort: 4 (Complex) | ~40 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant executeCouncilForResults
participant checkCouncilDependencies
participant runAgentCouncilProcess
participant RuleEngine
participant LegacyAI
participant RawSummary
executeCouncilForResults->>checkCouncilDependencies: check council availability
executeCouncilForResults->>runAgentCouncilProcess: run council with configured timeout
alt Council returns successfully
runAgentCouncilProcess-->>executeCouncilForResults: return consensus
else Dependency check or council execution fails
executeCouncilForResults->>RuleEngine: apply fallback to results with errors
executeCouncilForResults->>LegacyAI: use when the rule engine does not apply
executeCouncilForResults->>RawSummary: use when legacy AI returns no response
end
Merge Risk: 
Moderate · up to 33053
-
Pressing Ctrl+C during a multi-agent council run can still start fallback work, including external AI requests, and delay exit. A stalled Python import check can also block analysis indefinitely before the council timeout applies. Both should be fixed before merging; the failures are bounded and have simple fixes.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
Code Health Improved
(1 files improve in Code Health)
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| analysis.ts | 8.31 → 8.82 | Overall Code Complexity |
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Fixes #383.\n\n- Increase the default council watchdog to 120 seconds and support KDM_COUNCIL_TIMEOUT_MS plus --council-timeout.\n- Probe Python and Ollama before launching the council.\n- Preserve useful per-workload diagnostics through rule, cloud, or raw-summary fallback when council execution is unavailable.\n- Ensure dashboard status reflects detected errors.\n- Remove duplicate analysis option declarations introduced during the v4.0.0 merge.