Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeshammz

Relationships

#2425 serve: vault annotate --label over --server is rejected (CLI sends labels as an object, protocol expects string[])

Opened by hammz · 9/23/2026· Shipped 9/23/2026

Description

swamp vault annotate <vault> <key> --label k=v --server <url> fails with:

invalid_request: payload.labels: expected array, received object

src/cli/commands/vault_annotate.ts builds labels with parseLabels, which returns a Record of label to value, and sends it as payload.labels. The serve protocol's VaultAnnotatePayload.labels is string[]. handleVaultAnnotate (src/serve/handlers/vault_handlers.ts) converts that array back into a Record with empty values, so even a matching shape would drop the label values.

Steps to reproduce

  1. Start swamp serve on a repo with a local_encryption vault that holds a secret.
  2. Run swamp vault annotate <vault> <key> --label team=infra --server http://127.0.0.1:<port>.
  3. The server rejects the request with the error above. --notes and --url work.

Expected

Labels (with their values) are applied over --server, the same as locally.

Found while reproducing swamp-club#2415 (log in /tmp/swamp-repro-issue-2415/logs/s2-vault-annotate-label-invalid-request).

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 10 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/23/2026, 8:20:03 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz9/23/2026, 7:34:47 PM

Sign in to post a ripple.