test: consolidate tracing suite (superseded by split stack) - #144
Draft
rgao-coreweave wants to merge 11 commits into
Draft
test: consolidate tracing suite (superseded by split stack)#144rgao-coreweave wants to merge 11 commits into
rgao-coreweave wants to merge 11 commits into
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jul 19, 2026
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 21, 2026 00:29
31ce1af to
480ef43
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
from
July 21, 2026 00:29
649873b to
abacfc7
Compare
This was referenced Jul 21, 2026
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 21, 2026 04:39
480ef43 to
c1b4159
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
from
July 21, 2026 04:39
abacfc7 to
0bc85ce
Compare
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 21, 2026 05:34
c1b4159 to
98bddd5
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
from
July 21, 2026 05:34
0bc85ce to
69fe0dd
Compare
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 21, 2026 06:30
98bddd5 to
8a48bb7
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
2 times, most recently
from
July 21, 2026 06:39
3aeffe1 to
a3a67b2
Compare
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
2 times, most recently
from
July 21, 2026 17:07
0faf31f to
075dd45
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
from
July 21, 2026 17:07
a3a67b2 to
6f54b66
Compare
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 22, 2026 04:23
075dd45 to
82db0d5
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
from
July 22, 2026 04:23
6f54b66 to
390159b
Compare
Emit a chat span (LLM) per assistant API response and execute_tool spans for tool calls, restoring the coverage parked by the turn-core swap: - advanceMainAgentChatSpan maps a PreToolUse tool_use_id to its response via the transcript and opens the response's chat span; tools nest under it. Split transcript lines sharing a message.id group into one span so usage is never double-counted. - Stop finalizes the active chat span and emits spans for tool-less responses; an interrupted turn closes its chat span as superseded instead of crashing on a stale response key. - PostToolUse[Failure] closes the pending tool span with its result (ERROR + error.type on failure); PermissionRequest stamps span events. Agent dispatches still get a plain execute_tool span; the subagent invoke_agent marker lands in the next PR of this stack. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 22, 2026 05:38
82db0d5 to
ec32d0c
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
from
July 22, 2026 05:38
390159b to
832927e
Compare
Move ordinary Agent dispatch and SubagentStart/SubagentStop tracing into the chat/tool layer. Main-agent tools parent to the turn while subagent tools and chats parent to the SubAgent marker. Reconstruct chat siblings from transcripts at Stop or interrupted-turn finalization.
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
from
July 22, 2026 17:12
832927e to
907b379
Compare
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 22, 2026 17:12
ec32d0c to
80eedb1
Compare
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 22, 2026 17:26
80eedb1 to
d3a3f5c
Compare
Keep cross-session team correlation, TeammateIdle transcript emission, FIFO re-spawn handling, and team lifecycle guards in the team-specific layer. Ordinary subagent tracing now comes from the parent branch.
Pure deletion: the hand-rolled builders, baggage plumbing, and their builder-only ATTR/OP keys became unreferenced in the SDK swap. Drop the now-unused exporter/provider packages; sdk-trace-base moves to devDeps for the tests' in-memory exporter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude Code splits one response's blocks across transcript lines sharing a message.id; buildTurn now folds them (last line's usage/timestamp — it accompanies stop_reason — first line's prevTimestamp), so consumers see one call per response. The daemon's response-grouping layer collapses to direct lookups and chatSpans.ts goes away, its three survivors inlined as module helpers in daemon.ts, their only consumer. Type-guards (readTranscriptLine) replace the parser's remaining as-casts; dead totalUsage() deleted. Also a comment pass across the touched files: doc blocks cut to the load-bearing why. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
An Agent dispatch from WITHIN a subagent (agent_id set) fell through to the generic tool branch: no tracker, so its SubagentStart became an orphan flattened under the turn with one ERROR log per spawn (the bug predates the SDK swap; reproduced live by a recursive depth test). Parent the marker under the spawning subagent's own marker instead, so recursive spawns keep their depth; prompt-hash correlation and PostToolUse settling work unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
24 test files fold into 8 (chat-spans, turn-spans, subagents, daemon-lifecycle, config, install, plus status and stale-daemon-socket untouched). Every test case and assertion carries over verbatim; identical local fixtures/builders dedupe to one copy per file, and anecdotal comments in the merged files are trimmed. 85 tests, unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rgao-coreweave
force-pushed
the
109-16-consolidate-tests
branch
from
July 22, 2026 18:54
d3a3f5c to
ee9e8fc
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
2 times, most recently
from
July 22, 2026 23:45
41dc9b0 to
044fb26
Compare
rgao-coreweave
force-pushed
the
109-10-recursive-dispatch
branch
from
July 23, 2026 01:43
044fb26 to
b3cc46a
Compare
rgao-coreweave
changed the base branch from
109-10-recursive-dispatch
to
graphite-base/144
July 23, 2026 01:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Status: superseded
This draft consolidated tests across the former monolithic tracing history. The rewritten stack keeps each regression beside the behavior it protects, so replaying this patch would make the review boundaries less clear.
Do not review or merge this PR. Its historical branch remains available for reference.
Replacement stack: #129 → #130 → #142 → #147 → #131 → #151 → #148 → #149 → #143.