Skip to content

fix(auth): skip renewal for non-expiring sandbox JWTs - #3686

Merged
pimlock merged 1 commit into
mainfrom
skip-nonexpiring-session-refresh/pm
Sep 25, 2026
Merged

pimlock merged 1 commit into
mainfrom
skip-nonexpiring-session-refresh/pm

Conversation

@pimlock

@pimlock pimlock commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stop the sandbox supervisor from renewing non-expiring local session JWTs roughly once per second. These tokens use exp = 0, which the refresh scheduler treated as already expired even though the gateway treats it as non-expiring.

Currently, tokens with exp = 0 cause a refresh every second, because the "is token expired" condition is met at all times.

image

Related Issue

No issue required: this is an obvious localized regression in the sandbox JWT refresh scheduler.

Changes

  • Stop the periodic refresh loop when the gateway session JWT has exp = 0.
  • Update the refresh-delay regression test to cover the non-expiring case while retaining coverage for expiring and expired tokens.
  • Document the behavior in the gateway architecture and configuration reference.

Testing

  • mise run pre-commit passes
  • mise run test passes, including the updated renewal test
  • OPENSHELL_E2E_DOCKER_TEST=sandbox_lifecycle mise run e2e:rust passes: CLI conformance and 15 sandbox lifecycle tests

Checklist

  • Follows Conventional Commits
  • Commit is signed off (DCO)
  • Architecture docs updated

@github-actions

Copy link
Copy Markdown

@pimlock pimlock added the test:e2e Requires end-to-end coverage label Sep 25, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied for ea90ab9. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@pimlock
pimlock force-pushed the skip-nonexpiring-session-refresh/pm branch from ea90ab9 to aff292f Compare September 25, 2026 03:03
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@drew
drew force-pushed the skip-nonexpiring-session-refresh/pm branch from aff292f to e625ae1 Compare September 25, 2026 03:21
@pimlock
pimlock added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit 5448fb4 Sep 25, 2026
106 checks passed
@pimlock
pimlock deleted the skip-nonexpiring-session-refresh/pm branch September 25, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants