Follow-up from the thermo-nuclear review round 2 (see PR #70 / tracking #73).
Location: crates/server/src/main.rs:1-10776
Issue: Single file of 10,776 lines / ~400 KB containing the router, every HTTP handler, the Runtime god-struct with relations/comments/layouts/git/auth/rate-limit methods, git plumbing helpers (git_refs, git_commits, commit_diff_payload, ...), CUE overlay logic, extension loading, and the full test suite.
Why it matters: Directly violates CLAUDE.md 'Prefer small, focused files organized around behavior/protocol boundary' and 'Flag god-files/functions'. It impedes review (this file exceeds the tooling read limit), local reasoning, and ownership boundaries.
Proposed fix: Split into modules by responsibility (e.g. http/routing.rs, http/handlers/{graphql,git,oidc,events,extensions}.rs, runtime/{relations,comments,layouts,auth}.rs, git/*) keeping main.rs to process bootstrap + router assembly.
Follow-up from the thermo-nuclear review round 2 (see PR #70 / tracking #73).
Location:
crates/server/src/main.rs:1-10776Issue: Single file of 10,776 lines / ~400 KB containing the router, every HTTP handler, the
Runtimegod-struct with relations/comments/layouts/git/auth/rate-limit methods, git plumbing helpers (git_refs,git_commits,commit_diff_payload, ...), CUE overlay logic, extension loading, and the full test suite.Why it matters: Directly violates CLAUDE.md 'Prefer small, focused files organized around behavior/protocol boundary' and 'Flag god-files/functions'. It impedes review (this file exceeds the tooling read limit), local reasoning, and ownership boundaries.
Proposed fix: Split into modules by responsibility (e.g.
http/routing.rs,http/handlers/{graphql,git,oidc,events,extensions}.rs,runtime/{relations,comments,layouts,auth}.rs,git/*) keepingmain.rsto process bootstrap + router assembly.