Skip to content

fix(cli): correct the renderer claim lists; verify them by measurement - #83

Merged
copyleftdev merged 1 commit into
mainfrom
feat/render-migrate-batch4
Jul 30, 2026
Merged

fix(cli): correct the renderer claim lists; verify them by measurement#83
copyleftdev merged 1 commit into
mainfrom
feat/render-migrate-batch4

Conversation

@copyleftdev

Copy link
Copy Markdown
Owner

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 match arms. That was the wrong method.

cascade hand-rolls all three formatscascade_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:

$ vajra cascade events.json --entity-field '$.file' ... --format markdown
vajra: `cascade` has no markdown renderer; output is the text format.   # ← false

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. I replaced a silent lie with a loud one for two commands.

Corrected

markdown:   anomalies cascade essence fingerprint invariants separation stats
compact-ai: cascade essence score

Verified: cascade --format markdown and score --format compact-ai are now silent; score --format markdown still warns, because it genuinely has none (its Format::Text | Format::Markdown arm 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_output runs 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 — cascade with its four field flags, score with 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 --check clean. 0 clippy diagnostics.

Remaining for #75

inspect, cluster, drift, batch, governance, core-team, compare, plus score's markdown. Each mechanical: build a Report, add to the list, add the pair to the measurement test.

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.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@copyleftdev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a02ea25-643d-471d-89f0-96ccb486b5b9

📥 Commits

Reviewing files that changed from the base of the PR and between 25e7186 and 70f866f.

📒 Files selected for processing (3)
  • docs/src/commands.md
  • vajra-cli/src/main.rs
  • vajra-cli/tests/format_honesty.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@copyleftdev
copyleftdev merged commit 7a0a837 into main Jul 30, 2026
5 checks passed
@copyleftdev
copyleftdev deleted the feat/render-migrate-batch4 branch July 30, 2026 06:33
copyleftdev added a commit that referenced this pull request Jul 30, 2026
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant