research: extract setup helpers into research_setup.rs (fixes file-size gate)
ci / gates (push) Successful in 6s
ci / frontend (push) Successful in 51s
ci / rust (push) Failing after 1m0s
ci / e2e (push) Has been skipped
ci / publish (push) Has been skipped

research.rs hit 1446 lines with the wizard-fold + regression-fix
commits, tripping the CI file-size gate (limit 1250). Pure extraction
into a sibling module; no behavior change.

Moved to routes/research_setup.rs:
- RepoContext (now pub — used by build_coordinator_task)
- TopicSchedule (now pub — request body sub-struct)
- research_workspace_root (now pub)
- prepare_topic_runtime (already pub — used by loops iteration path)
- ensure_repo_workspace (now pub — used by start_topic + prepare)
- materialize_topic_loops (now pub — used by create_topic)

research.rs re-imports them via `use crate::routes::research_setup::{...}`
so the calling code reads identically.

New line counts:
  research.rs        1127 lines (was 1446, limit 1250)
  research_setup.rs   321 lines (new)

Also updated the loop-iteration callsite in routes/loops.rs to point
at the new path (crate::routes::research_setup::prepare_topic_runtime).

No API changes; migrations unaffected.
This commit is contained in:
Omar Sobh
2026-07-10 09:15:25 -07:00
parent 80c23e57ed
commit c0c5fd7104
4 changed files with 336 additions and 330 deletions
+1
View File
@@ -20,6 +20,7 @@ pub mod planner;
pub mod repos;
pub mod research;
pub mod research_pipeline;
pub mod research_setup;
pub mod routines;
pub mod sessions;
pub mod skills;