research_topics::create: bag 8 args into a NewTopic struct (fixes clippy)
ci / gates (push) Successful in 6s
ci / frontend (push) Successful in 26s
ci / rust (push) Failing after 2m37s
ci / e2e (push) Has been skipped
ci / publish (push) Has been skipped

The prior signature took (pool, workspace_id, title, description,
outcome_kind, topology_kind, repo_id, created_by) — 8 args, one
over the clippy::too_many_arguments ceiling and blocking CI.

Refactor to a NewTopic<'a> input struct mirroring the NewLoop /
NewSubTopology pattern the codebase already uses. Wizard-side
additions like a repo commit branch land as struct fields
instead of cascading into every call site.
This commit is contained in:
Omar Sobh
2026-07-09 03:52:59 -07:00
parent 3465bb7a6d
commit 7984e65174
3 changed files with 49 additions and 38 deletions
+18 -14
View File
@@ -275,13 +275,15 @@ async fn notify_run_completed_transitions_topic_when_no_siblings_in_flight() {
let topic = research_topics::create(
&pool,
ws.as_uuid(),
"Topic",
"desc",
"spec",
"hub_spoke",
None,
user_id.as_uuid(),
research_topics::NewTopic {
workspace_id: ws.as_uuid(),
title: "Topic",
description: "desc",
outcome_kind: "spec",
topology_kind: "hub_spoke",
repo_id: None,
created_by: user_id.as_uuid(),
},
)
.await
.unwrap();
@@ -326,13 +328,15 @@ async fn notify_run_completed_leaves_topic_processing_when_siblings_in_flight()
let topic = research_topics::create(
&pool,
ws.as_uuid(),
"Topic",
"desc",
"spec",
"hub_spoke",
None,
user_id.as_uuid(),
research_topics::NewTopic {
workspace_id: ws.as_uuid(),
title: "Topic",
description: "desc",
outcome_kind: "spec",
topology_kind: "hub_spoke",
repo_id: None,
created_by: user_id.as_uuid(),
},
)
.await
.unwrap();