chore: plan validations update github check status#1109
chore: plan validations update github check status#1109adityachoudhari26 merged 1 commit intomainfrom
Conversation
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughThis PR adds a new database query and getter methods to retrieve plan validation results by target ID, then integrates violation loading and rendering into the GitHub check output. Violations are aggregated, parsed from JSON payloads, and displayed per agent alongside diff information. ChangesPlan Validation Result Querying and Rendering
Sequence DiagramsequenceDiagram
participant GHCheck as GitHub<br/>Check Renderer
participant LoadCtx as Load Target<br/>Context
participant DB as Database
participant Agg as Aggregate &<br/>Format
GHCheck->>LoadCtx: loadTargetContext(targetID)
LoadCtx->>DB: ListPlanValidationResultsByTargetID(targetID)
DB-->>LoadCtx: []ValidationResult{ResultID, RuleID, Violations}
LoadCtx->>LoadCtx: parseViolationMessages(violations)
LoadCtx->>LoadCtx: violationsByResult map[UUID][]ruleViolation
LoadCtx-->>GHCheck: agentResults with Violations attached
GHCheck->>Agg: aggregateResults(agentResults)
Agg->>Agg: count ValidationFailures from len(violations)
Agg-->>GHCheck: aggregate{ValidationFailures, ...}
GHCheck->>Agg: checkConclusion(aggregate)
alt has ValidationFailures
Agg-->>GHCheck: "failure"
else clean
Agg-->>GHCheck: "success"
end
GHCheck->>Agg: checkTitle(aggregate)
Agg->>Agg: compute suffix (+X -Y (N policy violations))
Agg-->>GHCheck: title with violation count
GHCheck->>GHCheck: formatAgentSection(agentResult)
GHCheck->>GHCheck: writeViolations(violations)
GHCheck-->>GHCheck: rendered output with violations
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly Related Issues
Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
fixes #1091
Summary by CodeRabbit
New Features
Improvements