1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! # Task: resolved subprocess configuration.
//!
//! [`SubprocessTaskConfig`] is the **fully resolved** config passed to the subprocess spawn loop.
//! It is produced by [`SubprocessRunner::build_task_config`] from a [`TaskSpec`](solti_model::TaskSpec) + [`BuildContext`](solti_runner::BuildContext).
//!
//! ## How it fits
//! ```text
//! TaskSpec (model)
//! │
//! ├──► SubprocessRunner::build_task_config()
//! │ ├──► resolve SubprocessMode → (command, args)
//! │ ├──► merge_env(task_env, runner_env)
//! │ └──► generate run_id
//! │
//! └──► SubprocessTaskConfig (this struct)
//! ├──► validate(): command not empty
//! └──► passed to run_subprocess() for execution
//! ```
//!
//! ## Fields
//!
//! | Field | Source | Description |
//! |--------------------|---------------------------|--------------------------------------|
//! | `run_id` | generated by runner | unique execution identifier |
//! | `command` | `SubprocessMode` | OS command to exec |
//! | `args` | `SubprocessMode` | command-line arguments |
//! | `env` | `merge_env(task, runner)` | merged environment variables |
//! | `cwd` | `SubprocessSpec` | working directory (`None` = inherit) |
//! | `fail_on_non_zero` | `SubprocessSpec` | treat non-zero exit as failure |
use ;
use Flag;
use crateExecError;
/// Subprocess configuration - fully resolved per-task parameters.
///
/// ## Also
///
/// - [`SubprocessRunner`](super::SubprocessRunner) produces this config in `build_task`.
/// - [`SubprocessBackendConfig`](super::SubprocessBackendConfig) runner-level settings applied at spawn.