fix(moarstats): gate per-pair bivariate skip diagnostics behind log::warn!#3894
Merged
jqnatividad merged 1 commit intoMay 23, 2026
Merged
Conversation
…warn! Codex review (job 2383, MEDIUM) flagged that PR #3892's instrumentation turned every per-pair skip into an unconditional wwarn! stderr write. Zero-variance, both-constant, cardinality==rowcount, and type-filter skips are routine for many datasets, and the field_pairs loop visits O(n²) pairs — so a healthy moarstats --bivariate run on a wide CSV would now flood stderr. Switch all nine per-pair skip warnings from wwarn! back to log::warn!: - field1_bad_type, field1_missing_in_csv - field2_bad_type, field2_missing_in_csv - zero_stddev, zero_variance (the two-branch case) - both_constant, card_eq_rowcount, type_filter These are now gated behind QSV_LOG_LEVEL — set QSV_LOG_LEVEL=warn to surface them in the qsv log file when actually debugging a flake. The post-loop summary stays as winfo!: it's a single line that already carries the aggregate per-reason skip counts and the full csv_headers — enough signal to spot the corruption mode without per-pair noise. The hard-fail guard for joined-input corruption is unaffected. Healthy left-join repro: stderr is now clean of per-pair 'skipping' lines, output still produces 5 pairs. All 80 moarstats tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
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
wwarn!calls in the bivariatefield_pairsconstruction loop switched back tolog::warn!. They are now gated behindQSV_LOG_LEVEL(setQSV_LOG_LEVEL=warnto surface them in the qsv log file).winfo!— one stderr line per run that carries the aggregate per-reason skip counts and the fullcsv_headers. Enough signal to spot the corruption mode without per-pair noise.Why
Codex review job 2383 (MEDIUM) flagged that PR #3892's instrumentation turned every per-pair skip into an unconditional
wwarn!stderr write. Zero-variance, both-constant,cardinality==rowcount, and type-filter skips are routine for many datasets, and the field_pairs loop visits O(n²) pairs — so a healthymoarstats --bivariaterun on a wide CSV would have flooded stderr.Test plan
cargo test -F all_features test_moarstats::— 80/80 passingskippinglines; output still produces 5 pairs as expected🤖 Generated with Claude Code