feat(ingestion): show stash dwell and retry timing in batch flow graph - #71071
Merged
Conversation
Deferred work previously showed only that it was stashed; the flow graph now shows when it was deferred, how long it waited before each flush, per-worker flushed message counts with dwell on the edges, retry counts on the assign edges, and waited durations on the lifecycle timeline.
jose-sequeira
marked this pull request as ready for review
July 15, 2026 14:21
z0br0wn
approved these changes
Jul 15, 2026
Contributor
|
Reviews (1): Last reviewed commit: "feat(ingestion): show stash dwell and re..." | Re-trigger Greptile |
The consumer's flush_deferred never recorded a DeferredFlushed debug event, so the debug UI showed deferred batches as awaiting flush forever. Also measure timeline dwell from the first deferral of a stash cycle instead of the latest, and round durations before picking the unit so minute boundaries don't render as 60.0s or 1m 60s.
jose-sequeira
enabled auto-merge (squash)
July 15, 2026 15:09
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.
Problem
Follow-up to #71033. In the consumer debug batch detail view, a deferred batch only shows that work was stashed ("flushed & re-routed" or "awaiting flush"). The events carry timestamps, but the flow graph drops them when aggregating, so you can't see when the work was deferred, how long it sat stashed, or when and where it was retried without diffing lifecycle timestamps by hand.
Changes
ts_mson deferred, flushed, retry, and exhausted entries instead of discarding it.fmtDurhelper (ms / s / m formatting).How did you test this code?
Browser-only vanilla JS with no test harness. I extracted the inline script and ran
node --checkfor syntax, plus a node unit test ofbuildFlowwith a synthetic batch (deferred at t, flushed at t+340ms to one worker, one retry on another) asserting the stash node dwell text, the flush edge label, the retry edge label and color, thefmtDurformats, and the "awaiting flush" state for a still-stashed batch. I was not able to exercise it against a live consumer in this session.Automatic notifications
Docs update
Internal debug tooling, no user-facing docs affected.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Authored with Claude Code, directed by José: the deferred/stash graphics didn't show how and when stashed work was retried. I (Claude) threaded the existing event timestamps through the client-side batch model rather than adding new backend events, since the SSE stream already carries
ts_mson every event. Dwell on flush edges is measured against the first deferral of the batch, which is an approximation when a batch defers multiple times — the lifecycle timeline has the exact per-event gaps.