fix(cli): fix flush 413 infinite loop, add timeout/progress, fix status pending check#122
Merged
softberries merged 2 commits intomainfrom Apr 23, 2026
Merged
Conversation
Set update=none on both submodules so --recurse-submodules skips them. Switch website to HTTPS so it can be inited without an SSH key.
…g check - Add StreamEventRequest::truncate_large_fields() to core; drop transcript lines, then tool_response, then tool_input until payload is under 512 KB - Call truncation in stream before saving to pending.jsonl (root cause fix) - Call truncation in flush before each send (fixes already-queued events) - Don't re-enqueue 413 failures in flush — retrying oversized events loops forever - Add per-event progress output to flush (\r overwrite) so it doesn't appear hung - Add 60s timeout to reqwest client so flush can't hang indefinitely - Fix status session check: count non-empty pending.jsonl instead of .pushed marker files (which only the old batch push command ever created); update message to reference `tracevault flush`
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
flushwas re-enqueuing events that failed with 413 Payload Too Large, which would fail again forever. Now 413s are dropped with a clear warning.StreamEventRequest::truncate_large_fields()added to core — dropstranscript_lines→tool_response→tool_inputin order until payload is under 512 KB. Called instreambefore writing topending.jsonl, and influshbefore each send (covers already-queued oversized events).reqwest::Client::new()had no timeout. Added 60s timeout so a silent server fails fast instead of hanging indefinitely.\r Session <id> — event N/M ...output per event so the user can see it's working.session_checkswas looking for.pushedmarker files, which only the old batchpushcommand ever created — so all sessions always showed as unpushed. Now counts non-emptypending.jsonlfiles instead, which is the actual streaming queue. Message updated to referencetracevault flush.Test plan
tracevault streamwith a large file write — confirm no 413 on next flushpending.jsonl, runtracevault flush— confirm it truncates and sends (or drops with clear message), does not looptracevault stream, restore server, runtracevault flush— confirm progress output and successful sendtracevault status— confirm pending count reflectspending.jsonlcontents, not.pushedfiles