Repository navigation
Session-start fast-forward; tracer check compares nested helpers - #438
Merged
Merged
Conversation
A session reads CLAUDE.md, skills and scripts from the main checkout, which nothing kept current: it sat seven merges behind through the #433 build. The hook fast-forwards a clean master and says what it moved, or says how far behind the checkout is and the command that catches it up. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A third copy of a nested heap helper reached review in #433: the check compared only top-level functions. The twelve nested copies already there are listed in nested-copies.known, which passes exactly those and fails on a new copy or a stale line; #435 moves them into codebite.py. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
4 tasks
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 checks from the retro on #433, so the next build doesn't repeat two of its mistakes.
Stale main checkout. A session reads CLAUDE.md, skills and scripts from the main checkout, and nothing kept it current: it sat seven merges behind through the #433 build, pointing at a
gh-ticket.sh --jsonthat no longer existed. A new SessionStart hook,.claude/hooks/sync-main-checkout.sh, fast-forwards the main checkout when it is onmasterwith no change to a tracked file, and prints one line into the session:When it can't (another branch, local changes,
masterhas commits of its own) it moves nothing and prints how far behind the checkout is and the command that catches it up. It is silent in a worktree session, when the checkout is current, and when origin can't be reached. The hook has a 20-second timeout in.claude/settings.json.Nested tracer helpers.
scripts/check-tracer-helpers.pycompared only top-level functions, so a third copy of a nested heap helper reached review in #433. It now compares nested functions too. Twelve nested copies were already there, across about 40 tracers; they are listed inscripts/walkthroughs/nested-copies.known, which passes exactly those. A new copy, one more file copying a listed one, or a line that no longer holds (STALE) fails. #435 moves the twelve intocodebite.pyand empties the list.Evidence
scripts/sync-main-checkout.test.sh(new, scratch repositories): level, behind, instruction files changed, untracked files, local changes, another branch, diverged, a worktree session, origin unreachable, no repository.scripts/check-tracer-helpers.test.py: five new cases (nested copy, nested inside a method, listed copy passes, third file fails, stale line fails); the old "nested functions are not compared" case is now methods only.scripts/run-script-tests.shpassed in both commits' hooks; shellcheck andscripts/check-doc-references.pypass;scripts/check-tracer-helpers.pyexits 0 on the real tracers with the list and prints the twelve without it.Door
Two-way. Removing the
SessionStartentry from.claude/settings.jsonturns the hook off; emptying the check back to top-level is one revert. The hook only ever fast-forwards, the same movescripts/ship-branch.shmakes before a ship.🤖 Generated with Claude Code