Repository navigation
feat(promote): add rollout config, traffic-allocation client and splitting probe - #86
Open
scott-lowe-vapi wants to merge 1 commit into
Open
scott-lowe-vapi wants to merge 1 commit into
scott-lowe-vapi wants to merge 1 commit into
Conversation
…tting probe An org in promotion.yml can now declare rollout: (steps and interval). This adds the parsing, a config-free traffic-allocation client whose writes each carry their own x-vapi-client command (rollout-pin, rollout-step, ...), and an --apply check that every rollout org has traffic splitting enabled. The next commits use them to ramp a promotion instead of cutting over at once. Part of DEPLOY-205. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This was referenced Oct 31, 2026
Open
scott-lowe-vapi
marked this pull request as ready for review
October 31, 2026 05:33
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.

Support partial GitOps promotions using traffic splitting
Part of DEPLOY-205: opt-in gradual rollouts (1 → 5 → 10 → 25 → 50 → 100%) for promotions, built on traffic allocations. 1 of 5; this PR changes no promotion behaviour.
What changes
rollout:in promotion.yml (src/promotion.ts): per destination org,steps(default[1, 5, 10, 25, 50, 100]) andintervalMinutes(default 30, at least 15). Steps must increase, end at 100, and have at most three decimal places (the API's 0.001% granularity). Unknown keys fail, like the rest of the org block.src/rollout-api.ts: a config-free traffic-allocation client (assistant latest version and Vapi for CX lock, latest allocation, compare-and-set create, per-org probe). Writes retry only on 429, because a 5xx may follow a committed write.src/user-agent.ts): each allocation write sends its ownx-vapi-clientcommand (rollout-pin,rollout-step,rollout-complete,rollout-hold,rollout-abort,rollout-release,rollout-restore), so the platform's[traffic] allocation savedevent says which kind of write it was (paired with VapiAI/vapi#25250, which adds the split shares). OnlyrolloutjoinsCOMMANDS, so an env var can't label a whole processrollout-abort.promote --applychecks every rollout org has traffic splitting (a per-org beta) before anything applies.DEFAULT_BASE_URLis now exported once fromvapi-client.tsinstead of being copied intopromotion-gate.tsandcheck-cmd.ts.Evidence
tests/rollout-config.test.ts(defaults, custom values, 11 rejections),tests/rollout-api.test.ts(labels, no 5xx retry on writes, 404/403 handling, 409 classification against a local HTTP stub) andtests/promote-rollout.test.ts(probe refuses before any child runs, plans make no API calls).npm run buildandnpm testpass: 609 tests.🤖 Generated with Claude Code