Skip to content

SPI: let core refresh a connection's identity (handle empty after plugin migrations) #661

Closed

Description

@gorlix

Follow-up to Paca-AI/paca-plugin-gitlab#6 (the GitHub provider's 0002 has the same gap).

Problem

The plugin migrations create git_identities rows with an empty handle, because the token's user is only known after calling the platform. The plugin completes its own record on first use, but core never learns the result: the migrated connection stays nameless in Settings → Git, and anything that relies on the handle (mentions, addressing) doesn't match it.

The SPI has no way to ask for it: an Identity only comes back from CompleteIdentitySetup.

Proposal

  • plugin-sdk-go: an optional DescribeIdentity(ctx, {Identity IdentityRef}) (Identity, error), advertised by a capability so existing providers are unaffected. Additive, stays gitprovider.v1.
  • Core: when a connection's handle is empty and the provider has the capability, call it once (lazily, e.g. when listing connections), save handle / display name / expiry, and carry on if it fails.
  • GitLab and GitHub providers: implement it with the completion they already do on first use.

I can send the three PRs once you're OK with the shape.

Activity

  1. pullfrog commented on Oct 29, 2026

    @pullfrog
    Contributor
  2. pikann commented on Oct 29, 2026

    @pikann
    Contributor

    Thank you so much for pointing this out! Please feel free to open the PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions