Repository navigation
Conversation
…rack receipt The untrack block's third branch (git rm --cached or the untrack commit failing) logged "could not untrack ..." with no advice to rotate a haiku.oauth_token the legacy config.json may have carried, even though #974/#987 already added that sentence to the other two branches and the credential is already in git history the moment ls-files finds config.json tracked, regardless of which branch fires. Found by self-review on #974/#987 and deliberately deferred to this follow-up. Red/green: tests/test_git_backup_rotate_advice_974.py now also covers this branch, forcing the failure with a pre-commit hook in the remember repo that always exits non-zero so _gb_commit_untrack's git commit fails. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…nch; log a trap.d CRLF finding Self-review (Explore) found the could-not-untrack branch's new sentence used the shorter deferred-branch form instead of the fuller succeeded-branch rationale (#860, claude.ai still accepting the old token, anyone with git-history access) -- expanded it to match, one line, no test change needed (the test only asserts the substring "rotate"). Self-review (oss:auditor) found tests/test_git_backup_rotate_advice_974.py's new pre-commit hook script is written via Path.write_text with no newline="", so a Windows run would get CRLF-translated and the shebang could fail to exec -- inert today since the whole file is already skipped on win32 (#79) and CI's own matrix confirms that leg never runs it. Logged to trap.d/ rather than fixed/filed per the spine's ranking (non-blocking, ships behind a trap.d fragment). Co-Authored-By: Claude Sonnet 5 <[email protected]>
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 untrack block in
hooks.d/after_save/50-git-backup.shhas three branches that fire oncegit ls-filesalready shows a legacy$SLUG/config.jsontracked -- i.e. anyhaiku.oauth_tokenit carried is already in the store's git history regardless of which branch fires. #974/#987 added rotate advice to the deferred and succeeded branches; this fix adds the same advice to the third, previously-silent 'could not untrack' branch (line ~630), expanded during self-review to carry the fuller wording that matches the succeeded branch (the #860 rationale: claude.ai may still accept the old token even though this plugin no longer reads it, and anyone with access to the store's git history can still see it).Closes #989.
Testing
tests/test_git_backup_rotate_advice_974.py::TestUntrackReceiptCarriesRotateAdvice::test_could_not_untrack_also_logs_rotate_advice, which forces the 'could not untrack' branch with apre-commitgit hook that always exits 1. Before the fix: FAILED,"rotate" not in log_text.4 passed(whole file, including the positive controltest_ordinary_backup_does_not_log_rotate_advice, which pairs the 'must not fire' case with a 'must fire' case).pytestnot run locally per this repo's own guidance (targeted-only; CI is the cross-platform/interpreter matrix gate).Review
Two reviewers (Explore, oss:auditor) ran against the pre-self-review commit, told not to edit:
pre-commithook script is written viaPath.write_textwith nonewline="", so on Windows the default newline translation would emit a CRLF-terminated shebang that some shebang parsers could fail to exec. Non-blocking: the whole test file is already skipped on win32 for an unrelated reason (Windows: re-enable shell-subprocess tests via Git Bash on PATH #79), and CI's matrix confirms that leg never runs this file. Logged totrap.d/989.pre-commit-hook-script-crlf-write-text.mdrather than fixed now, so it is not lost if the win32 skip is ever narrowed.A tree-snapshot compare (taken before spawning reviewers, checked after their return and after my own self-review edits) reported
mutated, naming exactly the two self-review edits above (the wording expansion and the new trap.d fragment) -- no reviewer-caused mutation.Docs
README.mdalready documents (around the haiku.oauth_token section) that the key/env var are fully removed and no longer read anywhere, and that a still-configured value is harmless and not logged. It does not enumerate the hook's individual log messages, so no README change was needed.🤖 Generated with Claude Code
[AI-generated]