Repository navigation
refactor(gateway): relocate auth / sse / ws into platform/ — ironclaw#2599 stage 3 #2644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,22 +1,24 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! Platform layer for the web gateway. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! This submodule holds the gateway's transport and framing concerns: shared | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! state, the Axum route composition, static asset serving, and (in later | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! stages of ironclaw#2599) auth / SSE / WS. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! This submodule holds the gateway's transport and framing concerns: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! shared state, the Axum route composition, static asset serving, bearer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! / OIDC auth, and the SSE / WebSocket broadcast fan-out. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! **Dependency direction.** Feature handlers (under `handlers/` today, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! `features/<slice>/` later) depend on platform types (`GatewayState`, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! rate limiters, auth extractors). Platform *submodules* do **not** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! reach back into feature handlers — with the single, intentional | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! exception of [`router`], which is the composition point. The router | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! imports every feature handler it registers; that is its job. The | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! "no back-edges" rule enforced by future CI (ironclaw#2599 stage 5) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! applies to `platform/state.rs`, `platform/static_files.rs`, and the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! auth/SSE/WS modules once they move here — not to `router`, whose | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! whole purpose is to wire features onto the transport. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! rate limiters, auth extractors, `SseManager`, `WsConnectionTracker`). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! Platform *submodules* do **not** reach back into feature handlers — | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! with the single, intentional exception of [`router`], which is the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! composition point. The router imports every feature handler it | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! registers; that is its job. The "no back-edges" rule enforced by | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! future CI (ironclaw#2599 stage 5) applies to every platform module | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! except `router`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+10
to
+15
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documentation states that platform submodules do not reach back into feature handlers, and that this rule applies to every platform module except While this is a staged migration and the rule is "enforced by future CI", declaring that it "applies" to these modules now creates an inconsistency between the documentation and the implementation. Consider updating the comment to clarify that this is the target architecture.
Suggested change
Comment on lines
+10
to
+15
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //! Platform *submodules* do **not** reach back into feature handlers — | |
| //! with the single, intentional exception of [`router`], which is the | |
| //! composition point. The router imports every feature handler it | |
| //! registers; that is its job. The "no back-edges" rule enforced by | |
| //! future CI (ironclaw#2599 stage 5) applies to every platform module | |
| //! except `router`. | |
| //! Platform *submodules* should not reach back into feature handlers. | |
| //! Today, during the staged migration, there are temporary exceptions: | |
| //! [`router`] remains the intentional composition point, and `auth` and | |
| //! `ws` still have back-edges that have not yet been removed. The router | |
| //! imports every feature handler it registers; that is its job. The | |
| //! "no back-edges" rule enforced by future CI (ironclaw#2599 stage 5) is | |
| //! the target architecture for all platform modules once those temporary | |
| //! exceptions are eliminated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entry says
SseManagerfans outSseEvent, butplatform/sse.rsactually broadcastsAppEvent. Please update the type name in this description so the docs match the current SSE contract type.