test(auth): add regression coverage proving access/refresh token expiry is config-driven - #170
Merged
Merged
Conversation
…ry is config-driven Closes #155. The production fix was already live on staging since commit f355e2f (2026-08-21) — both jwtSign() call sites (login, refresh) already pass TOKEN_EXP_IN/TOKEN_REFRESH_EXP_IN — but no test ever decoded a real issued JWT to prove exp/iat actually reflects the configured duration, and the diagram node was never backfilled. - src/__tests__/auth/tokenExpiry.test.ts: uses the real jwtSign/ jwtVerify (unmocked) and real config, decodes issued tokens, and proves access vs refresh tokens get 2 distinct, config-driven lifetimes (not a shared hardcoded default), plus regression checks for both fallback defaults ('1h' access, '7d' refresh). - agent-hub: backfill evidence (implementer + verifier) and seal node fix-refresh-token-expiry-unused. npm test: 143 passed, 143 total (independently re-run by the verifier subagent). npm run build: clean. Node: fix-refresh-token-expiry-unused (SEALED) Evidence: agent-hub/evidence/implementer/2026-09-28/fix-refresh-token-expiry-unused-plan.md, agent-hub/evidence/verifier/2026-09-28/fix-refresh-token-expiry-unused-seal.md Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Merged
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
Closes #155. The production fix was already live on
stagingsince commitf355e2f(2026-08-21) — bothjwtSign()call sites (login, refresh) already passTOKEN_EXP_IN/TOKEN_REFRESH_EXP_IN— but no test ever decoded a real issued JWT to proveexp/iatactually reflects the configured duration, and the diagram node was never backfilled.src/__tests__/auth/tokenExpiry.test.ts— uses the realjwtSign/jwtVerify(unmocked) and real config, decodes issued tokens, and proves access vs refresh tokens get 2 distinct, config-driven lifetimes (not a shared hardcoded default), plus regression checks for both fallback defaults (1haccess,7drefresh).agent-hub/: backfilled evidence (implementer + verifier) and sealed nodefix-refresh-token-expiry-unused.Commits
Test plan
npm test— 143 passed, 143 total (independently re-run by the verifier subagent)npm run build— clean🤖 Generated with Claude Code