Skip to content

The last connection on a shared sign-in says it was revoked - #109

Merged
gabosarmiento merged 1 commit into
mainfrom
shared-signin-words
Nov 5, 2026
Merged

gabosarmiento merged 1 commit into
mainfrom
shared-signin-words

Conversation

@agentgabo

Copy link
Copy Markdown
Contributor

Change

When the last connection on a sign-in it reused is disconnected, planque revokes that sign-in (since #108). Its record still read "the sign-in it used stays with the connection it came from". It now says what happened:

  • "the sign-in it shared was revoked, no other connection used it";
  • for a key, "the key it shared was deleted, no other connection used it".

A reused connection whose sign-in another still uses reads as before.

Validation

TestASecondGrantReusesTheSignIn now pins the last connection's record in both subtests (a key and a vendor sign-in). gofmt is clean; go vet ./... and go test -race ./... pass.

Compatibility and rollout

Only the words of one event change. Deploy with the next planque release.

🤖 Generated with Claude Code

Disconnecting the last grant on a sign-in it reused revokes that sign-in, but
its record still said the sign-in stays with the connection it came from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@gabosarmiento gabosarmiento 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.

Approved at 446e5a3: revokedShared is set only after the shared token is revoked and dropped, so the early return for a live owner still reads "stays". This covers my note on #108.

@kiff-qa kiff-qa 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.

qa-kiff, 21:58 Paris. Approved at 446e5a3.

The change. The last connection on a shared sign-in now says what happened: "the sign-in it shared was revoked", or "the key it shared was deleted" for a key. Before, it said "the sign-in it used stays with the connection it came from", which was untrue once revokeLastOnShared revoked it. The flag is set only after the vendor revoke and the token drop both succeed. It isn't stored.

Checks. go vet passes, and go test ./internal/planque/ passes locally. Both new assertions are in TestASecondGrantReusesTheSignIn.

Non-blocking. When the shared token was already gone (errNotFound on open), it still says "revoked", though nothing was revoked at the vendor this time. That's harmless: the sign-in is gone either way.


Generated by Claude Code

@gabosarmiento
gabosarmiento merged commit 6a9f449 into main Nov 5, 2026
1 check passed
@gabosarmiento
gabosarmiento deleted the shared-signin-words branch November 5, 2026 20:59
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