Repository navigation
fix(tier3): leave inferred timing N/A when a tool step is not followed by an agent step - #365
Merged
Merged
Conversation
…d by an agent step Inference charged the whole gap after a tool step, minus the tool time, to the model. When the next step is a user or system step, that gap can be idle or user time: a 1 s tool call followed by a user step 98 s later reported about 100 s of LLM time. Only the agent's next step shows when the model finished with the tool output, so such a trajectory now has no inferred timing, matching the rule that missing evidence is never guessed. Native ATIF timing is unaffected. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Wrap the long line about omitted trajectories at 80 columns and split the coverage text into three paragraphs: tool coverage, multi-step and copied context, and missing timing. The wording is unchanged; only the paragraph breaks are new. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
chrisknvidia
reviewed
Nov 6, 2026
chrisknvidia
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed. Requiring the step right after a tool step to be an agent step is the right rule: a user or system step there can only bound idle or user time, so leaving the trial N/A is safer than over-counting LLM seconds. The test covers the interjection in the middle and at the end, plus the case where the agent replies first and the trial is still timed (7.0 / 1.0). Docs and the module docstring match the code. Nothing blocking from me.
rng1995
marked this pull request as ready for review
November 6, 2026 12:20
rng1995
added a commit
that referenced
this pull request
Nov 6, 2026
…Unreleased Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 6, 2026
…Unreleased Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 6, 2026
…Unreleased (#371) Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Summary
Follow-up to #344, which merged before its last review round. #344 infers LLM and tool seconds from step timestamps when a trajectory has no native ATIF timing. For each tool step, it counts the gap to the next step, minus the tool's wall time, as LLM time. When the next step is a user or system step, that gap can be idle or user time, not model time.
Example on
main: a user step at 0 s, a tool step at 2 s with a 1 s call, a user step at 40 s and an agent step at 43 s report 42.0 LLM seconds and 1.0 tool seconds. 37 of those LLM seconds are the wait before the user step.trajectory_timingnow leaves the trial unmeasured (N/A) when a tool step is followed by a user or system step, also when that step is the last one. Only the agent's next step shows when the model finished with the tool output.docs/reports.mdx("Measured agent resources") and the module docstring state the new rule. A second commit wraps the long line about omitted trajectories and splits the coverage text into three paragraphs: tool coverage, multi-step and copied context, and missing timing. No prose line in that section is longer than 80 columns; its table rows, which cannot be wrapped, are unchanged.N/Aand does not list the individual conditions. The Harbor 0.24 Codex converter fixture, which has user and system steps only before the first agent step, is still timed.Why
Timing must never guess missing evidence. Counting a wait for a user or system step as model time inflates LLM seconds and LLM ms per token for that arm, and the with-skill-minus-baseline delta can then show a skill as slower when it is not.
Kept from public
resourcesgating (complete arms, matching cases, missing timing staysnull) and the HTML table are unchanged.Tests
test_tool_step_followed_by_a_user_or_system_step_is_unmeasuredintests/tier3/test_trajectory_timing.py, withuserandsystemcases. Both fail onmain(42.0 LLM and 1.0 tool seconds instead of no timing); the other 60 tests in the file pass there.tests/tier3/test_trajectory_timing.py,tests/tier3/test_resource_usage.pyandtests/reporting/test_resource_comparison.py: 107 passed.tests/tier3andtests/reporting(-n 8): 11208 passed, 3 skipped, 13 failed. The 13 failures are intests/tier3/test_judge_failure_artifacts.py, which runs a generated script with the systempython3(3.9 in this local environment); they fail the same way onmain.ruff checkandruff format --checkare clean on the changed Python files, andscripts/check_oss_boundary.pypasses.🤖 Generated with Claude Code