Repository navigation
fix(sync): refuse to link an archived variation and print Linked only when kept (AIC-4038) - #1060
Draft
nkester-ld wants to merge 2 commits into
Draft
nkester-ld wants to merge 2 commits into
nkester-ld wants to merge 2 commits into
Conversation
… only after the link is kept Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…riation once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Human
The bug
After
detach --archive, linking the same source again with--upserttried to create a variation with the archived key. LaunchDarkly rejected it with a 409 "variation key already exists" and a hint to retry that could never work, and ldcli still printed "Linked". Now sync sees that the key is archived and refuses before writing anything, and it prints "Linked" only once the link is kept.Failure and reason for change
detach --archivetypescript-bot, then link the same source with--upsert. The create got 409 "variation key already exists" with a retry hint, and the output still said "Linked".Why
Ticket: AIC-4038. This is one of six independent PRs from that stage run, not a stack; it can merge on its own.
Describe the solution you've provided
Before:
After:
.prompt.mdwithupsert: trueand an archived key gets the same refusal.Review focus
planResource.runWorkspaceSyncWithSource. It still prints when the variation synced but a later step, such as the lock write, failed, because the descriptor is kept then.Testing
go test ./internal/sync/... ./cmd/sync/...passes.Requirements
🤖 Generated with Claude Code
Related Jira issue: AIC-4038: Fix medium sync bugs found in stage testing