Skip to content

fix(gitops): ignore latestVersion in sync (PRISM-2772) - #115

Closed
dhruva-vapi wants to merge 1 commit into
mainfrom
dhruva/prism-2772-gitops-latest-version
Closed

dhruva-vapi wants to merge 1 commit into
mainfrom
dhruva/prism-2772-gitops-latest-version

Conversation

@dhruva-vapi

Copy link
Copy Markdown
Contributor

PRISM-2772

A publish or rollback to identical settings can look like an edit because the API's top-level latestVersion was written into files and included in their hashes. That could block a legitimate local edit or produce a false conflict for a file using shared blocks.

How it works

  • Treat the top-level pointer as read-only metadata for assistants, tools, and squads. Pull omits it, drift ignores it, and normal POST/PATCH payloads strip it (including promotion's apply step). Nested config and assistant version labels are unchanged.
  • Keep an existing baseline through automatic push bootstrap. If a legacy hash exactly matches a complete config with a version value still visible in the file or API response, it can prove that side hasn't changed. If neither side matches and the configs differ, the normal conflict flow still blocks the overwrite. A blocked handoff tool doesn't get a later destination PATCH.
  • No tracked-state migration, snapshot replay changes, or promotion file rewrites.

Verification

Loopback fixtures in both state layouts reproduced version-only drift and a blocked local edit on main. With this change, the same cases stay clean or allow the local edit, while real and ambiguous conflicts still stop the write. The apply and promote fixtures check outgoing payloads and the published assistant version labels.

npm run build, npm test (787 passed; one CI-only skip), npm run test:repository (9 passed), and Biome on the changed TypeScript files passed locally.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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