codex: address PR review feedback (#28037)

This commit is contained in:
Kyle Brown
2026-06-13 23:07:54 +00:00
parent 5cdff40076
commit 0045050f7e

View File

@@ -103,6 +103,13 @@ pub struct UnifiedExecRuntime<'a> {
shell_mode: UnifiedExecShellMode,
}
/// Lifecycle callback surface that lets unified exec mirror its generic spawn
/// lifecycle into a resolved plugin-script execution.
///
/// Implementations must preserve the caller-provided callback order: unified
/// exec invokes the generic `SpawnLifecycle` first, then forwards the matching
/// plugin callback. Terminal callbacks may be repeated by cleanup paths, so
/// implementations must keep cancellation and finish handling idempotent.
trait PluginScriptLifecycle: Send + Sync {
fn mark_started(&self);
fn mark_cancelled(&self);
@@ -935,7 +942,7 @@ mod tests {
proposed_execpolicy_amendment: None,
},
);
request.environment = Arc::new(
request.turn_environment.environment = Arc::new(
Environment::create_for_tests(Some("ws://127.0.0.1:1/remote-exec-server".to_string()))
.expect("remote environment"),
);