Repository navigation
A worktree with a live battery is read-only: PreToolUse guard hook; verdict.w reads logs - #2345
Merged
Merged
Conversation
added 2 commits
October 11, 2026 07:43
…es it; verdict.w reads logs Eric, 2026-10-10: "You will do nothing differently, unless you force yourself to by writing gates and controls into triggers and tools." Today an edit under a running battery produced a false red, a battery was stopped mid-survey (so the next one rediscovered the reds one at a time), and a gate log read by eye started a battery into the gate's lock. A memory note already forbade the first; it did not hold. tools/hooks/battery_guard.w (PreToolUse on Edit/Write/Bash, wired in .claude/settings.json) reads the battery slot registry and refuses, in a worktree whose battery is alive: an edit; a build run there; a kill of its pid or a pkill naming it; tree-changing git run there; mv/rm/cp of or a redirect into its files. It also refuses grep/tail/cat/head of a gate, build or battery log: `with run tools/verdict.w <log>...` prints `rc=N green|RED <targets>` or OPEN while the log is still being written, and its exit code is the verdict. guard_cases.w runs the thirteen cases in guard_cases.tsv against a live battery (13 agree).
…only the uat step A battery started inside a maintenance wake on 2026-10-11 ran 45 s per 16 min for three hours: the gate and the survey held no sleep lock, so an idle Mac slept through them.
ehartford
force-pushed
the
battery-guard
branch
from
October 11, 2026 14:44
3a06b38 to
efd4c08
Compare
Contributor
Author
|
Rebased onto main after #2342. Adds: every battery phase holds the machine awake ( |
…ime; --detail prints a red target's failure block; --times the wall lines A gate that ran three hours for fifteen minutes of steps was reported as unexplained because the tool only printed reds; the log had the answer.
Contributor
Author
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.
Controls, not notes (Eric, 2026-10-10). The hook refuses edits, builds, kills and tree-changing git in a worktree whose battery is alive, and refuses reading gate/battery logs by eye;
with run tools/verdict.w <log>is the one reader. 13 guard cases pass against a live battery. Rides the next stack's battery.