Conversation
The size-watch note in scripts/session-start-hook.sh fired on every session whose hooks.log sat between jit-misses.sh's 10MB watch threshold and a well-formed, non-zero JIT_CONTEXT_LOG_MAX_BYTES -- rotation was already automatic in that band (#406), so the line said so and then said there was nothing to do, teaching readers to skip JIT lines. Drop the case arm carrying no action; keep the two that do (rotation off, or a refused JIT_CONTEXT_LOG_MAX_BYTES value). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
The size-watch note in scripts/session-start-hook.sh fired on every session whose hooks.log sat between jit-misses.sh's 10MB watch threshold (#248) and a well-formed, non-zero JIT_CONTEXT_LOG_MAX_BYTES (#406's automatic rotation, 20MB default). The message said itself there was nothing to do -- rotation had already run, or would at the next SessionStart -- and still cost every such session a line of context, teaching readers to skip
JIT :lines.Drops the
*)case arm in thecase "$JIT_CONTEXT_LOG_MAX_BYTES"block that printed it. The two arms that still carry an action are unchanged:JIT_CONTEXT_LOG_MAX_BYTES=0("Automatic rotation is off ... delete or rotate it yourself") and a malformed value ("... did NOT rotate this session ... delete or rotate it yourself"). The comment above the case is rewritten to describe the new silent-by-default behavior.Both affected test files are updated by inverting an existing assertion (not just adding a new one), each against an unchanged positive control proving the note mechanism still fires for the two states that carry an action:
=0branch fires on the identical stub.=0branches fire on the identical fixture.Red (old hook code, new test assertions, via
git stash push -- scripts/session-start-hook.sh): both suites failed with the size note absent from the new assertions. Green (git stash pop): both suites pass (test-session-start-bound-248.sh: 14 passed, 0 failed; test-log-rotation-406.sh: exit 0).Docs:
.oss.jsondocs_targets is README.md; grepped and found it never documented this note's wording (no-change-needed). Also checked docs/configuration.md and scripts/jit-doctor.sh by grep -- neither references this note's wording either.Closes #434
🤖 Generated with Claude Code
[AI-generated]