Repository navigation
Conversation
…gnostics The chronology line now carries, per model step, the time in reasoning blocks and their count, the reply text's first and last delta, cache-write and reasoning tokens, and Pi's catalogue cost estimate. The readback keeps these and the fields it used to drop; `diagnose` shows them per step, reads each submission's execute_tool spans (a browser batch timed once), and searches Tempo around the submission's own logged time so submissions older than seven days read without a 400.
A step's beforeOutputMs now divides into the time inside reasoning blocks before its first output and the rest of the wait, which add to it exactly. Each tool call says whether its arguments arrived in one burst (first and last delta under 50 ms apart), and each step, exchange and the summary total the burst calls' argument characters, null without a chronology line. packet.md shows the split in its summary table and exchange table, and the packet's version goes to 4.
…ans in Brunch's diagnose Also search further back for spans of a line without step start times, and stop the chronology observer holding state for events that arrive after their submission settled.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
This branch was successfully deployed
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.
🌟 Purpose
Brunch's diagnostics can't say where a model step's time goes.
diagnoseand the run packet each report one wait before a step's first output, and that figure mixes time inside a reasoning block, tool arguments the provider delivers in one burst, and everything else.diagnose's "time until the response started" is the time to the provider's HTTP response, so it reads about half a second however long the model then takes.A staging or production turn is also harder to read than a local run: reasoning and cost were kept only in the conversation's stored records, which
diagnosedoesn't read.This PR makes the per-submission chronology log line,
diagnoseand the run packet report, per model step, the time spent in reasoning blocks, when the reply text streamed, tokens with reasoning apart, and the catalogue cost estimate. It makesdiagnose --submissionwork for a submission older than seven days. And it stops a persona run losing the spans of its last turn when its launcher stops the server.🔍 Changes
observe-turn-chronology.ts): each step gains the time in reasoning blocks and their count, the reply text's first and last delta, cache-write tokens, reasoning tokens and Pi's catalogue cost estimate. The content policy is unchanged: ids, counts, durations and classifications only. Reasoning tokens come from themessage_endobservation, which carries Pi's raw usage; Flue'sturnusage drops the count.telemetry-readback/): reads the new fields, cache-read tokens and each tool call's name. Lines from before the new fields read as null. It still leaves out whatdiagnosedoesn't show.diagnose:execute_toolspans. The issue asked for each tool call's execution time. Calls in one step whose time ranges overlap are instead shown as one row, timed once: every call in a batch the panel runs closes when the batch returns, so one row per call would repeat the batch's time sixteen times for sixteen calls. A server tool that overlaps such a batch shares its row;--sincewindow, which Tempo refuses beyond 168 hours. It now searches from the submission's first step to its settlement. With no log line to place the search and a window over 168 hours, it reports Tempo's limit and stops.beforeOutputMsdivides into reasoning-block time before the first output and the rest, which add to it exactly. Each tool call says whether its arguments arrived in one burst (first and last delta under 50 ms apart), and steps, exchanges and the summary total those characters, because their generation falls inside the wait.reasoningSummaryMsis unchanged. On 50 ms: of 849 tool calls with over 50 argument characters in five sessions, 765 spanned 0 ms, 8 spanned 1–49 ms, 3 spanned 50–199 ms and 73 spanned 200 ms or more.yarn workspacepasses every SIGTERM it receives on to vite, and vite handles only the first, so the second killed it mid-close. The launcher now signals each service's leader and still polls, and force-kills, the group;OTEL_BSP_SCHEDULE_DELAY=200for the server it starts.Checked on live turns exported to a local collector:
diagnose --submission, reading Loki and Tempo only, and the run packet, reading the conversation database, agree per step to within 5 ms on reasoning time and 2 ms on reply-text time, with identical cost and reasoning tokens. A dev server stopped by the launcher's code 0 ms after its turn settled, with the export delay forced to 5 s, still delivered the turn's span.@local/hash-backend-utilswould cover them. A persona run keeps its own server log, which has the line.Application shutdown failed, beside the exporter's own error.packet.mdrounds each figure on its own, so a line can read13 s (2.0 s + 11 s).packet.jsonsums exactly.🤖 Generated with Claude Code