Uh oh!
There was an error while loading. Please reload this page.
test(push): pin preflight label + time-series validators - #263
Merged
Conversation
…on survivors) Second follow-up from the mutation pass. Gremlins found unguarded boundaries in the preflight validators — the ingestion-correctness gates. Add pure, fixture- free unit tests that each KILL a surviving mutant: - CheckLabelColumn: a label column in the FIRST header slot (index 0) must be accepted (kills matchColumnIndex(...) >= 0 -> > 0) - CheckAnnotationPairing: an asymmetric mismatch reports only the orphaned side (kills len(noAnn) > 0 / len(noImg) > 0 -> >= 0, which emitted a bogus "0 X ()") - labelConstantViolation: constant-label-per-sequence rule + the "+N more" truncation boundary (exactly 5 offenders -> no "(+N more)"; kills len > 5 -> >= 5) - perGroupTimeViolation: numeric-time ordering + BOTH truncation boundaries (invalid-values and out-of-order) - isNumericTimeColumn: numeric (INT/FLOAT/DECIMAL/...) vs temporal branch selector 3 representative mutants mutation-proven (matchColumnIndex boundary, len>5 truncation, len>0 clause); the parallel truncation/asymmetric cases share the same operator. Equivalent mutants (isNumericTimeColumn's post-trim index-0 IndexByte guards) deliberately not chased. Pure additive test file. make ci green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LukasWodka
commented
Jul 14, 2026
ContributorAuthor
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d064b5a. Configure here.
saadqbal
approved these changes
Jul 14, 2026
saadqbal
left a comment
Collaborator
There was a problem hiding this comment.
LGTM 👍 Solid mutation-kill coverage — verified the index-0 CheckLabelColumn boundary (>=0 not >0), the asymmetric annotation-pairing clauses, the len > 5 truncation edges (5→no '+N more', 6→'+1 more'), and the isNumericTimeColumn suffix/UNSIGNED normalization. Each case earns its place.
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 freeto 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
Second follow-up from the mutation-testing pass — the
preflight.gocluster (the biggest, 35 survivors). These are the ingestion-correctness gates, so an unguarded boundary here silently lets a bad dataset through local pre-flight. This PR takes the pure / in-memory-testable validators (no fixtures) and kills their survivors:CheckLabelColumnmatchColumnIndex(...) >= 0→> 0CheckAnnotationPairinglen(noAnn) > 0/len(noImg) > 0→>= 0"0 X ()")labelConstantViolationlen(shown) > 5→>= 5"+N more"truncation (exactly 5 → no(+N more))perGroupTimeViolationlen > 5truncationsisNumericTimeColumnMutation-proven: 3 representative mutants (the
matchColumnIndexboundary, alen > 5truncation, alen > 0clause) were flipped in-source and confirmed to fail the matching test; the parallel truncation/asymmetric cases share the same operator.Deliberately not chased: the
isNumericTimeColumnIndexByteguards (equivalent — post-TrimSpace, index-0 is impossible). The fixture-needing validators (ValidateImages,CheckCSVEncoding,scanTSCRows,CrossCheckLabels,HasBOM) are a natural follow-up.Test plan
make cigreen (build, vet, gofmt -s,go test -race, errcheck/ineffassign/misspell, schema-check). Pure additive test file; no production change.🤖 Generated with Claude Code
Note
Low Risk
Test-only additive change; strengthens guards on ingestion preflight behavior with no runtime impact.
Overview
Adds
internal/push/preflight_validators_test.go, a pure in-memory test suite that locks down edge cases in push preflight validators (no production code changes).Coverage targets gremlins survivors:
CheckLabelColumnaccepts a label in the first header column (index 0);CheckAnnotationPairingreports only the orphaned side on asymmetric image/annotation mismatches;labelConstantViolationandperGroupTimeViolationenforce constant labels per sequence, numeric time ordering, and the exactly 5 vs 6"(+N more)"error truncation boundaries;isNumericTimeColumndistinguishes numeric SQL types from temporal/text and missing columns.Reviewed by Cursor Bugbot for commit d064b5a. Bugbot is set up for automated code reviews on this repo. Configure here.