docs: refresh the demo recording, and fix a tape that recorded a false pass - #530
Conversation
…e pass The GIF predates rule IDs, so it showed neither the CC001/CC201 identifiers nor the docs links that every failure now prints. Three things were wrong with the tape itself, all found by watching the re-recording rather than by reading it: The hidden setup never configured a git identity, so the initial commit failed, the repository was left with no commits at all, and every branch check then passed silently. The old recording showed `commit-check -b` on `user-login` producing no output whatsoever — a failing branch recorded as clean. It recorded in whatever directory it was invoked from, so running it left `user-login` and `feature/user-login` behind in the maintainer's working copy. It now records inside a throwaway repository. The terminal was too narrow for the output, breaking the conventionalcommits URL mid-token. The width is now measured rather than assumed: `tput cols` in the recorder gives 132 columns at 1400px, and the longest line CC001 prints is 131. The glyph advance is 10.26px, not the 9.6px that assuming 0.6em gives you. Two smaller changes: a passing check prints nothing and exits 0, so the two valid scenes reported an empty screen for four seconds — they now echo the result. And `Output` pointed at demo.gif while the header said to run the tape from the repository root, which wrote the file to the wrong directory. CC201's suggestion is 161 columns and still wraps; fitting it would need a 1700px terminal, which is not a demo, it is a tell that the string is too long. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
|
Warning Review limit reached
Next review available in: 52 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe VHS demo script now records a larger terminal session. It initializes a temporary Git repository, customizes the shell prompt, demonstrates commit and branch validation failures and successes, and uses ChangesDemo recording
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@assets/demo.tape`:
- Line 28: Update the demo setup command to assign the mktemp directory to
DEMO_REPO, exit if directory creation fails or cd cannot enter it, and use
DEMO_REPO for repository initialization. Add a hidden cleanup command that
removes DEMO_REPO after the demo completes.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ad9f3aad-554c-4559-8a6f-21784f26f5dd
⛔ Files ignored due to path filters (1)
assets/demo.gifis excluded by!**/*.gif
📒 Files selected for processing (1)
assets/demo.tape
…er it
When a command substitution produces nothing, zsh reads `cd $(...)` as a
bare `cd` and goes to $HOME. Confirmed rather than assumed:
$ zsh -c 'cd $(true); echo $PWD'
/root
So a failing mktemp would have left the tape running `git init` in a
maintainer's home directory. DEMO_REPO is now guarded with ${DEMO_REPO:?},
which aborts the chain instead:
$ zsh -c 'DEMO_REPO=$(false) && cd ${DEMO_REPO:?} && echo REACHED'
(chain stops, cwd unchanged)
The same guard covers the new hidden cleanup, so rm -rf can never be handed
a bare path. A full run now leaves zero directories behind under /tmp,
checked from a clean slate.
Re-recorded so the committed GIF is the one this tape produces. The visible
frames are unchanged — both new commands are inside Hide blocks.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
|
Reworked after review. The previous approach predicted the " (#N)" suffix a squash merge appends and measured the title against it — machinery to make a check pass that should not have been running. The simpler answer is not to run it. A push to main carries work that already passed on the pull request, and re-checks it against a subject the author never wrote and cannot shorten. Dropping the push trigger removes the failure mode instead of predicting it, and the title is checked once, where it can still be edited. commit-check-action does that natively with pr-title, so the noxfile goes back to what it was and this repository now checks itself with the thing users actually run. The workflow tests assert both properties that made #530 escape: the trigger set is pull_request only, and it carries no paths filter — #530 touched only assets/ and matched nothing, so no check ran at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
#530 passed review with a 75-character title and failed commit-check on main at 82, against a limit of 80 — the squash merge appended " (#530)" and pushed the subject over. Nothing had run on the pull request itself: main.yml's paths filter skipped the check because #530 touched only assets/, and the nox session checked HEAD, never the title a squash merge would actually commit. So: a dedicated workflow running commit-check-action on pull requests only, and the push-to-main check removed instead of taught to cope. Pull requests only, deliberately. A push to main carries work that already passed on its pull request, re-checked against a subject the author never wrote and cannot shorten. Dropping that removes the failure mode instead of predicting it. No paths filter — a subject, a branch name or an author address is wrong regardless of which files changed. The `edited` trigger re-checks when a title changes, because the title is what a squash merge commits; pr-title on the action checks it directly. The action rather than the nox session is also this repository checking itself with the thing users actually run. Known: CC202 fails on pull-request checkouts until the merge-base fix in commit-check ships and the action picks it up — the released engine cannot resolve a target that exists only as origin/main. That fix is a separate pull request; this one stays CI-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
#530 passed review with a 75-character title and failed commit-check on main at 82, against a limit of 80 — the squash merge appended " (#530)" and pushed the subject over. Nothing had run on the pull request itself: main.yml's paths filter skipped the check because #530 touched only assets/, and the nox session checked HEAD, never the title a squash merge would actually commit. So: a dedicated workflow running commit-check-action on pull requests only, and the push-to-main check removed instead of taught to cope. Pull requests only, deliberately. A push to main carries work that already passed on its pull request, re-checked against a subject the author never wrote and cannot shorten. Dropping that removes the failure mode instead of predicting it. No paths filter — a subject, a branch name or an author address is wrong regardless of which files changed. The `edited` trigger re-checks when a title changes, because the title is what a squash merge commits; pr-title on the action checks it directly. The action rather than the nox session is also this repository checking itself with the thing users actually run. Known: CC202 fails on pull-request checkouts until the merge-base fix in commit-check ships and the action picks it up — the released engine cannot resolve a target that exists only as origin/main. That fix is a separate pull request; this one stays CI-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
The README's output blocks predate rule IDs, so they showed neither the CCxxx identifiers nor the Docs links that every failure now prints. Same staleness #530 fixed in the demo GIF; the docs site is already current, only the README had been left behind. Measured by running each documented command against this checkout rather than reading the code: Type message check failed ==> ... -> CC001 message check failed ==> ... Type branch check failed ==> ... -> CC201 branch check failed ==> ... plus a trailing `Docs: https://commit-check.com/rules/#ccNNN` line on both, and two commit types the list had never picked up (perf, build). Four more blocks were stale in the same way, so they are refreshed too: - --no-banner carried a line that no longer exists anywhere in the source: "It doesn't match regex: ^(build|chore|ci|...)". grep over *.py finds it only in a test comment. - --compact prints the rule id: [FAIL] CC001 message: ... - Both --format json examples were missing the rule_id and docs_url fields, showed value as "" where it is now populated on pass, and named a subject_imperative check that the default run does not emit — it reports subject_max_length (CC004) and subject_min_length (CC005), and lists passing checks alongside the failing one. - The Python API return-value schema was missing rule_id and docs_url. The API code examples themselves were correct; each was re-run to confirm. Every block was then re-captured and compared byte for byte against the committed text (JSON via json.loads, text with ANSI colours and trailing padding normalised), so these are transcripts, not transcriptions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
…535) The README's output blocks predate rule IDs, so they showed neither the CCxxx identifiers nor the Docs links that every failure now prints. Same staleness #530 fixed in the demo GIF; the docs site was already current, only the README had been left behind. Measured by running each documented command against the checkout: Type message check failed ==> ... -> CC001 message check failed ==> ... Type branch check failed ==> ... -> CC201 branch check failed ==> ... plus a trailing Docs: https://commit-check.com/rules/#ccNNN line on both, and two commit types the list had never picked up (perf, build). Four more blocks were stale the same way: --no-banner carried an "It doesn't match regex:" line that no longer exists in the source, --compact now prints the rule id, both --format json examples were missing rule_id and docs_url and named a subject_imperative check the default run does not emit (it reports subject_max_length and subject_min_length), and the Python API return-value schema was missing rule_id and docs_url. Every block was re-captured and compared byte for byte against the committed text, so these are transcripts rather than transcriptions.
#530 passed review with a 75-character title and failed commit-check on main at 82, against a limit of 80 — the squash merge appended " (#530)" and pushed the subject over. Nothing had run on the pull request itself: main.yml's paths filter skipped the check because #530 touched only assets/, and the nox session checked HEAD, never the title a squash merge would actually commit. So: a dedicated workflow running commit-check-action on pull requests only, and the push-to-main check removed instead of taught to cope. Pull requests only, deliberately. A push to main carries work that already passed on its pull request, re-checked against a subject the author never wrote and cannot shorten. Dropping that removes the failure mode instead of predicting it. No paths filter — a subject, a branch name or an author address is wrong regardless of which files changed. The `edited` trigger re-checks when a title changes, because the title is what a squash merge commits; pr-title on the action checks it directly. The action rather than the nox session is also this repository checking itself with the thing users actually run. Known: CC202 fails on pull-request checkouts until the merge-base fix in commit-check ships and the action picks it up — the released engine cannot resolve a target that exists only as origin/main. That fix is a separate pull request; this one stays CI-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn



The GIF predates rule IDs, so it showed neither the
CC001/CC201identifiers nor the
Docs:links that every failure now prints.Re-recording it surfaced three faults in
demo.tape— all found by watchingthe output, not by reading the file.
The old recording showed a failing branch as clean
The hidden setup ran
git commit --allow-emptywith no git identityconfigured. That commit fails:
So the repository was left with no commits,
has_commits()returned false,and the branch check skipped. In the first re-recording,
commit-check -bonbranch
user-loginprinted nothing at all — an invalid branch recorded aspassing, in the project's own demo. Fixed by configuring
user.nameanduser.emailin the hidden block;CC201now appears as it should.It wrote to the repository you ran it from
The tape did
git checkout -b user-loginin the current directory, so runningit left
user-loginandfeature/user-loginbehind in the maintainer'sworking copy. It now
cds into amktemp -drepository first, so recording isnon-destructive.
The terminal was too narrow
At 1000px the
See https://www.conventionalcommits.orgline broke mid-URL(
...conventionalcommits.o/rg).The width is now measured, not calculated.
tput colsinside the recorderreports 132 columns at 1400px; the longest line
CC001prints is 131.The glyph advance turns out to be 10.26px — assuming the usual 0.6em gives
9.6px and lands you two widths too narrow, which is how I got it wrong twice
before measuring.
Smaller things
empty screen for several seconds. They now
&& echo 'passed'so the pass isvisible.
Outputpointed atdemo.gifwhile the header said to run the tape from therepository root — the file landed in the wrong directory. Now
assets/demo.gif.vhs docs/demo.tape; the tape lives inassets/.Result
One thing left alone
CC201's suggestion is 161 columns. Fitting it needs a 1700px terminal,which is not a demo — it is a sign the string itself is too long, since it
wraps on every real terminal including a maximised one. Out of scope here, but
worth a look.
Generated by Claude Code
Summary by CodeRabbit
git switchcommand.