Repository navigation
Everything since 0.3.0. Update if you run 0.3.0 or earlier. In those versions a check followed later by || counted as passing, so a failing test run could open the done-gate. On Windows, edits that skipped or deleted tests went through unasked. Files a shell command never wrote, and files outside the project, could hold the done-gate with nothing to run. The hook entries canny init writes have not changed since 0.3.0, so updating ~/.canny/src is enough. Coming from 0.2.x, run canny init again in each guarded project to add the SessionStart hook.
Added
requirein.canny.json: regexes that each have to match a passing check after the last code edit before a Stop is allowed. Until now any one check opened the done-gate, soeslintpassing after a logic change let "done" through with the tests never run. The block reason, theSessionStartbrief, andcanny statusname the checks still needed, with control characters removed, since a cloned repository can write the patterns. The field only asks for more, so likestrictit takes effect withoutcanny trust; a pattern can only be satisfied by a command that already counts as a check.
Fixed
- A file outside the project no longer holds the done-gate. An edit to
~/.zshrc, a key written to the home directory, or a copy into another checkout used to count as a code change that no project check could clear, so a session doing only configuration work was blocked with nothing to run. The project is the nearest directory at or above the session's that holds.git, so an edit elsewhere in the repository still counts when the agent works in a subdirectory. A leading~in a shell path is read as the home directory. - A test file run directly counts as a check:
python tests.py,python3 tests/test_api.py,node test.js,ruby test/user_test.rb. The file name has to say it is a test (test,tests,test_*,*_test,*_tests,*.test,*.spec), sopython manage.pystill checks nothing. - The block reason says a redirect into a file (
> out.log 2>&1) does not hide a check's exit status, next to the forms that do. - Paths with Windows separators are read like any other. The patterns for test files, ignored directories, and env files only accepted
/, while Claude Code on Windows sendsC:\…andpath.relativeanswers with\there. So addingtest.skip(totests\helper.jsor deleting it went through without a question, an edit underdocs\ornode_modules\blocked the Stop, and a key written to a git-ignoredconfig\.envwas denied. The ledger now records paths with/on every system, so anignorepattern such as^generated/matches on Windows too. - On Windows a Git Bash path (
/c/Users/…) is read asC:\Users\…. It used to resolve toC:\c\Users\…, so the test-removal check read a file that does not exist and let the write through. - A check followed later in the same command by
||no longer counts as passing:pnpm test && echo ok || trueexits 0 when the tests fail, because the||rescues every command before it. Only an||directly after the check was caught before. - The ledger no longer records files a shell command never writes. Commands inside quotes (
ssh host "cp a $B/x",grep -E "cp |mv " f) were read as shell, a variable such as$DST/a.tswas recorded as a file, a substitution such asbak-$(date +%Y%m%d)was split into two names, and a leadingcdwas ignored, so relative paths landed in the wrong directory. Each of these could hold the done-gate on a file nothing had changed. python3 -m unittestcounts as a check, likepython -m unittest.bench/run.mjson Windows runs each task'snpm testthrough a shell.npmisnpm.cmdthere and cannot be started directly, so every task read as failed whatever the agent did.
Full changelog: v0.3.0...v0.4.0