Skip to content

fix(backup): keep backups local until a remote is configured - #1303

Merged
steipete merged 1 commit into
mainfrom
fix/gog-round19-backup
Nov 5, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/gog-round19-backup

Conversation

@steipete

@steipete steipete commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

New backups no longer select a maintainer-owned repository. They commit locally until the user configures a remote, and the CLI explains local-only operation. Explicit saved remotes and existing Git origins continue to work without rewrites; checkpoint uploads follow the same rule.

Closes #1287.

Validation: the default-remote regression fails on the previous implementation. Synthetic tests pass for local initialization, snapshot/checkpoint commits without a remote, and pushing to a temporary bare Git origin. No real backup or Google-account access was performed. The backup guide documents explicit remote setup. Independent Codex P0–P2 review is clean.

Full gate: make ci and govulncheck ./... passed on the dedicated Linux Crabbox lease (run run_8ec2e0593acf4e96b1e01faab914ef5a). Govulncheck found no reachable vulnerabilities.

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review ended

ClawSweeper stopped reviewing this revision because the pull request closed.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-05T17:34:51.940051Z 6bc144a 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: 6bc144af17

ℹ️ 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".

Comment thread internal/backup/git.go
Comment on lines +168 to 169
if err != nil || !changed || !push || !HasRemote(ctx, cfg.Repo) {
return changed, err

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Install the configured origin before silently skipping uploads

After a default local-only initialization, following the new instruction to run gog backup init --remote <URL> saves the URL but never installs an origin: ensureRepo returns through pullRepo immediately when .git already exists. Subsequent backups therefore hit this new guard and return success without uploading anything. Because the saved cfg.Remote is nonempty, prepareBackupPush also stops printing the local-only warning, leaving users believing remote backups are enabled. Add the explicitly configured origin when an existing repository has none, while preserving any existing origin.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(backup): keep backups local until a remote is configured This is item 1/1 in the current shard. Shard 0/1.

This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit 330b987 into main Nov 5, 2026
11 checks passed
@steipete
steipete deleted the fix/gog-round19-backup branch November 5, 2026 17:44
steipete added a commit that referenced this pull request Nov 5, 2026
Allow a local backup repository to acquire its first configured origin. After `gog backup init` without a remote, `gog backup init --remote URL` now adds the missing origin so subsequent pushes use it. Existing origins are never replaced, even when a different remote is supplied in configuration.

Follow-up to #1303 and #1287. Synthetic proof first reproduced the missing-origin failure, then verified initialization, a push to a temporary local bare repository, and preservation of the existing origin. No real backup was run or personal configuration changed.

Full gate: `make ci` passed on the dedicated Linux Crabbox lease (run `run_1fd82869a516d40c0c3e78f16c0b3efc`). Independent Codex P0–P2 final review is clean.
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.

Why does backup default to steipete/backup-gog.git rather than requiring a user-owned remote?

1 participant