Fix workflow-layer review findings
Correctness: exclude workflow dispatch from child sessions, surface invalid workflow item configuration, reject {item} outside each-steps, and confirm every untrusted project directory once per workflow start. Refactors: share task settlement, status icons, validation failures, task identity construction, and workflow run state; normalize item counts to a map. Document YAML repair leniency and glossary wording.
This commit is contained in:
1 parent
688ae96dfe
commit
d4eb164b03
13 files changed
+415
-308
No files matched your search
+6
-4
@@ -171,7 +171,7 @@ test("bounds stderr to a valid UTF-8 64 KiB tail", async () => {
|
||||
assert.equal(Buffer.from(result.stderr, "utf8").toString("utf8"), result.stderr);
|
||||
});
|
||||
|
||||
test("child arguments exclude subagent tools and do not inherit thinking with an explicit model", async () => {
|
||||
test("child arguments exclude subagent and workflow tools and do not inherit thinking with an explicit model", async () => {
|
||||
let captured: string[] = [];
|
||||
let promptPath: string | undefined;
|
||||
let promptContent: string | undefined;
|
||||
@@ -206,7 +206,7 @@ test("child arguments exclude subagent tools and do not inherit thinking with an
|
||||
"-p",
|
||||
"--no-session",
|
||||
"--exclude-tools",
|
||||
"subagent*",
|
||||
"subagent*,workflow",
|
||||
]);
|
||||
assert.equal(captured[captured.indexOf("--model") + 1], "agent-model");
|
||||
assert.equal(captured.includes("--thinking"), false);
|
||||
@@ -244,7 +244,7 @@ test("child arguments inherit the dispatch model and thinking only without an ex
|
||||
"-p",
|
||||
"--no-session",
|
||||
"--exclude-tools",
|
||||
"subagent*",
|
||||
"subagent*,workflow",
|
||||
]);
|
||||
assert.equal(captured[captured.indexOf("--model") + 1], "dispatch-model");
|
||||
assert.equal(captured[captured.indexOf("--thinking") + 1], "high");
|
||||
@@ -271,7 +271,9 @@ test("child arguments omit optional model and thinking flags when nothing is con
|
||||
assert.equal(captured.includes("--model"), false);
|
||||
assert.equal(captured.includes("--thinking"), false);
|
||||
assert.equal(captured.includes("--exclude-tools"), true);
|
||||
assert.equal(captured[captured.indexOf("--exclude-tools") + 1], "subagent*");
|
||||
const excluded = captured[captured.indexOf("--exclude-tools") + 1].split(",");
|
||||
assert.ok(excluded.includes("subagent*"), "child cannot dispatch subagents");
|
||||
assert.ok(excluded.includes("workflow"), "child cannot start workflow runs");
|
||||
assert.equal(captured.at(-1), "Task: do the thing");
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user