feat(sync): add prompt status command - #791
Draft
ctawiah wants to merge 1 commit into
Draft
Conversation
Validate the repository, compile local resources, and check their status per project through a typed sync API client. Keep request debugging isolated behind a temporary flag.
ctawiah
added this pull request to stack #790
September 10, 2026 00:08
3 tasks
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
Add the initial
ldcli sync promptstatus flow. The command validates the current Git repository, compiles resources under.launchdarkly, and asks LaunchDarkly for each resource's sync status. This PR only gathers typed status data for later sync decisions; it does not plan, apply, or print resource statuses yet.Implementation
sync promptcommand and its analytics event.internal/syncAPI client, injected with the existing resource HTTP client. It groups resources by project, sendsPOST /api/v2/projects/{projectKey}/ai-configs/sync/status, and decodes responses intoResourceStatusvalues.{ repoIdentifier, resources }for each project, including each resource's fingerprint, kind, lookup key, andupsertvalue.--debugflag that writes the HTTP method, endpoint path, and request body to stderr. The behavior is isolated in a transport decorator so it can be removed without changing the sync API client.Verification
go test ./... -count=1Stack
This PR is stacked on #789, which is stacked on #788.