Add: Timings informations for tool calls. - #32768
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Author
|
This change is part of the following stack:
Change managed by git-spice. |
This was referenced Sep 18, 2026
Fraggle
force-pushed
the
sflory/add-timings-informations-for
branch
2 times, most recently
from
September 18, 2026 21:35
b10a0f4 to
363e0ff
Compare
davidebbo
reviewed
Sep 19, 2026
| return toolTimingsStorage().getStore() ?? syncStack().at(-1); | ||
| } | ||
|
|
||
| function isThenable(value: unknown): value is Promise<unknown> { |
Contributor
There was a problem hiding this comment.
What does isThenable mean? Logic unclear too. What does this do?
davidebbo
reviewed
Sep 19, 2026
| /** Sync stack key; must match functions-runner/tool_timings.ts. */ | ||
| export const TOOL_TIMINGS_STACK_KEY = "dust.pod.tool-timings.stack.v1"; | ||
|
|
||
| function isToolTimingsAls( |
Contributor
There was a problem hiding this comment.
Spell out AsyncLocalStorage? Couldn't guess what "Als" meant at first.
davidebbo
reviewed
Sep 19, 2026
| return toolTimingsStorage().getStore() ?? syncStack().at(-1); | ||
| } | ||
|
|
||
| function isThenable(value: unknown): value is Promise<unknown> { |
Contributor
There was a problem hiding this comment.
Seems like a lot of duplicated code between functions-runner/tool_timings.ts and this file.
Fraggle
force-pushed
the
sflory/add-timings-informations-for
branch
from
September 21, 2026 08:40
363e0ff to
dad575e
Compare
Spell out AsyncLocalStorage helpers, document why the runner/pod copies cannot share a module import, and explain thenable handling for stack cleanup. Co-authored-by: Cursor <cursoragent@cursor.com>
Fraggle
force-pushed
the
sflory/add-timings-informations-for
branch
from
September 21, 2026 12:53
dad575e to
f1af963
Compare
Contributor
Author
|
@davidebbo PMMR (only timings, comments adressed) |
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.
Description
I instrumented sandbox function invocations with end-to-end phase timings, including front-side sandbox setup, authorization, token minting, process execution, archive materialization, runner phases, and nested Dust tool calls.
tools.callnow records POST, poll, and offload durations through the@dust/podto functions-runner bridge, and Frame guidance replaces in-functiondsbx toolsshelling with the typed client.Tests
Added Rust coverage for timing envelope serialization and runner-side timing merging. Updated Frame and sandbox instruction tests to enforce
tools.callusage and the Computer-vs-Frame boundary.Risk
Low-to-medium risk. The timing fields are optional and diagnostics-only, with compatibility fallbacks for older
dsbxbinaries and consumers. The main risk is timing-context propagation across async tool calls; rollback is safe by reverting thedust-sandboxand front changes together.Deploy Plan
Deploy
dust-sandboxfirst, thenfrontso the new timing envelope is available to the logging and parsing path. No SQL migrations or infrastructure changes.