OLS-3724 Zero out top-level diagnosis when actionRequired is true - #385
OLS-3724 Zero out top-level diagnosis when actionRequired is true#385thoraxe wants to merge 1 commit into
Conversation
The analysis agent can populate the top-level diagnosis even when actionRequired is true. The schema describes the constraint in text but does not enforce it structurally. This adds a server-side guard in createAnalysisResult so the top-level diagnosis is only written to the AnalysisResult CR when actionRequired is false. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughSummary by CodeRabbit
Walkthrough
ChangesDiagnosis gating
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
|
@thoraxe: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
actionRequired=true, the top-leveldiagnosisfield is now zeroed out in theAnalysisResultCR, even if the LLM populated itcreateAnalysisResultTest plan
TestCreateAnalysisResult_ZerosTopLevelDiagnosisWhenActionRequired— fully-populated diagnosis withactionRequired=trueis zeroedTestCreateAnalysisResult_PreservesTopLevelDiagnosisWhenNoAction— diagnosis withactionRequired=falseis preservedTestCreateAnalysisResult_EmptyTopLevelDiagnosisstill passesmake testpasses🤖 Generated with Claude Code