Skip to content

fix(auth): reclaim expired nonces behind unexpired ones - #464

Merged
scttbnsn merged 1 commit into
dev/v1.0from
fix/nonce-scan-all
Nov 3, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.0from
fix/nonce-scan-all

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

CodeRabbit pass 2 on #462: after a backward wall step, insertion order stops matching expiry order, and the eviction loop stopped at the first unexpired entry. At capacity, that rejected valid requests with nonce-capacity until the clock caught up. Eviction now scans the whole list, which is bounded by capacity.

Checked: go test -race on auth (nonce.go at 100%) and a new test for an expired entry behind an unexpired one.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 8aa810c and 381d8e2.

Files selected for processing: 2
  • internal/auth/nonce.go
  • internal/auth/nonce_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by orchestrator: eviction scans the full list with next captured before removal; test covers an expired entry behind an unexpired one at capacity.

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by orchestrator: eviction scans the full list with next captured before removal; test covers an expired entry behind an unexpired one at capacity.

@scttbnsn
scttbnsn merged commit 325ba59 into dev/v1.0 Nov 3, 2026
39 checks passed
@scttbnsn
scttbnsn deleted the fix/nonce-scan-all branch November 6, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants