feat(server-ng): enforce PAT limits and expose Prometheus metrics - #3773
Merged
Conversation
numinnex
previously approved these changes
Jul 30, 2026
Enforce max_tokens_per_user at PAT create ingress on both planes and add a real /metrics endpoint with legacy gauge parity. Binary-plane PAT rewrite errors used to be dropped silently (the client hung until timeout); they now return a typed deny. The segments gauge reports the correct scrape-time count instead of reproducing the legacy drift bug.
hubcio
force-pushed
the
feat/server-ng-pat-metrics
branch
from
July 30, 2026 09:50
955e378 to
7331626
Compare
numinnex
approved these changes
Jul 30, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3773 +/- ##
=============================================
- Coverage 75.72% 33.71% -42.02%
Complexity 969 969
=============================================
Files 1322 1321 -1
Lines 159363 140595 -18768
Branches 132746 114055 -18691
=============================================
- Hits 120684 47398 -73286
- Misses 35041 91895 +56854
+ Partials 3638 1302 -2336
🚀 New features to boost your workflow:
|
spetz
approved these changes
Jul 30, 2026
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.
Enforce max_tokens_per_user at PAT create ingress on both planes and
add a real /metrics endpoint with legacy gauge parity. Binary-plane
PAT rewrite errors used to be dropped silently (the client hung until
timeout); they now return a typed deny. The segments gauge reports the
correct scrape-time count instead of reproducing the legacy drift
bug.