Skip to content

rust(feat): explore_url truncates time bounds to milliseconds and echoes them - #786

Merged
lineville merged 1 commit into
mainfrom
eng-0000-document-explore-url-millisecond-precision
Sep 10, 2026
Merged

rust(feat): explore_url truncates time bounds to milliseconds and echoes them#786
lineville merged 1 commit into
mainfrom
eng-0000-document-explore-url-millisecond-precision

Conversation

@lineville

@lineville lineville commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description

Explore URLs encode startTime / endTime with millisecond precision, so nanosecond bounds passed to explore_url lose their sub-millisecond part in the link. Agents then report nanosecond bounds that do not match the URL.

  • Tool description states that the URL truncates each bound to the whole millisecond and tells the agent to pre-truncate.
  • The result echoes the truncated start_time_unix_nanos / end_time_unix_nanos in the structured content and the next_step text. Both are omitted when no window is given.
  • The description test reads from the tool router instead of include_str!. New tests cover the truncation helper, the echoed fields, and the no-window case.

Companion to sift-stack/azimuth#14207.

Verification

  • cargo test -p sift_mcp: 512 passed.
  • cargo clippy -p sift_mcp --all-targets --all-features: no new warnings.

…oes them

Explore URLs serialize startTime/endTime as ISO 8601 with millisecond
precision, so nanosecond bounds passed to `explore_url` lose their
sub-millisecond part in the link. Agents that reported the exact
nanoseconds alongside the link were judged inconsistent in the UCE
explore deep-link eval.

- Describe the truncation in the tool description, with an example, and
  tell the agent to pre-truncate to whole milliseconds so the value it
  passes survives JSON number conversion and matches the URL.
- Echo the millisecond-truncated `start_time_unix_nanos` /
  `end_time_unix_nanos` in the structured result and next_step text so
  the agent can report the bounds the URL actually encodes.
- Test the description through the tool router instead of the source
  text, and cover the truncation helper and echoed fields.

Claude-Session: https://claude.ai/code/session_01Nfr86V5vvQG2xhfMP1veCa
@lineville
lineville marked this pull request as ready for review September 10, 2026 01:13
@lineville
lineville merged commit ecc5e8f into main Sep 10, 2026
22 checks passed
@lineville
lineville deleted the eng-0000-document-explore-url-millisecond-precision branch September 10, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants