Repository navigation
Handle closed stdout, report align's dropped input, and tidy CLI edge cases - #4
Merged
Merged
Conversation
ts-series and ts-align panicked (exit 101) and ts-burst exited 1 with a
raw `Error: Os { .. BrokenPipe .. }` when piped into `head`; ts-dist had
the same latent issue. They now write through a BufWriter and treat
BrokenPipe as a clean stop, matching ts-window / ts-window-audit /
ts-timeline.
ts-align silently ignored unparseable lines and collapsed duplicate
timestamps, so its per-file counts hid both. It now reports each per file
on stderr, like the other tools' `skipped N` line.
main mixed io::Result with std::process::exit; read and write errors now print a ts-burst: message instead of Rust's Debug-formatted Error.
fmt_val's integer branch rendered -0.0 as "-0" (e.g. a CloudWatch value of -0). Tooltips in timeline still show the raw value.
--from/--to/--field (window), --from/--to/--limit (window-audit), --window (correlate) and --display-offset (timeline) silently kept the last value, so a mistyped repeat changed the query without notice. --series stays repeatable.
The fallback compared Display strings, so -0 and 0 counted as distinct and the label read "min -0 · max 0" despite fmt_val normalizing -0.
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
ts-seriesandts-alignpanicked (exit 101) andts-burstexited 1 withError: Os { code: 32, kind: BrokenPipe, .. }when piped into| head.ts-disthad the same latent issue viaprintln!. All four now write through aBufWriterand treatBrokenPipeas a clean stop (exit 0), matchingts-window/ts-window-audit/ts-timeline.ts-aligndrops from its input. Unparseable lines were skipped silently, and duplicate timestamps collapsed to the last value, so the per-file counts in the stderr summary hid both. Each is now reported per file on stderr (skipped N unparseable line(s),N duplicate timestamp(s), last value kept). Join behavior and stdout are unchanged.ts-burstreturnExitCodelike the other tools. Read/write errors now print ats-burst: …message instead of Rust's Debug-formattedError.-0as0ints-seriesvalues andts-timelinemin/max labels.fmt_minmaxnow compares min/max numerically, so a-0/0pair no longer falls back to the rawmin -0 · max 0. Tooltips ints-timelinestill show the raw value.--from/--to/--field(ts-window),--from/--to/--limit(ts-window-audit),--window(ts-correlate),--display-offset(ts-timeline).--seriesstays repeatable.ts-correlate,ts-align,ts-timeline), matchts-align's stderr summary wording, and mention its skipped/duplicate reporting.Verification
closed_stdout_exits_quietlyfor burst / series / dist / align. stdout is a pipe whose read end is dropped before spawn, so every write deterministically hits a closed pipe.reports_skipped_lines_and_duplicatesfor align (fixturedup.txt).negative_zero_prints_as_zero(series CLI), plus-0cases forfmt_val/fmt_minmaxin timeline's unit tests.rejects_repeated_*for window / window-audit / correlate / timeline.fmt_minmaxtests fail without their fixes and pass with them.| head -1exits 0 for series / align / burst, andts-timelinelabels a-0/0series asmin 0 · max 0.🤖 Generated with Claude Code