Skip to content

agents: show connection deletion protection (MARSOHS-2173) - #2059

Merged
SSharma-10 merged 1 commit into
digitalocean:mainfrom
BadhriDO:marsohs-2173-connection-deletion-protected
Oct 27, 2026
Merged

SSharma-10 merged 1 commit into
digitalocean:mainfrom
BadhriDO:marsohs-2173-connection-deletion-protected

Conversation

@BadhriDO

@BadhriDO BadhriDO commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

deletion_protected is the only field that tells a connection that is safe to revoke from one an agent environment depends on, and it reached no doctl output path: not -o json, not --format, not the styled card. This PR renders it in all three; godo carries the field as of v1.228.0 (#1171), which main already pins. Until now the only way to learn a connection's protection state was to attempt a revoke and read the error.
Jira: MARSOHS-2173

Scope

  $ doctl harness-runtime connections list
  ● alice
-   github · active · conn_protected
+   github · active · conn_protected · protected

  $ doctl harness-runtime connections get conn_protected
    Status    active
+   Protected yes

  $ doctl harness-runtime connections get conn_protected -o json
+   "deletion_protected": true,

  $ doctl harness-runtime connections list --format Actor,Protected
+ Actor    Protected
+ alice    true

Out of scope: the wording when a revoke is refused (MARSOHS-2184), and revoke --force, which needs a godo DeleteConnection that passes the flag harness-api already accepts.

Blast radius

🟡 Services: doctl connections output only · Customers: additive, but --no-header gains a seventh column, so a script that parses it positionally shifts; --format output is unchanged unless Protected is named.

Rollout

  • Rollback: revert the commit. No state and no stored data are involved.
  • Order: nothing must land first. main already pins godo v1.233.0, which carries the field, so this PR changes no dependency.

Decisions

  • Protected is unconditional in Cols(), unlike PauseReason: a column that appears only when something is protected leaves "not protected" indistinguishable from "not reported". The card prints Protected no for the same reason.
  • cardRowWidth is new because "Protected" is 9 characters and the shared card label column is 8; widening cardRow itself would move the value column on every agent card in doctl. (commands/agents.go)

Evidence

go test ./commands/... ./do/... ./internal/... passes except TestRegistryLogout, which fails on main too; gofmt, go vet and go build ./... are clean. Every output path above was checked against a stub harness-api, plus the cards for an unprotected and a pending connection, and --format Actor,ID,Provider,Status,Scopes is byte-identical to before. Not run from this commit: live production.

🤖 Generated with Claude Code

@BadhriDO
BadhriDO force-pushed the marsohs-2173-connection-deletion-protected branch from ac27eeb to 70040c7 Compare October 19, 2026 19:02
Comment thread go.sum Resolved
deletion_protected is the only field that tells a connection that is safe
to revoke from one an agent environment depends on, and it reached no
doctl output path. Add a Protected column to the connections displayer,
a Protected row to the detail card, and a protected marker to the styled
list. -o json carries the field from godo directly.

The detail card now pads labels to 9 characters, because "Protected"
does not fit the shared 8-wide column; cardRow keeps the old width for
every other agent card.

Blast radius: doctl connections output only; --no-header gains a seventh
column, --format output is unchanged unless Protected is named.
Rollback: revert; no state and no stored data are involved.

MARSOHS-2173

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@BadhriDO
BadhriDO force-pushed the marsohs-2173-connection-deletion-protected branch from 70040c7 to 22c3f72 Compare October 27, 2026 03:50

@SSharma-10 SSharma-10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SSharma-10
SSharma-10 merged commit 17b4bb2 into digitalocean:main Oct 27, 2026
6 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.

3 participants

⌂ 换网址