Skip to content

fix(sync): guarantee prompt fingerprint convergence - #836

Draft
ctawiah wants to merge 1 commit into
mainfrom
ctawiah/AIC-3485/prompt-fingerprint-round-trips
Draft

ctawiah wants to merge 1 commit into
mainfrom
ctawiah/AIC-3485/prompt-fingerprint-round-trips

Conversation

@ctawiah

@ctawiah ctawiah commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Context

Prompt sync uses fingerprints to decide whether local and LaunchDarkly variations still represent the same state. Equivalent API defaults could produce different fingerprints, and an omitted custom model version previously could not converge with the concrete version stored by LaunchDarkly.

What changes

  • Normalize only equivalent API defaults: absent versus empty parameters and custom maps.
  • Treat an omitted custom model version as “follow latest” at sync time; explicit versions remain pinned.
  • Resolve that authored intent before planning, while leaving the local file unchanged.
  • Revalidate the complete plan once after confirmation instead of rereading every resource before its write.
  • Preserve the existing verification read for uncertain writes whose response may have been lost.

For example, this authored intent remains unchanged:

modelConfigKey: claude-prod

If the current version is 4, sync plans and applies the effective variation with modelConfigVersion: 4. A later model-config release is picked up by the next sync.

Verification

  • go test ./internal/sync/...
  • go test ./...
  • go vet ./internal/sync/... ./cmd/sync
  • Create and update convergence acceptance tests
  • git diff --check

@ctawiah
ctawiah force-pushed the ctawiah/AIC-3485/prompt-fingerprint-round-trips branch from d3f5974 to 9f27137 Compare September 30, 2026 20:36
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3485/prompt-fingerprint-round-trips branch from 9f27137 to 0f595e5 Compare October 1, 2026 01:04
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