Remove zero-violation JSON noise and restore concise LLM guidance#70
Remove zero-violation JSON noise and restore concise LLM guidance#70oshorefueled merged 5 commits intomainfrom
Conversation
- Stop emitting synthetic JSON/vale-json issues when filtered violations leave no surfaced findings, so clean runs no longer include noise cards. - Add explicit analysis/suggestion descriptions to judge/check structured output schemas to keep model responses concise and actionable. - Add regression tests for zero-violation JSON paths and schema description constraints to prevent future drift.
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe PR removes conditional logic in the orchestrator that automatically reports summary messages in JSON outputs when no violations are surfaced, and adds descriptive metadata to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 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 |
- Remove an unused check-result variable left after JSON-noise cleanup. - Parse mocked console output inline in tests to avoid unsafe-any assignments while preserving assertions.
- Replace inline parsed-output shapes with Result and ValeOutput types to simplify test code and keep contract checks explicit. - Preserve existing no-dummy-issue assertions and runtime behavior.
- Keep main's surfaced-violation scoring flow in orchestrator so check severity and score derive from filtered violations plus word count. - Keep branch behavior that removes synthetic JSON/Vale JSON issues when no violations are surfaced, preventing noisy empty findings. - Update filtering tests to RawCheckResult contracts while retaining zero-violation JSON regression assertions and typed output parsing.
Summary
This PR removes synthetic JSON findings that were emitted when no
violations were actually surfaced after PAT filtering. It also adds
explicit schema guidance for
analysisandsuggestionfields sostructured LLM output stays concise. Regression tests were added for
both behavior paths.
Why
JSON consumers were receiving placeholder findings on clean results,
and generated violation text had become too verbose for UI usage. This
change restores predictable machine-readable output and concise feedback.
Scope
violation count is zero.
analysisandsuggestionin check and judge schemas.
decision logic.
package-lock.json,plan-fix-noisy-verbose-json.md).Behavior Impact
--output=jsonand--output=vale-jsonno longer include dummyentries like "No issues found" when no violations are surfaced.
messagefield as before.Risk and Mitigations
fewer issue objects.
analysis/suggestiondescriptions for both check and judge schemas.
79ad8dfto restore previous emission behavior andschema field descriptions.
API / Contract / Schema Changes
issue object.
analysisdescription: "A concise 1-2 sentence explanation of thespecific issue."
suggestiondescription: "Suggest a fix in 15 words or less."How to test / verify
Checks run
npm run test:run -- tests/orchestrator-filtering.test.ts tests/prompt-schema.test.ts2files,7tests).npm run test:run32files,223tests).Manual verification
--output=jsonand--output=vale-json."No issues found".
still include a
messagefield.Follow-ups
output for a no-violation run.
Known Tradeoffs
token limits, so wording tightness remains model-dependent.
Summary by CodeRabbit
Bug Fixes
Tests