Skip to content

feat(sync): persist manifests in LaunchDarkly - #852

Draft
ctawiah wants to merge 1 commit into
ctawiah/sync-attachment-cleanup-safetyfrom
ctawiah/sync-remote-manifests
Draft

ctawiah wants to merge 1 commit into
ctawiah/sync-attachment-cleanup-safetyfrom
ctawiah/sync-remote-manifests

Conversation

@ctawiah

@ctawiah ctawiah commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Context

Prompt sync currently stores its reconciliation baseline in a committed .launchdarkly/manifest.yaml file. That keeps each checkout isolated, but separate branches and clones do not share the latest synchronized state. Gonfalon now provides source-scoped, project-scoped manifest endpoints with resource versions for optimistic concurrency.

This layer replaces local manifest persistence with those endpoints. Local prompt, tool, and skill files remain unchanged, and sync continues to use the manifest as the common ancestor when comparing local and LaunchDarkly state.

What changes

  • Adds GET and PATCH clients for the LaunchDarkly sync manifest endpoints.
  • Uses the required Git origin as a canonical source identifier across SSH and HTTPS clones.
  • Loads project-scoped manifests and combines them into the workspace baseline used by reconciliation.
  • Converts manifest changes into versioned upserts and deletions.
  • Reports an optimistic concurrency conflict when another sync updates an entry first.
  • Batches manifest mutations to respect the endpoint limit.
  • Verifies ambiguous writes by reading the manifest back before reporting failure.
  • Updates bootstrap, normal sync, watch mode, and detach to persist manifest changes through LaunchDarkly.
  • Removes local manifest YAML reads, writes, rollback, and format-version handling.
  • Preserves project discovery when a managed file has been deleted from Git.

The command still requires a Git repository and origin. It does not add source or project flags to the normal sync workflow.

Review focus

  • Does the canonical Git source remain stable for SSH and HTTPS clones of the same repository?
  • Are project manifests combined without changing resource identity or reconciliation behavior?
  • Do upserts and deletions always send the version returned by the latest GET?
  • Does a 409 stop the sync with a clear instruction to run it again?
  • Can bootstrap or detach rollback leave the remote manifest inconsistent with local files?
  • Has local manifest persistence been removed without changing the local resource layout?

Verification

  • go test ./cmd/sync ./internal/sync/source ./internal/sync/repository ./internal/sync/manifest ./internal/sync/prompt ./internal/sync/bootstrap ./internal/sync/detach ./internal/sync/api
  • go test ./...
  • go vet ./internal/sync/... ./cmd/sync
  • git diff --check

Related changes

Review the stack in this order:

  1. Confirm destructive watch actions
  2. Guarantee prompt fingerprint convergence
  3. Add searchable attachment API foundations
  4. Reconcile variation attachments
  5. Attach tools and skills to variations
  6. Render attachment-aware review output
  7. Safely clean unreferenced attachments
  8. Persist sync manifests in LaunchDarkly

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.

1 participant