refactor(#3434): drop the agent_repo identity function

mara, PR #3438 review: 'remove the identity function. agent names
are unique and all repos go into agent-configs namespace anyway'. Right --
repo==agent isn't a convention worth a name once every call site can just
say so; call create_repo/add_repo_member/seed_agent_config with &agent
directly.
This commit is contained in:
atlas 2026-08-18 20:50:51 +02:00 committed by mara
commit 6dffa74d90
2 changed files with 8 additions and 21 deletions

View file

@ -155,7 +155,7 @@ async fn run_swarm_node(
SWARM_CONTROLLER_FORGE_TOKEN_FILE unset)"
.to_owned(),
),
Some(client) => match client.create_repo(forge::agent_repo(&agent)).await {
Some(client) => match client.create_repo(&agent).await {
Ok(full_name) => {
tracing::info!(%full_name, "swarm jobq: create_repo done");
Outcome::Done
@ -169,10 +169,7 @@ async fn run_swarm_node(
SWARM_CONTROLLER_FORGE_TOKEN_FILE unset)"
.to_owned(),
),
Some(client) => match client
.add_repo_member(forge::agent_repo(&agent), &agent)
.await
{
Some(client) => match client.add_repo_member(&agent, &agent).await {
Ok(()) => Outcome::Done,
Err(e) => Outcome::Failed(format!("{e:#}")),
},
@ -183,10 +180,7 @@ async fn run_swarm_node(
SWARM_CONTROLLER_FORGE_TOKEN_FILE unset)"
.to_owned(),
),
Some(client) => match client
.seed_agent_config(forge::agent_repo(&agent), &agent)
.await
{
Some(client) => match client.seed_agent_config(&agent, &agent).await {
Ok(()) => Outcome::Done,
Err(e) => Outcome::Failed(format!("{e:#}")),
},