Repository navigation
feat(export): name each trace request's source row in trajectory metadata - #42
fergusfinn wants to merge 2 commits into
Conversation
…data Replay results need to join back to the Dynamo trace rows they came from. Trajectory metadata from the trace source now carries a requests list aligned with the trajectory's requests: the kept row's request_id, its x_request_id (null when absent) and its request_received_ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDPqeFzGgF3vkuiyimwMxX
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Virtual Fergus: reviewed, looks right. |
metadata.requests gave such a row's request_id as "" beside a null x_request_id; both are null now, so a replay join can't match on an empty string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDPqeFzGgF3vkuiyimwMxX
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Auto-approved: Internal export tooling change adding per-request source-row metadata to trajectory manifests; behavior is covered by updated tests and docs and does not touch the production request path, so it qualifies for automatic approval under the internal-tools rule.
View guided diff | Turn on auto-fix | Re-trigger cubic
Stacked on #40 (
steffen/dynamo-trace-export); merge that first.To compare a replayed request with the latency production recorded for it, the replay results have to join back to the trace rows. Each trajectory exported from Dynamo traces now carries
metadata.requests, a list aligned with the trajectory'srequests:request_idis the kept row'srequest.request_id. For a retried request, that is the attempt the exporter keeps.x_request_idis in the lower-cased form the analytics join uses, or null when the row has none.received_msis the row'srequest_received_ms.The manifest schema is otherwise unchanged. The agent parses trajectory
metadataas an arbitrary JSON value (TrajectoryPlanSpec::_metadata: Option<Value>), and the exporter's validator does not inspect it, so neither needs a change. A replay with--request-events-jsonl(#41) keys its records bytrajectory_idandinvocation, sometadata.requests[invocation - 1]names the source row.docs/export-plans.mddocuments the list and addsrequest.request_idto the fields read from each row.Testing
python -m unittest discover -s tests: 38 passed, none skipped. The new test covers a retried request (the dropped attempt's id does not appear), a lower-casedx_request_id, and a row without one. The existing metadata assertion now includes the list. Both exported-manifest dry runs throughbatchbench-agentran and pass, so the agent accepts the new metadata.🤖 Generated with Claude Code
https://claude.ai/code/session_01VDPqeFzGgF3vkuiyimwMxX