diff --git a/crates/engine/src/cmd/actions_cmds.rs b/crates/engine/src/cmd/actions_cmds.rs index fe24cec596..d9d18b9be2 100644 --- a/crates/engine/src/cmd/actions_cmds.rs +++ b/crates/engine/src/cmd/actions_cmds.rs @@ -509,8 +509,8 @@ pub fn restore_recording(s: &mut Session, idx: usize, action: &str, from: usize) s.journal.push(("actions.play".into(), params)); } -/// Nested playback returns a structured failure even though the command itself succeeded. -/// Promote it to the caller's failed step so no later parent steps run after a child fails. +/// Recorded child commands can report failure inside a successful response. +/// Promote action or Batch failures so a recorded parent does not run later steps. pub fn nested_failure(id: &str, value: &Value) -> Option { // Batch keeps per-file results for direct callers, but a failed recorded Batch step stops its parent. if id == "file.automate.batch" { diff --git a/crates/engine/src/cmd/automate_cmds.rs b/crates/engine/src/cmd/automate_cmds.rs index 5bbcd69216..c87fa22c41 100644 --- a/crates/engine/src/cmd/automate_cmds.rs +++ b/crates/engine/src/cmd/automate_cmds.rs @@ -129,6 +129,7 @@ fn nested_script_failure(id: &str, r: &Value) -> Option { (id == "file.scripts.browse" && r.get("ok") == Some(&Value::Bool(false))).then(|| "a script it runs failed".to_string()) } +/// Direct Batch file errors remain script results; called action failures stop later script steps. fn run_steps(s: &mut Session, steps: &[(String, Value)]) -> Vec { let mut results = Vec::new(); for (id, params) in steps { diff --git a/crates/engine/src/cmd/file_cmds/batch_run.rs b/crates/engine/src/cmd/file_cmds/batch_run.rs index 43c45c90f4..c124015a2a 100644 --- a/crates/engine/src/cmd/file_cmds/batch_run.rs +++ b/crates/engine/src/cmd/file_cmds/batch_run.rs @@ -283,6 +283,7 @@ pub(crate) fn batch_action(list: &[crate::actions_cmds::Action], p: &Value) -> R crate::actions_cmds::resolve(list, p, CMD) } +/// Apply the selected file-error policy while retaining per-file results for direct callers. pub(super) fn batch(s: &mut Session, p: &Value) -> Result { let cmd = "file.automate.batch"; let stop_on_error = match p.get("stopOnError") { diff --git a/docs/atn.md b/docs/atn.md index 2250ff9e09..9455f96782 100644 --- a/docs/atn.md +++ b/docs/atn.md @@ -1652,8 +1652,8 @@ No parameters: the step carries an empty descriptor. | Key | String ID | Type | Unit | Example value | Allowed | |---|---|---|---|---|---| -| `Scl ` | scale | integer | | 1 | 1 .. 9999 (measured in the dialog). Without the dialog the value is ignored | -| `Ofst` | offset | integer | | 0 | -9999 .. 9999 (measured in the dialog). Without the dialog the value is ignored | +| `Scl ` | scale | integer | | 1 | 1 .. 9999 (measured in the dialog). Applies without the dialog too: scale 2 halves the output | +| `Ofst` | offset | integer | | 0 | -9999 .. 9999 (measured in the dialog). Applies without the dialog too: offset 50 adds 50 | | `Mtrx` | matrix | list | | none: a step always carries all 25 cells | exactly 25 integers (5 x 5, row by row), each -999 .. 999; a 3 x 3 list makes the application fail | #### Replace Color