Skip to content

scheduler: record TTFT marks for promoted and multi-chunk prefills (restores 0.4.0's trace hooks) - #306

Merged
AzeezIsh merged 1 commit into
mainfrom
fix/ttft-trace-promote
Nov 1, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
fix/ttft-trace-promote

Conversation

@AzeezIsh

@AzeezIsh AzeezIsh commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Our port of the TTFT trace (Enntity 0f58f7a4b, in #285) left out 0.4.0's hooks in phase_promote_prefills.rs. As a result, multi-chunk and promoted prefills never recorded FirstSampled or visible_at_prefill. On main, every such request's ATLAS_TTFT_TRACE line reads pf_sync=- steps=1 first=none, where 0.4.0 shows the prefill timing and steps=0. That made main's traces impossible to compare with 0.4.0's: I found this while chasing a strict-mode follow-up-turn TTFT difference, which turned out to be just the order in which concurrent conversations' prefills were served.

This restores the 8-line hunk exactly as 0.4.0 has it. It's trace hooks only; nothing changes with ATLAS_TTFT_TRACE unset.

Test plan

  • spark-server bin tests 3002/0. clippy (with and without --tests) is clean.
  • Pair gate on reiner + spark2 against main 3bd5d7b1e, both built fresh. Receipts are in reiner's ~/code/night1027/out/dap-ttft-ad097c2cb/.
    • KL logit drift exactly 0: 34,245 of 34,245 positions in each of 2 spark boots, and 36,765 of 36,765 on rc16 with vision.
    • Bench medians are inside main's run-to-run range.
    • Greedy C1 and C8 8/8 identical, tools 21/21.

Generated with Devin

phase_promote_prefills never called ttft_trace::mark / visible_at_prefill,
so promoted and multi-chunk prefills logged pf_sync=- steps=1 first=none.
Port the mark site from Enntity/atlas 0f58f7a (0.4.0 9b25f57): the
FirstSampled mark and visible_at_prefill land where the promoted sequence's
first token is known. Trace hooks only, no behaviour change.
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.

1 participant