Skip to content

fix(log): keep the latest distinct unclassified example - #5377

Open
zhiwuyazhe-fjr wants to merge 1 commit into
rtk-ai:developfrom
zhiwuyazhe-fjr:codex/fix-5353-log-outcome
Open

zhiwuyazhe-fjr wants to merge 1 commit into
rtk-ai:developfrom
zhiwuyazhe-fjr:codex/fix-5353-log-outcome

Conversation

@zhiwuyazhe-fjr

Copy link
Copy Markdown
Contributor

Fixes #5353. Follow-up to #5287.

The three [other] examples used to fill up at the start of the log. A run with 30 numbered polls followed by cache warmed counted all 31 lines but displayed only the first three polls.

The shared analyzer now keeps the first two distinct examples and uses the third slot for the most recent unclassified line that differs from those two. A repeat of an opening example does not displace the outcome. The count, three-line limit and character limit stay the same.

Verification

  • Replayed the poll, HTTP/traceback and Java stack-trace examples through rtk pipe -f log. The base binary omitted the final outcome in all three. The patched binary displayed it in all three.
  • Extended the existing regression test with an exit message followed by a repeated opening line and a classified line.
  • Passed cargo fmt --all --check, cargo clippy --all-targets -- -D warnings and cargo test --all on Linux.

@yeahjack yeahjack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replayed the numbered polls on aa2c57d and cache warmed now shows up. I found a related case when a training run writes its checkpoint before worker cleanup.

{
  printf '2026-11-29T14:12:%02dZ waiting for all ranks\n' 0 1
  echo 'Saved checkpoint /runs/nq/checkpoint-1500'
  printf 'releasing dataloader worker %s\n' 0 1 2 3 4 5 6 7
} | rtk pipe -f log

[other] counts all 11 lines and shows both waits and releasing dataloader worker 7. The checkpoint path drops out. I also tried #4077 on this input and all five tail lines were cleanup messages.

I tested a small follow-up that moves the checkpoint into the second slot just before it would be evicted, when the two opening lines differ only by their timestamps. The three examples then show the first wait, the checkpoint path and the last cleanup line. I’ll send that separately after this lands.

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.

rtk log [other] examples: repeated leading lines take all three slots and hide a later outcome line

2 participants