test(promotion): pin the exact files promoting an assistant writes to the target - #68
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
… the target A golden test for the path that moves assistants from a lower org into production. One staging → prod promotion through promotionPlanBuild and promotionPlanApply, asserting the plan and every file left in the target org: - source UUIDs canonicalized to names (toolIds, handoff destinations); - referenced tools and assistants pulled in as dependencies, and an unreferenced staging-only tool left behind; - credential bindings by name, and a phone number bound to the target's; - a target file the source no longer has deleted, an unrelated target file untouched, the markdown prompt body preserved; - the source org never written. A second test re-plans after the apply and expects no changes. This changes no behaviour: it is a baseline for the promotion changes stacked above it, which must pass it unchanged. Refs TEST-141 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 3, 2026
Contributor
Author
scott-lowe-vapi
marked this pull request as ready for review
October 3, 2026 06:30
This was referenced Oct 3, 2026
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 — a tests-only baseline under the remaining promotion changes for TEST-141 (TEST-141). It changes no behaviour. It's small rather than micro because it guards a blast-radius path: promotion into production.
Problem: the code that moves assistants from a lower org into production is the riskiest path in gitops. The existing tests check pieces of it (canonicalization, bindings, deletions) but never the full set of files a promotion writes. So a refactor could change what lands in prod without any test failing.
Who it affects: teams that promote resources between orgs (dev → staging → prod), and reviewers of the promotion changes stacked above this (fix(promotion): commit the files of transitions that applied when a later one fails #65, feat(promotion): gate promotion out of an org on a passing check #66), which now have to pass this test unchanged.
What changes: new
tests/promotion-golden.test.ts. It runs one staging → prod promotion throughpromotionPlanBuildandpromotionPlanApply, then asserts the plan and every file left in the target org:toolIds, a handoff destination);A second test re-plans right after the apply and expects no changes.
Evidence of value
Mutation check: each deliberate break of
src/promotion.tsturns the test red, and it's green again once the break is reverted.main)The expected output was read line by line against promotion's documented behaviour before it was pinned.
Tests:
npm testgoes from 474 to 476 passing.Testing plan
tests/promotion-golden.test.ts: the golden promotion, and idempotence on re-plan.pull/applyprocesses (this exercises the file-writing core, not the CLI);Base of the promotion stack: #68 ← #65 ← #66.
Refs TEST-141
🤖 Generated with Claude Code