summaryrefslogtreecommitdiff
path: root/makima/src/server
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-18 17:19:10 +0000
committersoryu <soryu@soryu.co>2026-01-18 17:19:10 +0000
commitea71a1d55a0036b0452e8b2b4f95022b19274343 (patch)
tree38088d2dc905ff789099888d091aa3c48ee2f4af /makima/src/server
parentf84a7f2d820f6f432be2b1d78d6bf833b5b19380 (diff)
downloadsoryu-ea71a1d55a0036b0452e8b2b4f95022b19274343.tar.gz
soryu-ea71a1d55a0036b0452e8b2b4f95022b19274343.zip
Add phaseguard flag to supervisor ask command
When phaseguard is enabled (--phaseguard flag), the supervisor's ask command will block indefinitely waiting for user response instead of timing out after the default 1 hour. This ensures that phase transitions requiring user confirmation cannot proceed without explicit approval. Changes: - Add phaseguard field to AskQuestionRequest in server handler - Add phaseguard field to AskQuestionRequest in API client - Add --phaseguard CLI flag to AskArgs - Update supervisor_ask() to accept phaseguard parameter - Modify ask_question handler to skip timeout check when phaseguard=true Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/server')
-rw-r--r--makima/src/server/handlers/mesh_supervisor.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/makima/src/server/handlers/mesh_supervisor.rs b/makima/src/server/handlers/mesh_supervisor.rs
index 1014fdc..d1f3129 100644
--- a/makima/src/server/handlers/mesh_supervisor.rs
+++ b/makima/src/server/handlers/mesh_supervisor.rs
@@ -70,6 +70,9 @@ pub struct AskQuestionRequest {
/// How long to wait for a response (seconds)
#[serde(default = "default_question_timeout")]
pub timeout_seconds: i32,
+ /// When true, the request will block indefinitely until user responds (no timeout)
+ #[serde(default)]
+ pub phaseguard: bool,
}
fn default_question_timeout() -> i32 {
@@ -1556,8 +1559,8 @@ pub async fn ask_question(
).into_response();
}
- // Check timeout
- if start.elapsed() >= timeout_duration {
+ // Check timeout (skip timeout if phaseguard is enabled - wait indefinitely)
+ if !request.phaseguard && start.elapsed() >= timeout_duration {
// Remove the pending question on timeout
state.remove_pending_question(question_id);