Repository navigation
feat(push): label assistant versions with the pusher, commit and changed fields - #79
Merged
Merged
Conversation
…ged fields A push that publishes an assistant version now sets its versionName and versionDescription to the pusher, the commit, and the dotted paths of the fields that changed. API-key writes record no author on the version, so this is the only trace of who published it.
dhruva-vapi
force-pushed
the
dr/assistant-version-labels
branch
from
October 12, 2026 20:24
6eeae32 to
b1ce995
Compare
dhruva-vapi
marked this pull request as ready for review
October 12, 2026 20:24
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
scott-lowe-vapi
approved these changes
Oct 12, 2026
scott-lowe-vapi
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Tests pass (10/10) and tsc --noEmit is clean. The labeling trigger is safe: it only labels when latestVersion changes, so deduplicated pushes and orgs without versioning are skipped. Reusing the drift check's GET for the "before" payload is a nice touch.
Non-blocking suggestions:
- Memoize
versionActorResolve. It spawns 3–5gitsubprocesses per assistant, but the actor and commit can't change mid-push. - Possible noisy diffs.
changedFieldPathscompares a GET payload with a PATCH response viaJSON.stringify. If key order or returned fields differ between the endpoints, it will report changes that didn't happen. A sorted-key stringify would cover the ordering case. - Silent skip when the GET fails. If
platformPayloadForSnapshotstays undefined, the version gets no label at all. Labeling it with "fields unknown" would keep the audit trail complete. - Double space in
changedFieldsLine. When even the first path doesn't fit (e.g. a long actor name), the output isChanged: (+N more). - Email visibility. The local fallback to
git config user.emailputs emails in version metadata that the whole org can see. Consider tryinguser.namefirst. - Nits. The
{ ...metadata }spread is unnecessary, and thecountAuthoredAssistantRefsreformat is unrelated to this PR.
Contributor
Author
Merge activity
|
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.

Value
V.A.L.U.E. tier: small. It is a behavior change: push sends one extra PATCH per published assistant version. Linear: PRISM-2038.
createdByis null), and the audit log only covers dashboard users. So nobody can tell who published a version, from which commit, or what changed.PATCH /assistant/:id/versions/:versionwith:versionName:gitops <commit>[+dirty] by <actor>versionDescription: the actor, the commit, and the dotted paths of the changed fields (model.messages, voice.voiceId), within the API's 80 and 500 character limitsVAPI_GITOPS_ACTOR, elsegithub:$GITHUB_ACTOR, elsegit config user.email. It is self-reported.latestVersiondid not move). A failed label logs a warning and never fails the push.docs/learnings/sync-behavior.mdgets an "Assistant version labels" section.gitops <sha> by <email>, described withChanged: model.messages. It fails if a push errors because of the label, or if a no-op push labels anything.VapiAI/vapi.Small edit since first push: rebased onto current main, preserving both reference validation and version labeling, and sorted the imports.
Evidence of value
tests/version-metadata.test.tscover the field diff, the server-key filter, truncation within the API limits, and the actor resolution order.v1namedgitops 6eeae32+dirty by …, describedCreated by gitops.v2describedChanged: firstMessage, model.messagesv3createdBywasnullon both versions, which confirms the gap this PR fillsTesting plan
npm test: 546 pass, 0 fail (10 new)npx tsc --noEmit: cleannpm run push -- <sandbox-org>after editing one assistant prompt, on a versioning-enabled org. Confirm the new version's name and description inGET /assistant/:id/versions/:version, and that a second push with no edits adds no label.