Document genrewatch, img and vid; stop vitest walking into worktrees - #21
Merged
Conversation
The three new commands were on PATH and in `cli-tools list` — which reads bin/ — but absent from both hand-maintained tables. Added, with a section each, plus the two new system requirements: ffmpeg is a hard dependency for `vid` rather than a degradation, and ImageMagick covers what sharp cannot (PDF, PSD, animated GIF). The vitest config is the part worth reading. There was none, so the default glob walked into `.claude/worktrees/` — which is *inside* the repository — and collected other branches' tests as if they were ours. With one worktree open here, `pnpm test` reported 21 files and 427 tests against a real suite of 14 and 284. The inflated count is the harmless half. Those files belong to somebody's in-progress branch, so a run can fail on code that is not on this branch at all, or pass because a half-finished test over there happened to cover the thing you just broke. Either way the suite stops describing the checkout you are in. Verified both directions: a deliberately failing decoy at .claude/worktrees/probe/test/ fails the run without the config and is not collected with it. The default excludes are restated because setting `exclude` replaces them rather than extending them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ThreatCrush Security Scan6 finding(s) MEDIUM: 1 | LOW: 5
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things: the docs the three new commands were missing, and a test-collection bug found while writing them.
The docs
genrewatch,imgandvidwere on PATH and incli-tools list(which readsbin/, so it is never stale) but absent from both hand-maintained tables. Added, with a section each, plus two new system requirements:ffmpeg— a hard requirement forvid, not a degradation. Nothing on npm decodes video the way sharp handles images.imgonly, and only for what sharp cannot do (PDF, PSD, animated GIF).vitest was collecting other branches' tests
There was no vitest config, so the default glob walked into
.claude/worktrees/— which is inside the repo — and picked up the tests of every open worktree. With one worktree here,pnpm testreported 21 files / 427 tests against a real suite of 14 / 284.The wrong count is the harmless half. Those files are somebody's in-progress branch, so a run can:
Either way the suite stops describing the checkout you are standing in — and both
EnterWorktreeandgit worktree addput trees there by default, so this triggers on ordinary use.Verified both directions with a deliberately failing decoy at
.claude/worktrees/probe/test/decoy.test.ts:The default excludes are restated in the config because setting
excludereplaces them rather than extending them.Verification
pnpm typecheckclean.--helpquoted in the new README sections was read from the actual command, not inferred.🤖 Generated with Claude Code