Relationships
#3040 extension promote accepts a yanked version and reports it promoted
Opened by skunk-ape · 10/5/2026
Summary
swamp extension promote on a version that has been yanked succeeds. The server moves the yanked version's channel and the CLI prints a success line. A yanked version should not be promotable; the command should fail with an error naming the yank.
Reproduce
Against a local swamp-club stack (swamp-uat withRegistryRepoContext), with swamp 20261005.154947.0-sha.c61040d1 and swamp-club main at 0fdf5e8b:
swamp extension push <manifest> -y --accept-warnings --channel beta # @swampadmin/uat-adv-yanked-5b133fb3@2026.10.05.897
swamp extension yank @swampadmin/uat-adv-yanked-5b133fb3@2026.10.05.897 --reason test -y
swamp extension promote @swampadmin/uat-adv-yanked-5b133fb3 2026.10.05.897 --channel rcExpected
Non-zero exit with an error that says the version is yanked and cannot be promoted. The yanked version's channel stays as it was.
Actual
Exit 0:
[INF] extension·promote: Promoting...
[INF] extension·promote: Promoted "@swampadmin/uat-adv-yanked-5b133fb3"@"2026.10.05.897" from "beta" to "rc"Where
lib/app/promote-extension.ts promoteExtensionVersion loads the version record, which carries yankedAt, but never checks it. validatePromotion only checks channel order. updateVersionChannel then rewrites the yanked version's channel. The CLI (src/cli/commands/extension_promote.ts) has no client-side check either.
getLatestByChannel already filters yankedAt, so the promoted yanked version does not become the channel's latest. The defect is that the promote is accepted at all and reported as done.
UAT
swamp-uat tests/cli/adversarial/channel_adversarial_test.ts, "swamp extension channel — promote after yank fails gracefully", asserts the non-zero exit and fails today. It is skipped in CI because the adversarial workflow has no swamp-club checkout, so it only surfaces in a local run with SWAMP_CLUB_SOURCE_DIR. It also fails on a clean swamp-uat main, so it is not tied to any recent UAT change.
Open
No activity in this phase yet.
Sign in to post a ripple.