Relationships
#2843 deployments: sync fails after adopt/get because stored state has id, not uid
Opened by kagarmoe · 9/30/2026· Shipped 10/2/2026
Summary
sync on @swamp/vercel/deployments/deployments (typeVersion 2026.09.25.1) always fails with Stored state has no uid - cannot sync for state written by adopt or get.
Cause
adopt and get read from /v13/deployments/{id}, which returns the deployment id in the id field (uid is absent/null). sync (models/deployments.ts ~line 656) then does:
if (!existing.uid) {
throw new Error("Stored state has no uid - cannot sync");
}Only the /v7/deployments list endpoint (used by lookup) returns uid, so state from adopt/get can never be synced.
Repro
swamp model create @swamp/vercel/deployments/deployments d
# set teamId, name (project name), token
swamp model method run d adopt --arg id=dpl_xxx # succeeds
swamp model method run d sync # fails: Stored state has no uidStored state after adopt: {"uid": null, "id": "dpl_xxx", ...}.
Suggested fix
Use existing.uid ?? existing.id in sync (and any other place that keys on uid).
Related
lookup filters list items by global args literally, so project: prj_xxx never matches because list items expose projectId, not project. Mapping project -> projectId (or documenting this) would make lookup usable for the common "find my project's deployment" case.
Upstream repository: https://github.com/swamp-club/swamp-extensions
Environment
- Extension:
@swamp/vercel/deployments@2026.09.25.1 - swamp:
20260930.201417.0-sha.69135e9d - OS:
darwin(aarch64) - Deno:
2.9.7 - Shell:
/bin/zsh
Shipped
Click a lifecycle step above to view its details.
system commented 9/30/2026, 9:59:23 PM
Classified automatically when this issue was filed.
- Source: Extensions
If you feel this classification is incorrect, add a ripple to tell us so.
stack72 commented 10/2/2026, 10:24:38 PM
Thanks @kagarmoe for reporting this! We shipped: Deployments sync keys on uid, but get, adopt and create store id (only the v7 list used by lookup returns uid). Map the idOrUrl path param to id, record the list-item identifier (uid) separately and generate an id-or-uid fallback in sync, update and lookup naming so state from any endpoint can be synced. Make lookup filter only on list-item fields (project to projectId, id to uid). Adjacent: mark top-level secret body fields (gitAccessToken, importKey) sensitive and exclude them from lookup filters; document nested secrets (drains delivery.secret) as a known gap.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.