Repository navigation
feat(#7414): pass pi tool call ids, arguments and results through - #9147
Conversation
…through The pi parser emitted id-less tool calls with no results, so pi runs had no execute_tool spans and no tool I/O at Level 3. Emit the call id, arguments and result, and start the span when tool_execution_start was read, since pi reports a call once it has finished. List pi's tools in recordedArguments, and cover its parser in the redaction invariant test. That test also found the failed-call summary falling back to raw JSON, whose escapes can hide a secret from the redactor. Results in a shape pi doesn't document are now dropped and marked. Signed-off-by: Ashwin Govind Ugale <ugaleashwin@gmail.com>
E2E tests did not runE2E tests run automatically for pull requests authored by users with write access or higher. For other contributors, someone with write access must add the Reason: See E2E testing guide for details. |
PR Summary by QodoCapture pi tool call IDs, arguments, results, and spans
AI Description
Diagram
High-Level Assessment
Files changed (17)
|
|
🤖 Finished Review · ✅ Success · Started 10:09 AM UTC · Completed 10:20 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.06 |
Code Review by Qodo
1.
|
Site previewPreview: https://03bc1a61-site.fullsend-ai.workers.dev Commit: |
|
Risk Assessment: moderate (2/5) DetailsModerate 19-file telemetry change with no protected paths or dependency updates, accompanied by comprehensive tests and aligned with agreed issue scope, preserving the moderate score of 2 following an incremental commit to existing files despite elevated historical churn in touched telemetry and documentation files. Previous runRisk Assessment: moderate (2/5) DetailsModerate 19-file telemetry change with no protected paths or dependency updates, accompanied by comprehensive tests and aligned with agreed issue scope, preserving a moderate score of 2 despite elevated historical churn in touched telemetry and documentation files. Previous run (2)Risk Assessment: moderate (2/5) DetailsModerate 19-file telemetry change with no protected paths or dependency updates, accompanied by comprehensive tests and aligned with agreed issue scope, preserving a moderate score of 2 despite elevated historical churn in touched telemetry and documentation files. Previous run (3)Risk Assessment: moderate (2/5) DetailsModerate 19-file change (increased from 17 via low-risk comments and documentation edits within the same 11–25 file bucket) with no protected paths or dependency updates, accompanied by comprehensive tests and aligned with agreed issue scope, preserving the moderate score of 2 despite elevated historical churn in telemetry and documentation files. Previous run (4)Risk Assessment: moderate (2/5) DetailsModerate 17-file change with no protected paths or dependency updates, accompanied by comprehensive tests and aligned with agreed issue scope, despite elevated historical churn in telemetry and documentation files. |
ReviewFindingsLow
The latest commit changed Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJhcGktY29udHJhY3QiLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9waV9wcm9ncmVzcy5nbyIsImlkIjoiZl85MTg3ZTFlZWU2YzA2Yzg1IiwibGluZSI6NjExLCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJhcGktY29udHJhY3QiLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9waV9wcm9ncmVzcy5nbyIsImlkIjoiZl84Y2E2ZWM0MjNhNDRkNGFkIiwibGluZSI6NjA4LCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJhcGktY29udHJhY3QiLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9waV9wcm9ncmVzcy5nbyIsImlkIjoiZl9lZWVkNGYyMzkyMTQwNTQyIiwibGluZSI6NTk1LCJhY3Rpb25hYmxlIjpmYWxzZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJhcGktY29udHJhY3QiLCJmaWxlIjoiaW50ZXJuYWwvcnVudGltZS9waV9wcm9ncmVzcy5nbyIsImlkIjoiZl83ZjkzMDNjZWU2MmRmNTVlIiwibGluZSI6NjAyLCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJ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nRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5Ijoic3RhbGUtZG9jIiwiZmlsZSI6ImRvY3MvZ3VpZGVzL3VzZXIvaG93LXRvLWVtaXQtdHJhY2VzLm1kIiwiaWQiOiJmXzEwZGRlZGMwODY4OWJlMjkiLCJsaW5lIjoxNTQsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImRvY3MtY3VycmVuY3kifSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJzdGFsZS1kb2MiLCJmaWxlIjoiZG9jcy9wcm9ibGVtcy9vcGVyYXRpb25hbC1vYnNlcnZhYmlsaXR5Lm1kIiwiaWQiOiJmXzUxMmIzODc3NWFiYzFhZDYiLCJsaW5lIjoyMTUsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImRvY3MtY3VycmVuY3kifV19 --> ReviewFindingsMedium
Labels: PR changes runner telemetry parsing and its docs. Next steps:
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…sult is marked The user guide and the observability problem doc still said pi has no tool I/O or spans. A dropped result is only marked when the call failed, so say that in the piResultText comment and the tracing reference, and name pi 1.5.0's source as the basis for the hook ordering. Signed-off-by: Ashwin Govind Ugale <ugaleashwin@gmail.com>
|
🤖 Finished Review · ✅ Success · Started 10:36 AM UTC · Completed 10:47 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.98 |
…pted-call limit EM-002 and the tracing guides still treated pi as having no spans or arguments. pi reports a call only when it ends, so a call interrupted before then has no span and never counts as unanswered; say so where the unanswered rule is described. Signed-off-by: Ashwin Govind Ugale <ugaleashwin@gmail.com>
|
🤖 Finished Review · ✅ Success · Started 11:23 AM UTC · Completed 11:34 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.63 |
Superseded by updated review
waynesun09
left a comment
There was a problem hiding this comment.
Two doc findings on how pi tool spans are described. Both are about wording; the code behaviour stays as the PR has it.
…orrect the docs An end with no start seen emitted an id-bearing use event, so the tracker opened a normal span and EM-002 could not see the orphan result. Leave the id off that event. The docs also blamed pi for the missing span on a cut-off call, but pi does report the start; the parser holds the event until the end. Say that, and separate pi's span start from Claude's receipt-time start. Signed-off-by: Ashwin Govind Ugale <ugaleashwin@gmail.com>
|
🤖 Finished Review · ✅ Success · Started 2:55 PM UTC · Completed 3:07 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.62 |
Superseded by updated review
waynesun09
left a comment
There was a problem hiding this comment.
One finding on how piResultText handles a pi result with no content list.
pi 1.5.0 normalizes a missing content list with content ?? [], and an untyped extension tool can return one, so it is a normal result and not a cut. Only a value that won't decode as a string or result object is now dropped and marked. Signed-off-by: Ashwin Govind Ugale <ugaleashwin@gmail.com>
|
🤖 Finished Review · ✅ Success · Started 3:52 PM UTC · Completed 4:04 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.90 |
Superseded by updated review
waynesun09
left a comment
There was a problem hiding this comment.
Approving at ab374d1. Validated with a live pi 1.5.0 run: a rewriting tool_result hook's output reaches tool_execution_end and the Level 3 record, call ids and arguments pass through, and image-only and content-less results follow distributed-tracing.md. Pi parser and cli redaction, collector and span tests pass.
Summary
pi runs emit tool calls with no id and no result, so they have no
execute_toolspans and no tool I/O at Level 3. EM-002 also skips them: review runs on pi, and all 405 of its jobs were skipped in the sample on #8495. This passes the ids, arguments and results through. This is the pi half; codex follows in a separate PR, as agreed on the issue.Related Issue
Part of #7414
Changes
pi_progress.go): attool_execution_end, emit aToolUseEventwith the call's id and arguments, then aToolResultEventwith the result text andisError. One use event per call, sofullsend.tool_callsis unchanged. Successful output still stays out ofSummary.tool_execution_end, because a failed call's summary needs the result, soToolUseEvent.StartedAtrecords whentool_execution_startwas read and the tracker starts the span there. Parsers that don't set it behave as before.fullsend.tool.unmatchedspan, as on Claude. A run whose start line exceeded 1 MiB will fail EM-002, as on Claude.recordedArgumentsis keyed by Claude's tool names, so pi's arguments would have been dropped. This addsbash,read,write,edit,grep,find,lsandTask, checked against pi 1.5.0's schemas.writeandeditbodies andAgentandTaskprompts are not recorded.eval-measurements.md,architecture.md, theevent.go,tool_spans.goandrunhealth.gocomments, and new dated annotations in ADR 0050 and ADR 0108.Fix found along the way
The extended redaction test found that a failed call's summary fell back to the raw result JSON when the result had an undocumented shape, and JSON escapes can hide a secret from the redactor. This was already on
main. A result object with nocontentlist is now empty and unmarked, matching pi'scontent ?? []. Any other value that won't decode, such as an array, is dropped and marked truncated, as on Claude.piResultSummaryand the new result text share one flatten. A failed call whose result is empty or only an image now gets no text appended, where it used to show raw JSON.For reviewers
runtime.ParsePiStreamis a thin export so thecliredaction test can run the real parser in front of the collector. Simulating its events would be weaker, but I can change it if you prefer.TaskinrecordedArgumentsapplies to any tool with that name, including on Claude. It keeps the same members asAgent.Acceptance items
toolCallIdandresultshape: confirmed against a live pioutput.jsonlfrom the review of feat(#6842): record forge and CI pointers on the root run span #9011 (run 41606947989).testdata/pi/tool_calls.ndjsonis cut down from it.tool_resulthook: in pi 1.5.0'sagent-loop.ts,tool_execution_endis emitted afterafterToolCall, so the result is what a hook left. This comes from reading the source, not a live run.Not covered
tool_execution_end, so it has no span and doesn't count asunanswered. Emitting these at end of stream would changefullsend.tool_calls, so that's left for a follow-up.Testing
TestRedaction_NoSecretSurvivesAnyWrappingextended with 9 surfaces that run pi wire lines throughParsePiStream, 8 into the collector and 1 into the span trackerrecordedArgumentstests, plus two that run the pi parser into the span tracker (no start gives an unmatched span; start and end give a normal one)internal/runtimeandinternal/evalmeasurepass;go vetandgofmtare cleaninternal/clipasses except 4 vendor tests that fail the same way onmainin my local setup (a cross-compiled test binary cannot locate the source checkout)Checklist
!for breaking changes)