Repository navigation
feat(parity): live dynamic rules, validated config wiring and the strict-route and body-timeout answers - #145
Merged
Conversation
…ict-route and body-timeout answers
… companion branches
This was referenced Oct 15, 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.
Closes #144
I am adding the engine side of the third reference-parity pass.
guard_core_rs::liveandWiring::live: the stages a dynamic rule can change (country lists, cloud providers, blocked user agents, emergency mode, the penetration toggle, the rate limits and the ban knobs) are derived fromWiring::live_configand rebuilt when a rule changes one of the fifteen fields a rule may touch. The recorded rate-limit windows, the ban store, the violation counters and the cloud range table survive a rebuild (RateLimiter::with_config), and a rebuild the validators reject keeps the previous stages.Wiring::from_security_config_withcallsSecurityConfig::validatefirst, as the reference does at construction (WiringError::Config);Wiring::build_unvalidatedis the test seam.enable_rediswithout theredisfeature keeps the documented per process fallback, because the reference default config also setsenable_redisand aredis_url.route_config) and the request-body read timeout (408).Merge order: this PR first. The four adapter PRs build against it and show red until it merges.
Verification: fmt, clippy (
-D warnings, stable 1.99, workspace, all features, guard-core-python),cargo testand the all-features run, the ledger, detection and pipeline conformance suites, docs with warnings denied, 100% line coverage and MSRV 1.92 check and test all pass locally.