address review: drop backwards-compat request/response aliases, use canonical names
This commit is contained in:
parent
d0beec8a40
commit
144912f8e0
14 changed files with 183 additions and 229 deletions
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use hive_agent_sock::AgentResponse;
|
||||
use hive_agent_sock::Response;
|
||||
|
||||
use super::require_new_child;
|
||||
use crate::coordinator::Coordinator;
|
||||
|
|
@ -24,14 +24,14 @@ pub(super) fn handle_request_init_config(
|
|||
agent: &str,
|
||||
name: &str,
|
||||
description: Option<String>,
|
||||
) -> AgentResponse {
|
||||
) -> Response {
|
||||
if let Some(err) = require_new_child(agent, name, "request_init_config for") {
|
||||
return err;
|
||||
}
|
||||
tracing::info!(%agent, %name, "request_init_config");
|
||||
match submit_init_config(coord, name, Some(agent), description) {
|
||||
Ok(_id) => AgentResponse::Ok,
|
||||
Err(e) => AgentResponse::Err {
|
||||
Ok(_id) => Response::Ok,
|
||||
Err(e) => Response::Err {
|
||||
message: format!("{e:#}"),
|
||||
},
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ pub(super) fn handle_request_update_meta_inputs(
|
|||
requester: &str,
|
||||
inputs: &[String],
|
||||
description: Option<&str>,
|
||||
) -> AgentResponse {
|
||||
) -> Response {
|
||||
let label = if inputs.is_empty() {
|
||||
"all inputs".to_string()
|
||||
} else {
|
||||
|
|
@ -67,7 +67,7 @@ pub(super) fn handle_request_update_meta_inputs(
|
|||
{
|
||||
Ok(id) => id,
|
||||
Err(e) => {
|
||||
return AgentResponse::Err {
|
||||
return Response::Err {
|
||||
message: format!("queue update_meta_inputs approval: {e:#}"),
|
||||
};
|
||||
}
|
||||
|
|
@ -81,7 +81,7 @@ pub(super) fn handle_request_update_meta_inputs(
|
|||
description: description.map(str::to_owned),
|
||||
pr_number: None,
|
||||
});
|
||||
AgentResponse::Ok
|
||||
Response::Ok
|
||||
}
|
||||
|
||||
/// Submit-time half of the PR-merge flow: fetch the PR head sha from the
|
||||
|
|
|
|||
Loading…
Reference in a new issue