Repository navigation
Slopbrake 0.2.1
Found by putting 0.2.0 to work on two more repos and three more harnesses.
Codex and OpenCode (H5, H6, H7)
-
New:
slopbrake user-hooks install|uninstall|status --harness codexmergesslopbrake-hook --harness codex pre-tool-use|post-tool-use|stopinto~/.codex/hooks.json, keeping other tools' entries. It refuses while~/.codex/config.tomllacks[features] hooks = trueand never edits that file;statusreminds you to trust the entries in Codex's/hooksscreen and reports which ones[hooks.state]already trusts. -
New:
--harness opencodeinstalls the OpenCode plugin~/.config/opencode/plugins/slopbrake.js(one dependency-free module; it refuses to overwrite a file that is not its own). It guardsbashbefore it runs, recordsbash,edit,multiedit,writeandapply_patchchanges, and onsession.idleruns the Stop gate for root sessions, sending a red report back as a new prompt at most 3 times in a row. It does nothing whenslopbrake-hookis not onPATH. -
Both installers refuse, and
statusis not ok, unless theslopbrake-hookonPATHanswers--harness codex|opencode pre-tool-use: an older build that rejects--harnesswould make every hook a silent no-op. Codex entries count as installed only when matcher and timeout match too; install rewrites one that differs. Codex keys its trust by entry position, so removing or replacing slopbrake's entries can renumber a later entry in the same event, which then needs trusting again (statussays so). -
Fixed: Grok runs a repo's
.claudehooks with camelCase JSON (toolInput,sessionId), so the git guard saw no command and allowed everything while looking wired. The kit's hooks andslopbrake-hook --harness groknow read both shapes; Grok'swriteandhashline_editedits are recorded. -
Fixed: a
CLAUDE_PROJECT_DIRleaked into another harness made the user-level Stop gate skip the project repo; it is honoured only for Claude Code.slopbrake hook --harness ...(the alias) no longer dies in argparse with exit 2, which every harness reads as a block.
The gate
- Fixed: when only tests changed, mutation mutated every module the changed test files imported, whole; on a large repo one changed allowlist made the Stop gate time out on every stop. It now mutates only the functions the changed test functions call (compared with the base, so a deleted assertion counts), and skips when they call nothing first-party.
- Fixed: the last-green ratchet and the default-branch door (C8) counted untracked files, so a permanent untracked folder froze the ratchet and kept the
prstage red on main. Both now look at tracked files; an untracked file counts for C8 once it is staged. - Fixed: the Python
scripts/checkin a linked worktree tested the main checkout's code (the borrowed.venvholds an editable install of the main tree) and lacked the venv's tools onPATH. The template now puts this tree first onPYTHONPATHand the venv'sbinonPATH. (Repo-owned: hand-merge into an existingscripts/check.) - Fixed: the kit scripts wrote
__pycache__next to themselves, andstatusdid not notice bytecode an older install had committed.
init and status
- Fixed:
initin a linked worktree set the sharedcore.hooksPath, switching the main checkout's hooks before the kit was merged; it now leaves it alone and says to set it after the merge.init --no-trustskips the trusted-repo list, for staging a branch.CLAUDE.mdis named after the repository, not the worktree directory. - Fixed:
core.hooksPath=/dev/nullis reported as disabled hooks, not as existing hooks to chain into. - Changed:
statuscounts only tracked TypeScript sources for its coverage gap, andUNCOVERED=(dir ...)inscripts/checkdeclares sources left out on purpose (vendored code).