Skip to content

Reject conflicting output modes and ignored replay options - #148

Merged
lance0 merged 2 commits into
masterfrom
fix/output-mode-validation
Oct 16, 2026
Merged

lance0 merged 2 commits into
masterfrom
fix/output-mode-validation

Conversation

@lance0

@lance0 lance0 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Commands such as ttl -c 1 --json --csv host previously succeeded but emitted only the first format selected by main's dispatch order. Similarly, --diff --csv silently produced text and --replay file --animate --report ignored animation. Replay speed validation also admitted NaN.

Reject conflicting batch formats, formats unsupported by diff, and animation combined with non-interactive output before opening files or starting probes. Require a finite replay speed within the existing 0.1–1000 range. Supported live, replay and diff combinations retain their behavior; the scripting guide now makes the choices explicit.

Validation: regressions for all four invalid-option cases failed before the fix and pass afterward. Positive tests cover each batch format, snapshot replay, JSON diffs and valid speed boundaries. Also passed cargo build --locked, cargo test --locked, cargo clippy --locked --all-targets -- -D warnings, cargo fmt -- --check, and rustdoc with warnings denied.

lance0 and others added 2 commits October 15, 2026 22:38
--stream-json, --daemon and --prometheus already declare their conflicts
with conflicts_with_all; express the batch-format, diff and animate
conflicts the same way so clap reports them with the standard usage
error. Only the replay speed finiteness check remains in validate().
@lance0
lance0 marked this pull request as ready for review October 16, 2026 15:35
@lance0
lance0 merged commit be0cef7 into master Oct 16, 2026
6 checks passed
@lance0
lance0 deleted the fix/output-mode-validation branch October 16, 2026 15:35
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