Skip to content

Bound unauthenticated resolution work before peer scans and table eviction - #26

Merged
ekarulf merged 2 commits into
mainfrom
codex/issue-20
Dec 3, 2026
Merged

ekarulf merged 2 commits into
mainfrom
codex/issue-20

Conversation

@ekarulf

@ekarulf ekarulf commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Check a transport source's allowance before charging the shared ClientHello resolution budget. Source-table allocation, eviction, and peer enumeration occur after admission. Periodic cleanup owns full-table expiry, and accessed transcripts and replay records are checked for expiration. Completed acknowledgement retries are excluded from unfinished-handshake quotas.

Tests exercise a valid renewal while another source is at its limit, revocation during a retry, and source-table behavior at capacity. The protocol race suite passed twice and go vet passed. The design and protocol documents describe the processing order and budgets.

Fixes #20.

ekarulf commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Rework requested before merge.

Please preserve the per-source limit when charging the shared resolution budget. Server.Handle currently spends a global token before checking an existing source's bucket, so traffic already over its individual allowance still consumes capacity needed for other clients' renewals. Check an existing source's allowance before spending the shared token while keeping new-source allocation, eviction and tag enumeration behind the global bound. Please cover a legitimate renewal alongside a source already at its limit and update the processing-order descriptions in PROTOCOL.md and DESIGN.md. When rebasing onto #25, preserve both the expiry check and the exclusion of completed retries from unfinished-handshake quotas.

@ekarulf
ekarulf marked this pull request as ready for review December 3, 2026 08:27
@ekarulf
ekarulf merged commit a679083 into main Dec 3, 2026
7 checks passed
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.

Bound pre-authentication work before cache sweeps and peer-tag resolution

1 participant