Repository navigation
repo: preserve backup residue and guard snapshots (#3151) - #4320
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82225058b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mkdir -p "$REPORT_DIR" | ||
| TS="$(date '+%Y-%m-%d %H:%M %Z')" | ||
| SECRET_RE='\.env|secret|credential|\.pem$|\.key$|id_rsa|id_ed25519' | ||
| RESIDUE_RE='(^|/)([^/]*\.bak(-[^/]*)?|[^/]*\.backup|\.pre-warm[^/]*|resume-build|[^/]*\.mjs\.new)$' |
There was a problem hiding this comment.
Match filename prefixes before the pre-warm suffix
When a tracked backup is named bin/codex-proxy.mjs.pre-warm-20261024—the actual pre-warm file removed in this commit—the guard misses it because \.pre-warm must immediately follow the start of the path or /. In a temporary repository with this filename staged, the real keeper committed it instead of refusing the snapshot. Allow a filename prefix before .pre-warm and test the actual filename shape rather than only .pre-warm-state.
Useful? React with 👍 / 👎.
Summary
/home/user/primary-residue-2026-11-02/code, then removed them from tracking..bak,.bak-*,.backup,.pre-warm*,resume-build, and*.mjs.new. No.gitignorerules were added; live config, proxy, and key/cert fixtures remain tracked.Evidence
mainatb8bbe734had 34 matching tracked files (3,275,487 bytes).bash -n nixos/home/laptop-repo-keeper.sh nixos/home/laptop-repo-keeper.test.sh;bash nixos/home/laptop-repo-keeper.test.sh;shellcheck -S warning ...— all pass.Merge Danger
Door: Two-way — the removed files remain in Git history and in the dated local residue copy.
Blast Radius: Bounded — keeper snapshots are skipped only when a tracked residue-pattern path is present; other repos and normal snapshots are unchanged.
Need help on this PR? Tag
@codesmith-botwith what you need.