Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This was referenced Oct 22, 2026
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/session-helpers
branch
from
October 23, 2026 21:15
f6e6bad to
d9700da
Compare
dowski
force-pushed
the
dowski/compute-refresh-token-expiry
branch
from
October 23, 2026 21:15
2691f47 to
3f654c4
Compare
commit: |
dowski
force-pushed
the
dowski/compute-refresh-token-expiry
branch
from
October 26, 2026 23:27
3f654c4 to
5658f9e
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/compute-refresh-token-expiry
branch
from
October 26, 2026 23:53
c0c444a to
af785e7
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 26, 2026 23:54
b31e38f to
ffe383c
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 27, 2026 14:51
ffe383c to
ccb9abb
Compare
dowski
force-pushed
the
dowski/compute-refresh-token-expiry
branch
from
October 27, 2026 14:51
af785e7 to
82f3d10
Compare
dowski
force-pushed
the
dowski/compute-refresh-token-expiry
branch
from
October 27, 2026 15:03
82f3d10 to
7ddc492
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 27, 2026 15:04
ccb9abb to
5a2e1cd
Compare
dowski
force-pushed
the
dowski/compute-refresh-token-expiry
branch
from
October 28, 2026 18:49
7ddc492 to
d0730ba
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 28, 2026 18:49
5a2e1cd to
30421d4
Compare
dowski
marked this pull request as ready for review
October 28, 2026 20:32
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/core/src/component/expiry.ts">
<violation number="1" location="packages/core/src/component/expiry.ts:32">
P2: `NaN` and `Infinity` pass this check, and a non-finite refresh TTL makes the refresh expiry comparison always false. Reject non-finite TTLs here with `Number.isFinite` so misconfiguration cannot create non-expiring sessions.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| args.accessTokenTtlSeconds ?? DEFAULT_ACCESS_TOKEN_TTL_SECONDS; | ||
| const refreshTokenTtlSeconds = | ||
| args.refreshTokenTtlSeconds ?? DEFAULT_REFRESH_TOKEN_TTL_SECONDS; | ||
| if (accessTokenTtlSeconds <= 0 || refreshTokenTtlSeconds <= 0) { |
There was a problem hiding this comment.
P2: NaN and Infinity pass this check, and a non-finite refresh TTL makes the refresh expiry comparison always false. Reject non-finite TTLs here with Number.isFinite so misconfiguration cannot create non-expiring sessions.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/core/src/component/expiry.ts, line 32:
<comment>`NaN` and `Infinity` pass this check, and a non-finite refresh TTL makes the refresh expiry comparison always false. Reject non-finite TTLs here with `Number.isFinite` so misconfiguration cannot create non-expiring sessions.</comment>
<file context>
@@ -0,0 +1,61 @@
+ args.accessTokenTtlSeconds ?? DEFAULT_ACCESS_TOKEN_TTL_SECONDS;
+ const refreshTokenTtlSeconds =
+ args.refreshTokenTtlSeconds ?? DEFAULT_REFRESH_TOKEN_TTL_SECONDS;
+ if (accessTokenTtlSeconds <= 0 || refreshTokenTtlSeconds <= 0) {
+ throw new Error("Token TTLs must be positive.");
+ }
</file context>
Suggested change
| if (accessTokenTtlSeconds <= 0 || refreshTokenTtlSeconds <= 0) { | |
| if ( | |
| !Number.isFinite(accessTokenTtlSeconds) || | |
| !Number.isFinite(refreshTokenTtlSeconds) || | |
| accessTokenTtlSeconds <= 0 || | |
| refreshTokenTtlSeconds <= 0 | |
| ) { |
The refresh-token lifecycle helpers (lookup, issuing, redeeming, pruning, and deleting a session) move to component/sessions.ts, along with the constants they use, and the TTL config and expiry helpers move to component/expiry.ts. A newestIssuedToken helper is pulled out of listSessions. No behavior change. This prepares the helpers for a session cleanup loop that needs them outside the public functions. refreshTokenExpiresAt now takes the refresh-token TTL in seconds rather than the whole config, since the loop will only have that value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dowski
force-pushed
the
dowski/compute-refresh-token-expiry
branch
from
October 28, 2026 20:42
d0730ba to
a712847
Compare
dowski
force-pushed
the
dowski/session-helpers
branch
from
October 28, 2026 20:42
30421d4 to
57d586a
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.

This is just a reorganization ahead of making use of the helpers and constants in an upcoming batch worker based cleanup loop.