diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-19 15:15:18 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-20 21:12:57 +0000 |
| commit | 5b6bebdcb7da46d1471b3aeacb28b54ba905b3b2 (patch) | |
| tree | d60fdce83c9b47fb39327f0bdc40b734a7213985 /pkg/codesearch/codesearch_test.go | |
| parent | 8088ac4199a6e947c38db669c11d4441a9d59581 (diff) | |
pkg/aflow: add BadCallError
The error allows tools to communicate that an error is not an infrastructure error
that must fail the whole workflow, but rather a bad tool invocation by an LLM
(e.g. asking for a non-existent file contents).
Previously in the codesearcher tool we used a separate Missing bool
to communicate that. With the error everything just becomes cleaner and nicer.
The errors also allows all other tools to communicate any errors to the LLM
when the normal results cannot be provided and don't make sense.
Diffstat (limited to 'pkg/codesearch/codesearch_test.go')
| -rw-r--r-- | pkg/codesearch/codesearch_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/codesearch/codesearch_test.go b/pkg/codesearch/codesearch_test.go index 7af509294..1f353c804 100644 --- a/pkg/codesearch/codesearch_test.go +++ b/pkg/codesearch/codesearch_test.go @@ -53,7 +53,8 @@ func testCommand(t *testing.T, index *Index, covered map[string]bool, file strin } result, err := index.Command(args[0], args[1:]) if err != nil { - t.Fatal(err) + // This is supposed to test aflow.BadCallError messages. + result = err.Error() + "\n" } got := append([]byte(strings.Join(args, " ")+"\n\n"), result...) tooltest.CompareGoldenData(t, file, got) |
