Conversation
Catch the obvious misconfiguration where source and target URLs point at the same repository before any network I/O. Assisted-by: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Paulo Gomes <paulo@entire.io> Entire-Checkpoint: 358f2d5f22f6
Two integration cases prove --prune leaves orphan target branches alone once the user has narrowed scope with --branch main or --map main:stable. A package-level TestMain registers the empty go-git config loader so host gpgSign settings can't break test commits. Assisted-by: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Paulo Gomes <paulo@entire.io> Entire-Checkpoint: 6d070296380b
Three integration tests close the gap left by existing prune coverage: - sync --prune deletes an orphan target branch and preserves the in-scope branch (no replicate-mode equivalent existed for sync). - sync --prune leaves a target-only tag alone when --tags is absent. - sync --prune --tags preserves a tag created on the target after ref discovery completes; the planner's snapshot never saw it, so no command targets it. Uses receivePackHook on the test server to inject the new tag inside the race window. Assisted-by: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Paulo Gomes <paulo@entire.io> Entire-Checkpoint: b27245bdaace
Inject a one-shot ng status from the target's receive-pack so the first incremental relay attempt fails. Verify the run errors, the target ref stays put (receive-pack only commits ok'd commands), and the retry drives the incremental relay to completion. Assisted-by: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Paulo Gomes <paulo@entire.io> Entire-Checkpoint: e50870738123
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c3089e9. Configure here.
nodo
approved these changes
Apr 30, 2026
Entire-Checkpoint: 8feaf84a600f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Extends integration coverage in
internal/syncer/integration_test.goin two areas: sync-mode prune semantics and incremental relay push failure handling.Sync-mode
--pruneTestRun_IntegrationSyncPruneDeletesOrphanedBranch— With no ref filter,Runwith--pruneremoves a target-only branch absent from the source; checksDeletedand that the managed branch still matches the source.TestRun_IntegrationSyncPrunePreservesTargetTagWithoutIncludeTags— With--prunebut without--tags, a target-only tag must survive so branch-only prune does not drop release-style markers.TestRun_IntegrationPrunePreservesUnrelatedTargetBranchUnderFilter— Table-driven cases for--branchand--map: unrelated branches on the target stay present and their hashes unchanged under filtered prune.These clarify prune scope and guard against deleting refs users expect to keep while still enforcing orphan branch cleanup in sync mode.
Incremental push failure and retry
TestRun_IntegrationIncrementalPushFailureRecoversOnRetry— Injects a one-shotngfrom the target receive-pack on the incremental relay path (after a fast-forward plan). Asserts the firstRunerrors, the target ref is unchanged (only ok’d commands commit), and a retry completes incremental relay withRelayModeincremental, two receive-pack attempts, and the target at the new source head.This pins the failure-and-retry contract for incremental sync and complements bootstrap-focused push tests; it does not replace mid-stream cancel/drop coverage (still mainly on
BootstrapviareceivePackRaw).Note
Medium Risk
Mostly test-only, but adds a new public-config validation that rejects identical source/target URLs and could break existing workflows that relied on that configuration.
Overview
Expands test coverage for sync/replicate planning and end-to-end
Runbehavior, focusing on--prunescoping rules (preserve out-of-scope target-only branches when--branch/--mapis used; delete orphan branches when unfiltered) and tag-prune boundaries (don’t prune tags unless--tags, prune target-local tags when--tags --prune, and preserve tags created mid-sync).Adds an incremental relay failure/retry integration test that injects a one-shot
receive-packrejection, asserting the first run errors without advancing the target and the retry completes via incremental relay.Introduces
validation.ValidateEndpointsand wires it intonewSession(only when a target is required) to reject identical source/target URLs acrossRun/Bootstrap/Probe, with unit tests. Integration tests now register an empty go-git config loader inTestMainto avoid environment-dependent git config affecting runs.Reviewed by Cursor Bugbot for commit c3089e9. Configure here.