Add legacy_tool.dot workflow and CLI tests for backwards compat

Exercises the old tool_command attribute through validate and
dry-run to catch regressions in the tool → script compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-02-27 12:08:04 -05:00
parent f81113d71c
commit 379f92c110
2 changed files with 28 additions and 0 deletions

View file

@ -53,6 +53,15 @@ fn validate_styled() {
.stderr(predicate::str::contains("Validation: OK"));
}
#[test]
fn validate_legacy_tool() {
attractor()
.args(["validate", "../../test/legacy_tool.dot"])
.assert()
.success()
.stderr(predicate::str::contains("Validation: OK"));
}
#[test]
fn validate_invalid() {
attractor()
@ -118,6 +127,14 @@ fn dry_run_styled() {
.success();
}
#[test]
fn dry_run_legacy_tool() {
attractor()
.args(["run", "--dry-run", "--auto-approve", "../../test/legacy_tool.dot"])
.assert()
.success();
}
// -- NDJSON logging ----------------------------------------------------------
#[test]

11
test/legacy_tool.dot Normal file
View file

@ -0,0 +1,11 @@
digraph LegacyTool {
graph [goal="Verify backwards compatibility with old tool naming"]
rankdir=LR
start [shape=Mdiamond, label="Start"]
exit [shape=Msquare, label="Exit"]
echo_task [label="Echo", shape=parallelogram, tool_command="echo hello"]
start -> echo_task -> exit
}