Parent: #520
Related plan: docs/architecture-improvement-plan.md
Goal
Extract reusable startup boundaries in the server layer so composition roots stay thin and test/prod router behavior stays in sync.
Deliverables
- Reusable runtime bootstrap module/crate for rolegraph + indexing initialization
- Shared route composition function used by both production and test router constructors
- Thin composition-root entrypoints in
terraphim_server/src/main.rs and terraphim_server/src/lib.rs
Tasks
- Extract startup indexing logic from
terraphim_server/src/lib.rs into a reusable initializer component
- Replace duplicated route lists with a single route composition function
- Add focused tests to verify production/test router parity
- Document the new boundary in module/crate README or ADR references
Acceptance Criteria
- No duplicated route registration blocks across production/test constructors
- Startup/indexing orchestration can be reused from tests or other adapters
- Build/test paths pass for server with default and relevant feature sets
Parent: #520
Related plan:
docs/architecture-improvement-plan.mdGoal
Extract reusable startup boundaries in the server layer so composition roots stay thin and test/prod router behavior stays in sync.
Deliverables
terraphim_server/src/main.rsandterraphim_server/src/lib.rsTasks
terraphim_server/src/lib.rsinto a reusable initializer componentAcceptance Criteria