Skip to content

agent: fix UpsertPeerSyncState call broken by the #80/#87 merge integration#90

Merged
mbertschler merged 1 commit into
mainfrom
claude/fix-merge-upsert-signature
Jun 4, 2026
Merged

agent: fix UpsertPeerSyncState call broken by the #80/#87 merge integration#90
mbertschler merged 1 commit into
mainfrom
claude/fix-merge-upsert-signature

Conversation

@mbertschler
Copy link
Copy Markdown
Owner

Why

main does not compile after #80 (issue #76) and #87 (issue #77) both merged. Each PR was green in isolation, but they were never tested integrated:

Git merged both with no textual conflict (different files), but the integrated result fails to build:

agent/sync_test.go:67: not enough arguments in call to srv.store.UpsertPeerSyncState
  have (ctx, int64, int64, int64)  want (ctx, int64, int64, int64, bool)

go build ./... passes (the break is in a _test.go file), so it slipped past a library-only check — but go vet/go test on the agent package fail, i.e. CI on main is red.

Fix

One line: pass false (the call seeds a first-contact watermark — there's no prior value to rewind from, so the production default applies). It is the only UpsertPeerSyncState call site still on the old signature; all others already pass the arg.

Verify

With rclone v1.74.1 on PATH (so the node integration tests actually run): go vet ./... clean, go test ./... fully green across all packages.

https://claude.ai/code/session_01GV1qgPE2YcUnuoLvy566kj


Generated by Claude Code

main stopped compiling (agent test package) once #76 (PR #80) and #77
(PR #87) both landed: #87 added the allowRewind parameter to
UpsertPeerSyncState and updated every call site it could see, but #76
introduced agent/sync_test.go on a branch #87 never contained, so its
call kept the old 4-arg signature. Git merged both cleanly (different
files), but the integrated result doesn't build. Pass false (a
first-contact watermark seed — no prior value to rewind from).

https://claude.ai/code/session_01GV1qgPE2YcUnuoLvy566kj
Copilot AI review requested due to automatic review settings June 4, 2026 10:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a build break on main caused by integrating #80 and #87: agent/sync_test.go still called store.UpsertPeerSyncState with the pre-#87 signature, preventing go test / go vet from passing for the agent package.

Changes:

  • Update the UpsertPeerSyncState call in agent/sync_test.go to pass the new allowRewind bool parameter (false) to match the current store API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mbertschler mbertschler merged commit d4e5d06 into main Jun 4, 2026
3 checks passed
@mbertschler mbertschler deleted the claude/fix-merge-upsert-signature branch June 4, 2026 11:21
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.

3 participants