Skip to content

agents: document strict provider connection create and reconnect (MARSOHS-2480) - #1319

Merged
DO-rrao merged 3 commits into
digitalocean:mainfrom
BadhriDO:harness-provider-connection-strict-create
Nov 13, 2026
Merged

DO-rrao merged 3 commits into
digitalocean:mainfrom
BadhriDO:harness-provider-connection-strict-create

Conversation

@BadhriDO

Copy link
Copy Markdown
Contributor

Summary

Connection create for Harness Runtime is now strict (AR-3404 / MARSOHS-2480). If the actor already has an active, pending, or expired connection for the provider, POST /v2/agents/auth/{provider}/connections returns 409 instead of resuming it. The spec still describes the old behaviour, so the generated clients (dots, pydo) document it wrongly.

  • Create (agents_create_provider_connection.yml): the description no longer says "Creates, or resumes". It explains the one-connection-per-actor rule and points to reconnect, and the 409 is now documented.
  • Reconnect (agents_reconnect_provider_connection.yml): the description now says what reconnect does. It resumes a pending authorization, or restarts an expired or revoked connection. The connection keeps its id, user_id and scopes. An active connection is returned unchanged, and only the owning member can reconnect.

No paths, parameters or schemas change. The 409 reuses the file's existing rate-limit headers and the error schema, the same way delete documents its 409.

Production behaviour

Checked against production on 2026-11-11: calling create for an actor that already has an active connection returns

HTTP 409
{"id":"conflict","message":"already exists: a connection already exists for this provider and actor; use reconnect or update, or delete it before changing credentials", ...}

The duplicate check runs before any scope or credential check, so with strict create this is the only conflict the public create returns.

The reconnect route itself was documented and tested against production in #1301. The SDKs already have it: dots since v1.22.0, pydo through both its hand-written client and its generated client, godo since v1.234.0, and doctl through a PR in review.

Test plan

  • Both changed files parse as YAML, and the 409's *id001 header alias resolves.
  • Spectral lint. I didn't run it locally and am leaving it to this PR's CI.

🤖 Generated with Claude Code

…SOHS-2480)

Connection create no longer resumes an existing connection: if the actor
already has an active, pending, or expired connection for the provider,
it returns 409 (AR-3404). Update the create description, which still
said "Creates, or resumes", document the 409, and say what reconnect
does: resume a pending authorization or restart an expired or revoked
connection, keeping its id, user_id and scopes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BadhriDO
BadhriDO marked this pull request as ready for review November 11, 2026 06:10
- Create: revoked connections don't count toward the one-per-actor
  limit; if the actor's only connection is revoked, create restarts it
  under the same id with the request's scopes, so delete then create is
  how to change scopes. Point the 409 at the list route (filtered by
  user_id) to find the id to reconnect. A successful create returns the
  connection as pending with an authorization object, and the 200 text
  says so.
- Reconnect: a caller who doesn't own the connection gets 404, the same
  as for an unknown connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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