feat: track failed rules in AnalysisResult#64
Conversation
…wing Rule execution errors were caught and logged to console.error but never surfaced to consumers. This meant users could get incomplete analysis without knowing it — a silent failure that undermines trust in results. Add `failedRules: RuleFailure[]` to AnalysisResult, collected during traversal. Included in JSON output (buildResultJson) when non-empty. Exported RuleFailure type via browser entry point. Closes #49 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changes implement rule execution failure tracking within the analysis engine. A new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TypeScript strict mode types serve as documentation; 80% default was triggering false warnings on well-typed code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
RuleFailuretype andfailedRules: RuleFailure[]toAnalysisResult— rule execution errors are now collected instead of silently swallowed viaconsole.errorfailedRulesinbuildResultJsonoutput when non-empty, so CLI--jsonand MCP consumers can detect incomplete analysisRuleFailuretype from browser entry point for web app / plugin consumersChanges
rule-engine.tsRuleFailureinterface, collect failures intraverseAndCheck, return inAnalysisResultscoring.tsbuildResultJsonincludesfailedRuleswhen array is non-emptybrowser.tsRuleFailuretyperule-engine.test.tsfailedRulestracking; added empty case testscoring.test.tsfailedRules: []analysis-agent.test.tsfailedRules: []Test plan
pnpm lint— type check passespnpm test:run— all 427 tests pass (28 files)pnpm build— production build succeedsfailedRulescontains failure details (ruleId, nodeName, nodeId, error message)failedRules: []Closes #49
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
RuleFailuretype exported for API consumers, providing structured access to failed rule details.Bug Fixes
failedRulesdata when rule errors occur, improving error visibility and result completeness.