fix(cli): correct the renderer claim lists; verify them by measurement - #83
Conversation
The lists added in #79 were wrong in both directions, because I built them by reading match arms instead of measuring output. `cascade` hand-rolls all three formats — cascade_text, cascade_md, cascade_json — and has done since before the shared renderer existed. It was therefore being told it has no markdown renderer while emitting genuine markdown. `score` likewise hand-rolls compact-ai. Both were warning about renderers they already had, which is the same category of wrongness the notice was introduced to remove. Corrected: markdown: anomalies cascade essence fingerprint invariants separation stats compact-ai: cascade essence score Reading the code was the wrong method, so the fix is a test that measures. `claimed_renderers_produce_distinct_output` runs every claimed command/format pair and asserts the output differs from that command's text output and that no warning is emitted. Nine pairs, including the two that needed non-trivial fixtures: cascade with its four field flags, score with commit-shaped records. That guard would have caught the original error, and it now makes the claim unfalsifiable by inspection: a command cannot be added to either list without demonstrably rendering that format. Refs #75. Markdown coverage is 7 of 12, compact-ai 3 of 12 — both higher than previously reported, because two commands were already there.
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 |
… sides Migrates two more commands and closes the hole that let the claim lists be wrong twice. `inspect` becomes four sections — metadata, a wildcard-path table, fingerprints, and the domain/structural findings from #61 — with the "not a verdict" caveat preserved as a note. `cluster` becomes a summary plus a nested cluster listing, and gains a note pointing at --similarity-threshold when everything lands in one cluster, which is the common first experience on source input. Then the part that matters. #83 added a test asserting every *claimed* command/format pair really renders. That caught over-claiming but not under-claiming, and the lists were under-claiming: measuring every command rather than the claimed ones shows `governance` has a real Markdown renderer (render_governance_markdown, from vajra-stats) and `compare` has both. Like `cascade` and `score` before them, they were being told they had no renderer while emitting one. So the guard is now two-sided: claimed pair => output must differ from that command's text output unclaimed pair => output must be identical, and the notice must fire Under-claiming is now as detectable as over-claiming, which is what should have been true from the start. Three commands needed bespoke fixtures to get there: `core-team` wants author_name/author_email/date rather than the subject-based shape, `compare` takes two inputs so it cannot use the single-input helper, and `batch` wants a directory. Measured coverage: markdown 11 commands, compact-ai 4. Four tripwire tests had to be repointed because the commands they watched got migrated. That is the mechanism working, not friction — each names its successor in a comment. Refs #75. Genuinely unrendered for markdown now: batch, core-team, drift, score.
Refs #75. This is a bug fix, not a migration — and it's my bug.
The lists I added in #79 were wrong in both directions
I built them by reading
matcharms. That was the wrong method.cascadehand-rolls all three formats —cascade_text,cascade_md,cascade_json— and has since before the shared renderer existed. It was being told it has no markdown renderer while emitting genuine markdown:scorelikewise hand-rolls compact-ai. Both were warning about renderers they already had — which is the same category of wrongness the notice was introduced to remove. I replaced a silent lie with a loud one for two commands.Corrected
Verified:
cascade --format markdownandscore --format compact-aiare now silent;score --format markdownstill warns, because it genuinely has none (itsFormat::Text | Format::Markdownarm renders both identically).The fix is a test that measures, not a corrected list
Since reading the code was the wrong method,
claimed_renderers_produce_distinct_outputruns every claimed command/format pair and asserts two things: the output differs from that command's own text output, and no warning is emitted.Nine pairs, including the two needing non-trivial fixtures —
cascadewith its four field flags,scorewith commit-shaped records.That guard would have caught the original error, and it makes the claim unfalsifiable by inspection: a command can't be added to either list without demonstrably rendering that format. Combined with the existing loop (which catches the opposite error — claiming a command that only falls through to text), the lists are now pinned from both sides.
Coverage is higher than I reported
Markdown 7 of 12, compact-ai 3 of 12 — not because of new work here, but because two commands were already there and I'd miscounted. Worth correcting since I've been quoting those numbers.
Full workspace suite: 79 test binaries, 0 failures.
cargo fmt --checkclean. 0 clippy diagnostics.Remaining for #75
inspect,cluster,drift,batch,governance,core-team,compare, plusscore's markdown. Each mechanical: build aReport, add to the list, add the pair to the measurement test.