Repository navigation
hosted agents: carry deletion_protected on connections (MARSOHS-2173) - #1171
Merged
SSharma-10 merged 1 commit intoOct 16, 2026
Merged
SSharma-10 merged 1 commit into
SSharma-10 merged 1 commit into
Conversation
harness-api returns deletion_protected on every connection object, but HostedAgentConnection had no such field, so encoding/json discarded it and no client could read it. Add DeletionProtected, without omitempty, matching the server. A client can now tell a connection that is safe to revoke from one an agent environment depends on. Blast radius: client library only, no service behaviour changes; no customer-visible change until a consumer renders the field. Rollback: revert; consumers pinned to an older godo are unaffected. MARSOHS-2173 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
SSharma-10
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
harness-api returns
deletion_protectedon every connection object, butHostedAgentConnectionhas no such field, soencoding/jsondiscards it and no client can read it. This PR addsDeletionProtected. A client can now tell a connection that is safe to revoke from one an agent environment depends on.Jira: MARSOHS-2173
Scope
type HostedAgentConnection struct { ID string `json:"id"` Provider string `json:"provider"` ProviderDisplayName string `json:"provider_display_name,omitempty"` ActorID string `json:"user_id"` Status string `json:"status"` OwningUserID string `json:"owning_user_id,omitempty"` + DeletionProtected bool `json:"deletion_protected"` CreatedAt *Timestamp `json:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` OAuth *HostedAgentConnectionOAuth `json:"oauth,omitempty"` }Out of scope: rendering the field in
doctl harness-runtime connections, which bumps godo after this releases (same ticket).Blast radius
🟢 Services: none, client library only · Customers: none; the field is read-only and additive.
Rollout
Decisions
bool, not*bool: the API sends the key on every connection, so a caller never has to tell "false" from "absent", and a pointer would put a nil check in every consumer.omitempty, which matches the server, so a consumer that re-marshals the struct cannot dropfalse.Evidence
go test .passes. Without the field the suite fails to build, andTestHostedAgents_ListConnectionsasserts the whole struct, so a later removal fails the suite.🤖 Generated with Claude Code