Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Oct 22, 2026
dowski
force-pushed
the
dowski/expired-session-cleanup
branch
from
October 23, 2026 21:15
cef4129 to
fad1b09
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 23, 2026 21:15
f6e6bad to
d9700da
Compare
commit: |
dowski
force-pushed
the
dowski/expired-session-cleanup
branch
from
October 26, 2026 23:27
fad1b09 to
bea4c24
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 26, 2026 23:27
d9700da to
2df0640
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 26, 2026 23:44
2df0640 to
b31e38f
Compare
dowski
force-pushed
the
dowski/expired-session-cleanup
branch
from
October 26, 2026 23:44
bea4c24 to
1163bbc
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 26, 2026 23:54
b31e38f to
ffe383c
Compare
dowski
force-pushed
the
dowski/expired-session-cleanup
branch
from
October 26, 2026 23:54
1163bbc to
62e5b0d
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 27, 2026 14:51
ffe383c to
ccb9abb
Compare
dowski
force-pushed
the
dowski/expired-session-cleanup
branch
from
October 27, 2026 14:51
62e5b0d to
fe36e11
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 27, 2026 15:04
ccb9abb to
5a2e1cd
Compare
dowski
force-pushed
the
dowski/expired-session-cleanup
branch
from
October 27, 2026 15:04
fe36e11 to
fc0aa85
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 28, 2026 18:49
5a2e1cd to
30421d4
Compare
dowski
force-pushed
the
dowski/expired-session-cleanup
branch
from
October 28, 2026 18:49
fc0aa85 to
99bceed
Compare
A session's row was only deleted when its expired refresh token was presented again, so a session nobody came back to kept its row, which getSession reads for liveness, and its token rows forever. The core component now mounts @convex-dev/batch-worker and runs a loop that scans the issued refresh tokens oldest first (a new by_state index) and erases each session whose newest issued token is past the TTL. An expired token that is not its session's newest is a sibling whose response was lost, so only that token is erased. When nothing is expired, the loop sleeps until the oldest issued token expires, for at most a day. The loop has no caller to pass it the TTL, so sign-in and refresh store the refresh-token TTL in a one-row ttlConfig table when it differs from the stored one, and ping the loop on a change. Each run reads the stored TTL, so a lowered or a raised TTL applies to every session. A new session also pings the loop; a plain refresh doesn't, since it only pushes its session's expiry later. refresh still enforces expiry against the TTL of its own call: the loop only removes rows of sessions that can no longer refresh, and it may lag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 28, 2026 20:42
30421d4 to
57d586a
Compare
dowski
force-pushed
the
dowski/expired-session-cleanup
branch
from
October 28, 2026 20:42
99bceed to
37d0505
Compare
This branch was successfully deployed
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.

A session's row was only deleted when its expired refresh token was
presented again, so a session nobody came back to kept its row, which
getSession reads for liveness, and its token rows forever.
The core component now mounts @convex-dev/batch-worker and runs a loop
that scans the issued refresh tokens oldest first (a new by_state index)
and erases each session whose newest issued token is past the TTL. An
expired token that is not its session's newest is a sibling whose
response was lost, so only that token is erased. When nothing is expired,
the loop sleeps until the oldest issued token expires, for at most a day.
The loop has no caller to pass it the TTL, so sign-in and refresh store
the refresh-token TTL in a one-row ttlConfig table when it differs from
the stored one, and ping the loop on a change. Each run reads the stored
TTL, so a lowered or a raised TTL applies to every session. A new session
also pings the loop; a plain refresh doesn't, since it only pushes its
session's expiry later.
refresh still enforces expiry against the TTL of its own call: the loop
only removes rows of sessions that can no longer refresh, and it may lag.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com