pod: stop intake after ready idle

This commit is contained in:
2026-06-08 17:00:37 +09:00
parent 64318e8045
commit 61c323189c
9 changed files with 252 additions and 1 deletions
+27
View File
@@ -32,6 +32,9 @@ pub struct SpawnConfig {
/// Optional reusable Profile selector. Pod identity is always supplied
/// separately with `--pod`; profile selection must not imply a name.
pub profile: Option<String>,
/// Process-local Ticket role marker supplied only by Ticket role launches.
/// This does not alter prompts, manifests, or Ticket claim records.
pub ticket_role: Option<String>,
/// Explicit runtime workspace root. The child uses it as process cwd and
/// receives it via `--workspace` so startup does not infer workspace
/// identity from the parent process cwd.
@@ -123,6 +126,9 @@ fn runtime_args(config: &SpawnConfig) -> Vec<String> {
args.extend(["--profile".to_string(), profile.clone()]);
}
}
if let Some(ticket_role) = &config.ticket_role {
args.extend(["--ticket-role".to_string(), ticket_role.clone()]);
}
args
}
@@ -327,6 +333,7 @@ mod tests {
runtime_command: PodRuntimeCommand::new("/bin/yoi", vec![OsString::from("pod")]),
pod_name: "explicit-pod".to_string(),
profile: Some("project:companion".to_string()),
ticket_role: None,
workspace_root: PathBuf::from("/work/other-project"),
resume_from: None,
}
@@ -363,4 +370,24 @@ mod tests {
]
);
}
#[test]
fn runtime_args_pass_ticket_role_marker_when_present() {
let mut config = base_config();
config.ticket_role = Some("intake".to_string());
assert_eq!(
runtime_args(&config),
vec![
"--workspace",
"/work/other-project",
"--pod",
"explicit-pod",
"--profile",
"project:companion",
"--ticket-role",
"intake",
]
);
}
}
+2
View File
@@ -162,6 +162,7 @@ impl TicketRoleLaunchPlan {
runtime_command,
pod_name: self.pod_name.clone(),
profile: Some(self.profile.clone()),
ticket_role: Some(self.role.as_str().to_string()),
workspace_root: self.workspace_root.clone(),
resume_from: None,
})
@@ -1024,6 +1025,7 @@ workflow = "ticket-review-workflow"
.unwrap();
assert_eq!(spawn.pod_name, "reviewer-fixed");
assert_eq!(spawn.profile.as_deref(), Some("builtin:default"));
assert_eq!(spawn.ticket_role.as_deref(), Some("reviewer"));
assert_eq!(spawn.workspace_root, temp.path());
}