feat: production hardening (hop admission, reload, defaults) - #15
Merged
Conversation
Enforce target policy and circuit accounting on every redirect hop with CircuitHop RAII so cancelled probes cannot stick half-open. Retain circuit/rate state across SIGHUP when those sections are unchanged. Move inflight to limits, enable GCRA by default, cap response body and keyed map cardinality, and stamp CORS outside timeout/body layers.
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
Production-hardening pass for open-internet CORS proxy safety and operability:
TargetPolicy+ circuit on every redirect hop;CircuitHopRAII settles failure on cancel so half-open cannot stick foreverheader/inflight/max_response_body)limits.inflight_max(moved fromrate_limit.global),limits.max_response_body_bytes,rate_limit.enableddefaulttrue,rate_limit.max_keys,circuit_breaker.max_hostsredirect_policy = rewriteBreaking
rate_limit.global.inflight_max→ uselimits.inflight_maxrate_limit.enableddefaults totruemessageis kind-stable (no internal DNS/connect detail)CircuitDecisionremoved;CircuitBreaker::check→Result<(), ProxyError>Test plan
cargo test --workspacecargo clippy --workspace --all-targets -- -D warnings