Skip to content

repo: preserve backup residue and guard snapshots (#3151) - #4320

Merged
dezren39 merged 1 commit into
mainfrom
queue/5648-3151-preserve-residue
Nov 2, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/5648-3151-preserve-residue

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

repo-keeper snapshot
  tracked residue present → report paths and skip the whole commit
  otherwise → retain the existing secret guard and snapshot behavior
  • Preserved all 34 current residue files outside the repo under /home/user/primary-residue-2026-11-02/code, then removed them from tracking.
  • Added a focused integration test for .bak, .bak-*, .backup, .pre-warm*, resume-build, and *.mjs.new. No .gitignore rules were added; live config, proxy, and key/cert fixtures remain tracked.

Evidence

  • Before: main at b8bbe734 had 34 matching tracked files (3,275,487 bytes).
  • After: matching tracked-path scan is empty; live paths remain tracked.
  • Verification: 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.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 10:16
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5fb056da-aaa7-4633-ac44-3327901d0f8b
Commits

Reviewing files that changed from the base of the PR and between b722f71 and 8222505.

Files selected for processing: 36
  • .opencode/opencode.jsonc.backup
  • .opencode/opencode.jsonc.bak-2026-10-24-113733-provider-alignment
  • .opencode/opencode.jsonc.bak-2026-10-24-agy-off
  • .opencode/opencode.jsonc.bak-2026-10-24-agy-reenable
  • .opencode/opencode.jsonc.bak-2026-10-24-copilot-agykey
  • .opencode/opencode.jsonc.bak-2026-10-24-copilot-restore
  • .opencode/opencode.jsonc.bak-2026-10-24-google-agymodels
  • .opencode/opencode.jsonc.bak-2026-10-24-google-off
  • .opencode/opencode.jsonc.bak-2026-10-24-restore-models
  • .opencode/opencode.jsonc.bak-2026-10-25-cline-comment
  • .opencode/opencode.jsonc.bak-2026-10-25-dedupe-comment
  • .opencode/opencode.jsonc.bak-2026-10-25-instances
  • .opencode/opencode.jsonc.bak-2026-10-25-muse-off
  • .opencode/opencode.jsonc.bak-2026-10-25-openai-alternate
  • .opencode/opencode.jsonc.bak-20261024121536-commandcode-laptop-deploy
  • .opencode/opencode.jsonc.bak-20261024122556-native-codex-only
  • .opencode/opencode.jsonc.bak-20261025-cline-alias-pre
  • .opencode/opencode.jsonc.bak-20261025-cline-pass-rename-alias-pre
  • .opencode/opencode.jsonc.bak-20261025-cline-pass-rename-pre
  • .opencode/opencode.jsonc.bak-20261025-muse-comment-fix
  • .opencode/opencode.jsonc.bak-20261025063650-openrouter-disabled-providers
  • .opencode/opencode.jsonc.bak-20261025065144-cloudflare-disable
  • .opencode/opencode.jsonc.bak-20261025113345-openrouter-disable
  • .opencode/opencode.jsonc.bak-20261025161337-routepool-cleanup
  • .opencode/opencode.jsonc.bak-20261025180845-pre-repo-sync
  • bin/codex-proxy.mjs.pre-warm-20261024
  • bin/codex-proxy.mjs.resume-build.bak
  • bin/commandcode-proxy-start.sh.bak-20261025003957-netfix
  • bin/muse-proxy.mjs.bak-20261024-flag-tolerance
  • bin/muse-proxy.mjs.bak-20261024121323-laptop-deploy
  • bin/proxy-supervise.mjs.new
  • doc/2026-10-11T03-44-33Z_design_groups_events_delegation/spikes/s11-relay/certs/live/leaf.key.bak-20261011T122827Z
  • doc/2026-10-11T03-44-33Z_design_groups_events_delegation/spikes/s11-relay/certs/live/leaf.pem.bak-20261011T122827Z
  • nixos/home/laptop-repo-keeper.sh
  • nixos/home/laptop-repo-keeper.test.sh
  • opencode.json.bak
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T10:18:41.363559Z 8222505 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)$'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant