aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/testdata/TestToolErrors.trajectory.json
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2026-01-21 19:42:47 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-01-23 09:36:05 +0000
commit69e3f8652665d3da729f3cd3a36d86f37c2c9364 (patch)
tree11f93adc35c83ac8662e0e090cca24eb06334594 /pkg/aflow/testdata/TestToolErrors.trajectory.json
parente2b1b6e6434df4fdc57ce90331688373e872825b (diff)
pkg/aflow: refactor tests
Add helper function that executes test workflows, compares results (trajectory, LLM requests) against golden files, and if requested updates these golden files.
Diffstat (limited to 'pkg/aflow/testdata/TestToolErrors.trajectory.json')
-rw-r--r--pkg/aflow/testdata/TestToolErrors.trajectory.json120
1 files changed, 120 insertions, 0 deletions
diff --git a/pkg/aflow/testdata/TestToolErrors.trajectory.json b/pkg/aflow/testdata/TestToolErrors.trajectory.json
new file mode 100644
index 000000000..8337407da
--- /dev/null
+++ b/pkg/aflow/testdata/TestToolErrors.trajectory.json
@@ -0,0 +1,120 @@
+[
+ {
+ "Seq": 0,
+ "Nesting": 0,
+ "Type": "flow",
+ "Name": "test",
+ "Started": "0001-01-01T00:00:01Z"
+ },
+ {
+ "Seq": 1,
+ "Nesting": 1,
+ "Type": "agent",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:02Z",
+ "Instruction": "Do something!\nPrefer calling several tools at the same time to save round-trips.\n",
+ "Prompt": "Prompt"
+ },
+ {
+ "Seq": 2,
+ "Nesting": 2,
+ "Type": "llm",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:03Z"
+ },
+ {
+ "Seq": 2,
+ "Nesting": 2,
+ "Type": "llm",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:03Z",
+ "Finished": "0001-01-01T00:00:04Z"
+ },
+ {
+ "Seq": 3,
+ "Nesting": 2,
+ "Type": "tool",
+ "Name": "faulty",
+ "Started": "0001-01-01T00:00:05Z",
+ "Args": {
+ "CallError": true
+ }
+ },
+ {
+ "Seq": 3,
+ "Nesting": 2,
+ "Type": "tool",
+ "Name": "faulty",
+ "Started": "0001-01-01T00:00:05Z",
+ "Finished": "0001-01-01T00:00:06Z",
+ "Error": "you are wrong",
+ "Args": {
+ "CallError": true
+ },
+ "Results": {}
+ },
+ {
+ "Seq": 4,
+ "Nesting": 2,
+ "Type": "llm",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:07Z"
+ },
+ {
+ "Seq": 4,
+ "Nesting": 2,
+ "Type": "llm",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:07Z",
+ "Finished": "0001-01-01T00:00:08Z"
+ },
+ {
+ "Seq": 5,
+ "Nesting": 2,
+ "Type": "tool",
+ "Name": "faulty",
+ "Started": "0001-01-01T00:00:09Z",
+ "Args": {
+ "CallError": false
+ }
+ },
+ {
+ "Seq": 5,
+ "Nesting": 2,
+ "Type": "tool",
+ "Name": "faulty",
+ "Started": "0001-01-01T00:00:09Z",
+ "Finished": "0001-01-01T00:00:10Z",
+ "Error": "hard error",
+ "Args": {
+ "CallError": false
+ },
+ "Results": {}
+ },
+ {
+ "Seq": 1,
+ "Nesting": 1,
+ "Type": "agent",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:02Z",
+ "Finished": "0001-01-01T00:00:11Z",
+ "Error": "tool faulty failed: error: hard error\nargs: map[CallError:false]",
+ "Instruction": "Do something!\nPrefer calling several tools at the same time to save round-trips.\n",
+ "Prompt": "Prompt"
+ },
+ {
+ "Seq": 0,
+ "Nesting": 0,
+ "Type": "flow",
+ "Name": "test",
+ "Started": "0001-01-01T00:00:01Z",
+ "Finished": "0001-01-01T00:00:12Z",
+ "Error": "tool faulty failed: error: hard error\nargs: map[CallError:false]"
+ }
+] \ No newline at end of file