You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
admin: the limiter's error arm fails open where the capture and the wire fail closed, with no seam to test it #1190
Found by: the architecture lens in review round 6 of job 032-admin-console-parity (round-6/review-architecture.md, note 1). Non-blocking there — filed so it is tracked.
The admin limiter's error arm answers the request when the shared store fails (fails open). Both references fail closed: the wire's own test asserts it (crates/nostream-relay/tests/limits.rs:993-994, "fail closed"), and the capture leaves the limiter's await uncaught (admin-rate-limit-middleware.ts:17-21), so a store error is a 500, never an admitted request.
Two things are wanted together:
The admin path's answer on a limiter error made to match the wire's (fail closed).
A seam to test it. There is no with_limiter-style constructor on AdminState — state.rs:126,461-466 builds the concrete limiter itself — so a test cannot inject a failing store. The same seam would let RateLimitConfig::from (bypassed today) and the strategy switch be exercised directly.
Oracle: a test that injects a limiter whose admit errors and asserts the admin request is refused, not answered; plus the wire's existing "fail closed" case as the reference wording.
Closing:Closes #N is inert on a PR targeting rewrite/main; close by hand with the merge sha.
Activity
feat(admin): serve the console's HTTP surface from the relay's one li…