Repository navigation
Conversation
A link of a source whose variation does not exist in LaunchDarkly stopped with an error, and a missing config stopped the whole plan. A link with --upsert now creates the resource in LaunchDarkly, and the config of a variation when LaunchDarkly has none. The config takes the mode of the source, or --mode, and the name of its key. --model-config-key gives the new variation a model config at its latest version. A missing config is now a row of the plan, so one such variation does not stop the others, and the message names the flag. Co-Authored-By: Claude Fable 5.1 <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.
Context
A link of a repository source is reviewed and written in one command, and then the resource syncs. When the variation does not exist in LaunchDarkly, the plan stopped with an error that asked the user to create it in the UI first, because a descriptor has no
upsert. When the config did not exist, the read of the config failed and stopped the whole plan, including every other variation of the project. Both cases are the first step of an adoption flow: the prompt lives in code and LaunchDarkly has nothing yet.What changes
link --upsertcreates the resource in LaunchDarkly when it does not exist. For a variation it also creates the config when LaunchDarkly has none. The plan shows the row ascreate_serverwith the reasonnew, creates config "x", and the same--yesand--no-inputflags apply, because the create asks nothing.--model-config-keygives the new variation a model config at its latest version, asadddoes.--modesets the mode of a new config. Without it, the source decides: a message list makes a completion config, text makes an agent one. Both flags need--upsertand apply to a variation only.server_canonicalsetting still refuses a create.--upsertcreates the tool or skill through the same publish as a managed file withupsert.CreateConfigon the API client posts the key, the name, and the mode.Design notes
Upserton the compiled resource,chooseAction, the create path ofapplyServerChange, and the publish of the attachment resolver. The only new write is the config create, which runs right before the variation create and tolerates a 409 from a config that another working copy created after the plan.link --upsertfinds it and creates the variation only.upsert: true, and a missing config now works for it the same way.Review focus
--mode, else the mode the source implies, else agent?Verification
go test ./...golangci-lint run ./...TestLinkUpsertCreatesTheConfigAndTheVariation,TestLinkUpsertCreatesTheVariationWithAModelConfig,TestLinkUpsertModeOverridesTheSourceMode,TestLinkWithoutUpsertNamesTheMissingConfig,TestLinkUpsertCreatesAMissingTool,TestCreateOfALinkedResourceNeedsNoSetting,TestClientCreatesConfig, andTestSourceLinkFlagsCarryTheUpsertIntent.🤖 Generated with Claude Code