Skip to content

🗺️ Atlas: Remove circular dependencies in state and session#1869

Open
madmax983 wants to merge 1 commit into
trunk-devfrom
jules-9823808553606103383-52a8cee7
Open

🗺️ Atlas: Remove circular dependencies in state and session#1869
madmax983 wants to merge 1 commit into
trunk-devfrom
jules-9823808553606103383-52a8cee7

Conversation

@madmax983

Copy link
Copy Markdown
Owner

🕸️ Tangle: The autumn-web codebase contained a couple of circular dependencies. Specifically, state -> authorization -> session -> state (which only existed in tests, but still violated strict layering) and config -> security -> config in the main implementation (where security::config used RateLimitBackend from config.rs, which is itself a core configuration file that imports security components).

📐 Blueprint: Removed use crate::state::AppState from the test in autumn/src/session.rs and replaced it with a dummy unit type () where possible to break the test-only cycle. In autumn/src/config.rs, removed unnecessary use crate::security::config::RateLimitBackend and RateLimitBackendFailure imports 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 tree and a custom Python cycle-detection script to verify all circular dependencies are gone. Builds successfully with cargo check -p autumn-web --lib and passes tests with cargo test -p autumn-web --lib.


PR created automatically by Jules for task 9823808553606103383 started by @madmax983

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.05%. Comparing base (14e6518) to head (a9cf6a4).
⚠️ Report is 40 commits behind head on trunk-dev.

Additional details and impacted files

Impacted file tree graph

@@              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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant