Repository navigation
fix(backup): attach configured remote to local repositories - #1304
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
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. |
|
Codex review: needs real behavior proof before merge. What this changesAttach the configured backup remote as origin when an existing local backup repository has no origin. Example: Run gog backup init locally, then gog backup init --remote /tmp/private-backup.git.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep this PR open: it fixes a source-confirmed setup gap on main, has owner-approved direction, and introduces no definite correctness defect. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherBackup commands resolve saved configuration and CLI options, prepare a Git repository, write encrypted snapshots, and optionally push commits through its origin. flowchart LR
A[Backup CLI] --> B[Resolve backup configuration]
B --> C[Prepare write repository]
C --> D[Attach missing origin]
D --> E[Commit encrypted snapshot]
E --> F[Push through Git origin]
Technical reviewBest possible solution: Keep the focused ensureRepo change and validate destination exclusion, revocation, and existing-state compatibility through the production upload paths. Do we have a high-confidence way to reproduce the issue? Yes: main saves the requested remote but skips attaching it whenever .git already exists, and upload helpers require origin; no target code was executed during this review. Is this the best way to solve the issue? The implementation is the smallest complete source fix: it uses the existing write-repository owner, preserves existing origins, and leaves read preparation separate. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ce1a8f519184. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete security defect was found, but persistent upload-destination authority still needs final-effect validation. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 1:53 PM ET / 18:53 UTC. |
|
The local-to-remote setup path is now complete in #1304, merged as 5a36a35. After local initialization, The regression first reproduced the missing-origin failure, then passed for initial remote configuration, pushing to a temporary bare repository, and preserving an existing origin. Full |
Allow a local backup repository to acquire its first configured origin. After
gog backup initwithout a remote,gog backup init --remote URLnow 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 cipassed on the dedicated Linux Crabbox lease (runrun_1fd82869a516d40c0c3e78f16c0b3efc). Independent Codex P0–P2 final review is clean.