fix(den): tolerate concurrent MCP token refresh - #2963
Merged
benjaminshafii merged 1 commit intoJul 22, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
fraimz — ✅ PASSED1 passed · 0 failed · 0 skipped — run Full frame proof with validated screenshots: ✅ mcp-oauth-refresh-lifecycle — MCP OAuth refresh lifecycle remains observable under rapid expiryInternal demo
|
benjaminshafii
merged commit Jul 22, 2026
f60f358
into
fix/mcp-refresh-lifecycle-harness
14 checks passed
benjaminshafii
added a commit
that referenced
this pull request
Jul 22, 2026
* test(den): cover MCP OAuth refresh lifecycle * fix(den): tolerate concurrent MCP token refresh (#2963)
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
invalid_grantSecurity tradeoff
Only refresh-token hashes are stored, so Den cannot replay the first plaintext successor. During the 30-second overlap, possession of the previous token can issue another normal rotating successor with its own 30-day inactivity window. This is deliberately bounded in time and documented. Replay after 30 seconds still invalidates the full family.
Validation
pnpm --filter @openwork-ee/den-api exec bun test --conditions development test/mcp-token-lifetime.test.ts test/mcp-auth.test.ts test/mcp-access-token-contract.test.ts test/auth-mcp-resource-normalization.test.ts test/mcp-oauth-refresh-flow.test.ts— 23 passed, 0 failedDEN_MCP_REFRESH_LIFECYCLE_CHILD=1 pnpm --filter @openwork-ee/den-api exec bun test --conditions development --timeout 20000 test/mcp-oauth-refresh-lifecycle.test.ts— 4 passed, 0 failedpnpm --filter @openwork-ee/den-api exec bun test --conditions development --rerun-each=3 --timeout 20000 test/mcp-oauth-refresh-lifecycle.test.ts— 3 passed, 0 failedpnpm --filter openwork-server exec bun test src/opencode-plugins/openwork-capabilities-knowledge.test.ts— 4 passed, 0 failedpnpm --filter @openwork-ee/den-api exec tsc --noEmit— passednode scripts/check-connect-installer-parity.mjs— passedpnpm install --force --frozen-lockfile— passed; linked patched package inspectedpnpm fraimz --flow mcp-oauth-refresh-lifecycle— Passed, 1/1 claimsStack
Depends on #2952, which adds the lifecycle regression harness and is fully green.