🗺️ Atlas: Remove circular dependencies in state and session#1869
🗺️ Atlas: Remove circular dependencies in state and session#1869madmax983 wants to merge 1 commit into
Conversation
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk-dev #1869 +/- ##
=============================================
+ Coverage 86.82% 87.05% +0.22%
=============================================
Files 273 276 +3
Lines 202424 207680 +5256
=============================================
+ Hits 175761 180791 +5030
- Misses 26663 26889 +226 🚀 New features to boost your workflow:
|
🕸️ Tangle: The
autumn-webcodebase contained a couple of circular dependencies. Specifically,state -> authorization -> session -> state(which only existed in tests, but still violated strict layering) andconfig -> security -> configin the main implementation (wheresecurity::configusedRateLimitBackendfromconfig.rs, which is itself a core configuration file that imports security components).📐 Blueprint: Removed
use crate::state::AppStatefrom the test inautumn/src/session.rsand replaced it with a dummy unit type()where possible to break the test-only cycle. Inautumn/src/config.rs, removed unnecessaryuse crate::security::config::RateLimitBackendandRateLimitBackendFailureimports that were creating a true dependency cycle.🧱 Stability: Enforces stricter unidirectional dependencies across core modules (
state,config,security), preventing dependency hell and reducing coupling across the framework's internal architecture.🔬 Verification: Ran
cargo treeand a custom Python cycle-detection script to verify all circular dependencies are gone. Builds successfully withcargo check -p autumn-web --liband passes tests withcargo test -p autumn-web --lib.PR created automatically by Jules for task 9823808553606103383 started by @madmax983