Skip to content

test(push): extend validator-parity corpus to all 16 categories (35 -> 67 cases)#310

Merged
saadqbal merged 1 commit into
developfrom
test/288-parity-corpus-all-categories
Jul 14, 2026
Merged

test(push): extend validator-parity corpus to all 16 categories (35 -> 67 cases)#310
saadqbal merged 1 commit into
developfrom
test/288-parity-corpus-all-categories

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Extends the validator-parity corpus (backend#828 P3 harness) from 35 to 67 cases: every one of the 16 schema categories now ends with ≥1 parity case, and every mirrored Go preflight check ends with ≥1 valid + ≥1 violation case. WS-C.3 of the epic tracebloc/backend#1106.

Fixes #288

What's covered (ticket priority order)

Tier 1 — mirrors existed with zero cases:

  • object_detection (4): CheckAnnotationPairing in both directions (image w/o annotation, orphan annotation) + happy path; objdet-bad-xml documents the PascalVOCXMLValidator under-preview (in-cluster reject, no CLI mirror).
  • semantic_segmentation (4): CheckMaskPairing (missing mask, non-_mask name) + happy path; semseg-missing-mask-id is a pin-scoped divergence — the CLI previews the backend#816 mask_id contract (CheckMaskIdColumn), but the pinned ingestor ref (7b4ecac, the di#359 merge) predates di#358's MaskIdColumnValidator, so the REAL pinned preflight accepts. The case note says to flip it to reject/reject at the cli#286 pin bump; the goldens regen will flag exactly this case.
  • keypoint_detection (3): happy path (Annotation/Visibility JSON columns), kp-res-mismatch pinning that the image-family common mirrors (ValidateImages) cover keypoint too, kp-bad-annotation documenting the KeypointAnnotationValidator under-preview.

Tier 2 — the 7 text formats (13 new): token_classification (BIO ok w/ value-parity, missing label column, bad-tag under-preview), sentence_pair_classification (ok w/ value-parity, uniform-label diversity reject, malformed-pair under-preview), mlm / clm / seq2seq / embeddings happy paths, emb-malformed, mlm-missing-files (IngestableRecords' referenced-file cross-check has no text-family CLI mirror), text-clf-label-uniform.

Tier 3 — tabular_regression / TSF / TTE (8 new): happy paths; tabreg-label-uniform as an over-reject guard (regression must NOT hit the diversity gate on either side); tabreg-label-missing (the read-time divergence twin of tabular-label-missing); documented under-previews for TSF global time order, TSF's fixed-timestamp schema rule, and TTE's negative-time rule.

The accept/reject under-previews above are honest documentation of preview gaps (same pattern as imgc-missing-file), each flagged in its manifest note as a candidate future mirror.

Harness change (one, surgical)

runGoPreflight in parity_golden_test.go now populates LocalLayout.Sidecars (annotations/, masks/, texts/, sequences/) the way production Discover does — without it the object_detection/semseg pairing previews see an empty sidecar set and reject every case. No production code touched.

Deviation from the ticket text

The ticket estimated ~45 cases; full per-violation-class coverage of the three zero-case mirrors plus the text/tabular tiers landed at 67. All 32 new cases are included in this one PR — no follow-up remainder.

What ran locally

  • scripts/gen-validator-goldens.py against the pinned data-ingestors ref 7b4ecac (extracted via git archive, venv with pandas/Pillow/sqlalchemy/ijson/requests/tenacity/tqdm): all 67 verdicts match the manifest; the existing 35 golden entries are byte-identical (zero drift).
  • scripts/sync-validator-goldens.sh --check → "validator goldens in sync".
  • go test ./internal/push/ -run TestValidatorParity -v → 67/67 subtests pass (incl. value-parity for token-clf-ok / sentpair-ok).
  • go test ./..., go build ./..., gofmt -l, go vet → all green.

Rebase expectation

Based on origin/develop with the current pin — fix/286-pin-bump did not exist on origin at branch time. When the cli#286 pin-bump PR lands, this corpus needs one deliberate follow-up on rebase: regenerate the goldens at the new pin and flip semseg-missing-mask-id to reject/reject (its note spells this out). Merge order is otherwise flexible; no shared-file conflicts expected with sibling PRs (this PR touches only the parity corpus + its test harness).

🤖 Generated with Claude Code


Note

Low Risk
Test-only changes (parity manifest, fixtures, and golden harness helper); no production push/preflight behavior is modified.

Overview
Grows the validator-parity harness from 35 to 67 cases so every schema category has at least one fixture and mirrored Go preflight checks get both pass and fail examples. New coverage spans object_detection / semantic_segmentation pairing (annotations, masks, mask_id), keypoint_detection, the remaining text task types, and tabular_regression / time_series_forecasting / time_to_event_prediction, with manifest notes for deliberate CLI vs ingestor divergences and documented under-previews.

The only harness code change is listSidecars in parity_golden_test.go, which fills LocalLayout.Sidecars from case directories (annotations/, masks/, texts/, sequences/) like production Discover—fixing false rejects on OD/semseg pairing tests (cli#288). goldens.json is regenerated for the new cases; production preflight logic is unchanged.

Reviewed by Cursor Bugbot for commit a716a89. Bugbot is set up for automated code reviews on this repo. Configure here.

…> 67 cases)

Every schema category now ends with >=1 parity case; every mirrored
preflight check ends with >=1 valid + >=1 violation case (cli#288, WS-C.3
of tracebloc/backend#1106).

New coverage, in the ticket's priority order:

- object_detection (4): CheckAnnotationPairing both directions +
  a documented PascalVOCXMLValidator under-preview (objdet-bad-xml).
- semantic_segmentation (4): CheckMaskPairing (missing mask, non-_mask
  name) + semseg-missing-mask-id — a PIN-SCOPED divergence: the CLI
  previews the backend#816 mask_id contract, but the pinned ingestor
  (7b4ecac, di#359) predates di#358's MaskIdColumnValidator, so its
  preflight accepts. Flip to reject/reject at the cli#286 pin bump.
- keypoint_detection (3): happy path (Annotation/Visibility JSON),
  kp-res-mismatch pinning the image-family commons cover keypoint too,
  + a documented KeypointAnnotationValidator under-preview.
- text formats (13): token_classification (BIO ok / missing label
  column / bad-tag under-preview), sentence_pair_classification
  (ok+value-parity / uniform-label / malformed-pair under-preview),
  mlm, clm, seq2seq, embeddings happy paths + emb-malformed and
  mlm-missing-files (IngestableRecords file cross-check has no text
  mirror), text-clf-label-uniform.
- tabular_regression / TSF / TTE (8): happy paths, tabreg-label-uniform
  as an over-reject guard (no diversity gate for regression on either
  side), tabreg-label-missing (the read-time divergence twin), and
  documented under-previews: TSF global time order, TSF fixed-timestamp
  schema rule, TTE negative-time.

Goldens regenerated from the REAL ingestor validators at the pinned ref
(scripts/gen-validator-goldens.py; existing 35 entries byte-identical).
runGoPreflight now populates LocalLayout.Sidecars (annotations/, masks/,
texts/, sequences/) the way production Discover does — without it the
object_detection/semseg pairing previews would see an empty sidecar set.

Fixes #288

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@LukasWodka
LukasWodka requested a review from saadqbal July 14, 2026 12:32
@LukasWodka

Copy link
Copy Markdown
Contributor Author

👋 Heads-up — Code review queue is at 50 / 30

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

  • averaging-service#181 — feat(weights): normalize-on-read — mixed cycles average instead of rejecting (SEC-03 §8 step 2) · author: @shujaatTracebloc · no reviewer assigned
  • averaging-service#182 — feat(weights): averaging writes SafeTensors (TF + PyTorch) — SEC-03 §8 step 4 · author: @shujaatTracebloc · no reviewer assigned
  • backend#1079 — feat(global_meta): edge dataset_meta exposure + attributes contract at ingest (#924 G4a) · author: @divyasinghds · no reviewer assigned
  • backend#1086 — docs(rfc): SafeTensors weight-format migration — SEC-03 Phase 1 (RFC 0004) · author: @shujaatTracebloc · no reviewer assigned
  • backend#1093 — chore(deps): bump django from 5.2.14 to 5.2.15 · author: @dependabot · no reviewer assigned
  • backend#1095 — feat(experiment): configurable preprocessing knobs incl. tabular scaler — RFC 0003 L1 + L1b (#1094) · author: @LukasWodka · no reviewer assigned
  • backend#1100 — fix(boot): pin SDK install to tracebloc==0.11.2, drop 404 dev line (#1098) · author: @LukasWodka · reviewer: @saqlainsyed007
  • backend#1105 — perf(api): query micro-fixes — notifications N+1, cached data_scientist, composite index, sampling (#975) · author: @aptracebloc · no reviewer assigned
  • backend#1107 — perf(experiments): prefetch ExperimentListSerializer relations + cache carbon intensity (#977) · author: @aptracebloc · reviewer: @saadqbal
  • cli#266 — main - > enhance CLI features and tests · author: @saadqbal · no reviewer assigned

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@LukasWodka

Copy link
Copy Markdown
Contributor Author

@BugBot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 a716a89. Configure here.

@LukasWodka
LukasWodka changed the base branch from develop to fix/286-pin-bump July 14, 2026 12:49
@LukasWodka LukasWodka self-assigned this Jul 14, 2026
@LukasWodka

Copy link
Copy Markdown
Contributor Author

@BugBot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 a716a89. Configure here.

saadqbal
saadqbal previously approved these changes Jul 14, 2026

@saadqbal saadqbal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Good corpus expansion to all 16 categories. The harness cross-checks declared ingestor_verdict ↔ goldens.json ↔ CLI verdict per case (67, all green), so it's internally consistent. One heads-up: the goldens authenticity gate (goldens-drift, #308) isn't on this branch — worth confirming that job stays green over these new cases once both #308 and this land on develop, since that's what actually re-derives the goldens from the real validators. (Stacked on #305.)

Base automatically changed from fix/286-pin-bump to develop July 14, 2026 14:30
@saadqbal
saadqbal dismissed their stale review July 14, 2026 14:30

The base branch was changed.

@saadqbal

Copy link
Copy Markdown
Collaborator

Status: no code issue — the approval was dismissed when the base retargeted to develop after #305 merged (dismiss_stale_reviews is on). Just needs a fresh review to unblock.

@saadqbal saadqbal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving — unchanged 67-case parity corpus (approval was dismissed on the retarget to develop after #305 landed). Content is what I reviewed. 👍

@saadqbal
saadqbal merged commit d466c2c into develop Jul 14, 2026
25 checks passed
@saadqbal
saadqbal deleted the test/288-parity-corpus-all-categories branch July 14, 2026 16:10
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.

2 participants