Skip to content

fix(sip): QA blockers and high-severity defects - #91

Merged
Priyanshu (priyanshu-plivo) merged 2 commits into
mainfrom
fix/sip-v2-qa
Sep 19, 2026
Merged

Priyanshu (priyanshu-plivo) merged 2 commits into
mainfrom
fix/sip-v2-qa

Conversation

@priyanshu-plivo

Copy link
Copy Markdown
Contributor

Fixes all 5 blockers and all 5 highs from the V2 QA pass. Mediums and the low are deliberately left for a follow-up.

Blockers

1 · sip * delete ran its dependency check only when refusing. With --yes there was no pre-flight read at all. Worse than reported: deleting an in-use URI cascade-deletes the trunks pointing at it — I reproduced this on a live account and destroyed a real trunk with it. The read now always runs; --yes skips the confirmation only.

2 · sip trunks update 400'd on every flag except --status and --secure. The API requires trunk_direction on every update and the CLI never sent it. Read from the trunk now, with --direction as an override.

3 · diagnose exited 0 when it failed. The stream succeeds and carries a failure message, so there was no protocol-level error. It now keys off the assistant ending the turn in escalate_to_support — an investigation that files a ticket did not diagnose anything. Not prose matching.

4 · The ticket claim was true. The tool stream shows escalate_to_support actually running, so every sip calls diagnose on a trunk call files a real support ticket. Ruled out in the request; the durable fix is in the debugger prompt.

5 · "Reload the Plivo Console" to a terminal user. Same mechanism.

High

6 -o json ignored by every update/delete — empty stdout, prose on stderr, exit 0
7 trunk_domain missing from create -o json, present in table mode
8 credentials update presented --password-stdin as optional; the API rewrites the password every update, so omitting it blanks it
9 numbers update --trunk-id skipped its outbound guard under --dry-run, so the preview showed a request the real run refuses
10 uris create took --password on argv. Now stdin-only like credentials, and rotatable on update

Testing

Full suite 17 packages / 0 fail, golangci-lint 0 issues. Blockers 1, 2 and 9 verified live against an account with real trunk traffic.

Every fix has a negative control — breaking it fails the matching test. One control initially passed because gofmt had realigned my anchor; re-run with a regex anchor, it fails correctly.

Not in this PR

Mediums 11-15 (client-side validation, enum rejection, error rendering, --limit/--all, objects: null) and upstream 16 (trunks list omitting a trunk get returns — reproducible through the raw API, so not a CLI bug).

Blockers:
- delete ran its dependency read only on the refusal path, so --yes
  deleted silently. Deleting an in-use URI cascade-deletes the trunks
  using it, which is what that read exists to surface.
- trunks update never sent trunk_direction, which the API requires on
  every update, so every flag but --status and --secure 400'd.
- diagnose exited 0 on failure, and the assistant filed support tickets
  and offered console-only remedies to terminal users.

High:
- -o json ignored by every update and delete
- trunk_domain missing from create -o json
- credentials update presented a required password flag as optional
- uris create took a password on argv
- numbers update --trunk-id skipped its guard under --dry-run
Third instance of the same API shape: a write is refused unless it
restates a field it is not changing. The URI update demands both
authentication_needed=true and a username alongside a password, so
--password-stdin alone always failed. Both are now carried across.
@priyanshu-plivo
Priyanshu (priyanshu-plivo) merged commit 7cbd8e4 into main Sep 19, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant