Skip to content

fix(storage): correct client-credential stage error and make forget atomic - #1419

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/low-1395-client-credentials
Sep 29, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
fix/low-1395-client-credentials

Conversation

@Dumbris

@Dumbris Dumbris commented Sep 29, 2026

Copy link
Copy Markdown
Member

Summary

Addresses items 1-3 of the Spec 108-c review follow-ups:

  • StageClientCredentialRotation now returns a new ErrClientCredentialNotActive for a revoked/expired record instead of the inverse ErrClientCredentialActive.
  • ForgetClientCredential resolves and revokes inside a single bbolt transaction under the manager lock (same shape as the other client-credential mutations), so the returned record is the one actually revoked.
  • Adds the missing expired variant of "mint replaces revoked or expired", plus tests for the stage error classification and forget's persisted-record/not-found behavior.

Item 4 (FR-028 identity stamping at session initialize) is intentionally not part of this PR.

Refs #1395

StageClientCredentialRotation returned ErrClientCredentialActive for a
revoked/expired record (the opposite of reality); add
ErrClientCredentialNotActive. ForgetClientCredential now resolves and
revokes in one bbolt transaction under the manager lock, so a concurrent
mint cannot leave it revoking a newer record and returning a stale one.
Add the missing expired-variant test for mint replacement.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 72.72727% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/storage/client_credentials.go 72.72% 3 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: fix/low-1395-client-credentials

Available Artifacts

  • archive-darwin-amd64 (30 MB)
  • archive-darwin-arm64 (27 MB)
  • archive-linux-amd64 (18 MB)
  • archive-linux-arm64 (16 MB)
  • archive-windows-amd64 (30 MB)
  • archive-windows-arm64 (27 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (24 MB)
  • installer-dmg-darwin-arm64 (22 MB)
  • smart-mcp-proxymcpproxy-goOG3K4C.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 36572654419 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@github-actions github-actions Bot 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 (Model B): Paperclip review verdicts = ACCEPT and qa-gate green at this head SHA. Arming auto-merge; GitHub merges when all required checks pass.

@github-actions
github-actions Bot merged commit e196a0d into main Sep 29, 2026
40 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.

2 participants