Repository navigation
fix(sync): accept an empty remote manifest without a format version - #1025
Merged
Merged
Conversation
LaunchDarkly answers a project and a source that no sync wrote yet with an empty manifest that has no formatVersion. The client required version 1, so every first sync of a project failed before the plan with "unsupported formatVersion 0". The client and the store now treat an empty manifest without a format version as an empty manifest of the supported format. A manifest with entries still needs the supported format. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ctawiah
requested review from
davidbrackbill and
nkester-ld
and removed request for
a team
November 10, 2026 17:56
nkester-ld
approved these changes
Nov 10, 2026
This was referenced Nov 10, 2026
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.
Context
Every sync starts with a read of the remote manifest of each project in scope. LaunchDarkly answers a project and a repository source that no sync wrote yet with
{"items":[],"source":"..."}. The body has noformatVersion, so it decodes as version 0. The client required version 1, so the first sync of any project failed before the plan withsync manifest for project "x": unsupported formatVersion 0.What changes
SyncManifest.Unwrittenreports a manifest with no entries and no format version.GetSyncManifest,PatchSyncManifest, and the manifest store accept an unwritten manifest as an empty manifest of the supported format.Design notes
formatVersion: 1, which the client already sends in its patch body, so the unwritten state lasts until the first write.Review focus
Verification
go test ./...golangci-lint run ./...TestClientAcceptsAnUnwrittenSyncManifestandTestStoreLoadsAnUnwrittenManifestAsEmptycover the empty body and the body with entries but no version.Follow-up
The patch body still carried
formatVersion, which the API rejects. A second pull request removes the field from the client.🤖 Generated with Claude Code