GeezerVison is showing github.com — test(harness): exercise ToolResponseContent.is_error in parallel-tool… · scaleapi/scale-agentex-python@a04bf5e
File tree
Expand file treeCollapse file tree
Open diff view settings
tests/lib/core/harness/conformance
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tests/lib/core/harness/conformance/test_conformance.py +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
174 | 174 | # an error. It guards against the two channels agreeing with each other while |
175 | 175 | # both mishandling interleaved/parallel spans or a failing tool. |
176 | 176 | # |
177 | | - # The tool error is represented the way the harness encodes it today — an |
178 | | - # "Error: ..." string in ToolResponseContent.content (see |
179 | | - # claude_agents/hooks/hooks.py post_tool_use_failure_hook). Once the deferred |
180 | | - # ToolResponseContent.is_error field lands (AGX1-371), extend this fixture to |
181 | | - # assert the error status propagates onto the closed tool span. |
| 177 | + # The failing tool sets ToolResponseContent.is_error=True (AGX1-371), which |
| 178 | + # the span deriver threads onto the closed tool span's CloseSpan.is_error. |
| 179 | + # Both channels feed the same deriver, so the recorded span signals — error |
| 180 | + # status included — must match. |
182 | 181 | Fixture( |
183 | 182 | name="parallel-tools-with-error", |
184 | 183 | events=[ |
|
217 | 216 | tool_call_id="p-ls", |
218 | 217 | name="Bash", |
219 | 218 | content="Error: ls: /nope: No such file or directory", |
| 219 | + is_error=True, |
220 | 220 | ), |
221 | 221 | ), |
222 | 222 | # p-read succeeds and closes second. |
|