Skip to content

feat(parity): live dynamic rules, validated config wiring and the strict-route and body-timeout answers - #145

Merged
rennf93 merged 2 commits into
masterfrom
fix/live-dynamic-rules-and-config-validation
Oct 15, 2026
Merged

rennf93 merged 2 commits into
masterfrom
fix/live-dynamic-rules-and-config-validation

Conversation

@rennf93

@rennf93 rennf93 commented Oct 15, 2026

Copy link
Copy Markdown
Member

Closes #144

I am adding the engine side of the third reference-parity pass.

  • guard_core_rs::live and Wiring::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 from Wiring::live_config and 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_with calls SecurityConfig::validate first, as the reference does at construction (WiringError::Config); Wiring::build_unvalidated is the test seam. enable_redis without the redis feature keeps the documented per process fallback, because the reference default config also sets enable_redis and a redis_url.
  • Shared constants for the strict-route answer (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 test and 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.

@github-actions github-actions Bot added documentation Docs site, README, CHANGELOG, license files area: engine Touches crates/guard-core-engine/ (compiler, preprocessor, semantic, detect, patterns) area: facade Touches crates/guard-core-rs/ (published facade crate) labels Oct 15, 2026
@github-actions github-actions Bot added the ci GitHub Actions and pre-commit label Oct 15, 2026
@rennf93
rennf93 merged commit 26fa86d into master Oct 15, 2026
19 checks passed
@rennf93
rennf93 deleted the fix/live-dynamic-rules-and-config-validation branch October 15, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: engine Touches crates/guard-core-engine/ (compiler, preprocessor, semantic, detect, patterns) area: facade Touches crates/guard-core-rs/ (published facade crate) ci GitHub Actions and pre-commit documentation Docs site, README, CHANGELOG, license files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reference parity: live dynamic rules, validated wiring and the strict-route and body-timeout answers

1 participant