Skip to content

git-backup's 'could not untrack' message (line 630) still has no rotate-credential advice #989

Closed

Description

@fdaviddpt

Symptom: A user who hits the "could not untrack" branch of the config.json/logs/tmp untrack block in hooks.d/after_save/50-git-backup.sh learns nothing about needing to rotate a credential that config.json may have carried, and cannot tell "credential never existed" from "credential exists but this message happens not to say so."

Location: hooks.d/after_save/50-git-backup.sh:630 (current HEAD, confirmed during curate pass):

log "git-backup" "could not untrack $SLUG/logs, $SLUG/tmp or $SLUG/config.json; the index was restored and the next backup retries."

Mechanism: The untrack block (lines 622-631) has three branches, all reached only after git -C "$REPO_ROOT" ls-files already shows a legacy $SLUG/config.json tracked -- i.e. any haiku.oauth_token it carried is already in this store's git history, regardless of which branch fires:

  • line 624, "deferred" (store has other staged changes) -- carries rotate advice.
  • line 627, "succeeded" (untrack commit landed) -- carries rotate advice.
  • line 630, "could not untrack" (git rm --cached or _gb_commit_untrack failed) -- still has NO rotate advice.

#974 (PR #987) fixed the first two branches; this third sibling was found by self-review round 2 on that same PR, after it merged, and deliberately left for a follow-up rather than reopening #974 for an unbounded sweep of self-review rounds.

What would settle it: add the same "if that config.json ever carried a haiku.oauth_token... rotate it (claude setup-token)" sentence to line 630's message, with a red/green test constructing the git rm --cached/_gb_commit_untrack failure path (see tests/test_git_backup_silent_exclude_mkdir_759.py for the ENOTDIR-failure construction pattern used for a similar branch).

[AI-generated]

Activity

  1. added
    priority:high
    filed-by-loop
    lane-other
    on Oct 8, 2026
  2. self-assigned this
    on Oct 8, 2026
  3. added a commit that references this issue on Oct 8, 2026
  4. removed their assignment
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    filed-by-looplane-otherpriority:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions