IntentGuard

S02.2 — Validate canonical splits, label mapping, and provenance

Planning / historicaltaskdelivery

Historical

Planning material. It summarizes and links to the authoritative specification and the current measured state — it does not replace either, and it is not current engineering truth.

Migration identity#

  • Canonical identifier: S02.2 (GitHub issue type: subtask).
  • Legacy identifier: C02.2 (retained as old_identifier).
  • Parent epic: E02.
  • Milestone: M1 — IntentGuard Weekend MVP.

Objective#

Preserve the canonical test split, derive validation deterministically from training data, validate 77 labels, and write reproducible fingerprints.

Rationale#

Stable membership and labels protect comparison validity and prevent test leakage.

Parent identifier#

E02.

Source task#

T-002.

Traceability#

Primary: FR-001. Secondary: AC-001, NFR-001, NFR-008.

Prerequisites#

C02.1 returns the verified upstream dataset.

Likely files#

src/intentguard/data.py, configs/default.toml, tests/contract/test_data_contract.py, data/ provenance JSON.

Implementation boundary#

Split, schema, label, and provenance logic only; no model-dependent preprocessing.

MUST scope#

Train/validation/test membership, non-overlap, deterministic seed, label IDs/names, counts, fingerprints, and test isolation.

Explicit non-goals#

Cross-validation, alternate split search, relabeling, class balancing, or test-driven choices.

Acceptance criteria#

Repeated preparation yields identical validation membership and label mapping; split overlap is zero; test remains upstream canonical; provenance is complete.

Validation commands#

make data && uv run pytest tests/contract/test_data_contract.py -q.

Expected evidence#

Split counts/fingerprints, label-map checksum, seed, revision, and non-overlap assertions.

Fallback and status consequence#

Any changed or synthetic split is Partial unless explicitly approved as a scope change; strict MVP fails.

Stop condition#

Stop on overlap, label mismatch, nondeterminism, missing revision, or test-label use.

Definition of ready#

Pinned loader is complete and the validation-split rule is frozen.

Definition of done#

All split/label/provenance assertions pass twice with identical outputs.

Labels#

type:subtask, priority:MUST, area:data

Estimate#

0.75 hour.

Related in repository

Open in full graph →
DOCUMENTED_BYDOCUMENTED_BY — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.md § S02.2 — Validate canonical splits, label mapping, and provenanceREFERENCESREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.mdPART_OF — source: docs/backlog/TRACEABILITY.md § Functional requirementsPART_OF — source: docs/backlog/TRACEABILITY.md § Functional requirementsREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.md § TraceabilityREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.md § TraceabilityREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.md § TraceabilityREFERENCES — source: docs/backlog/tasks/C02.2-canonical-splits-provenance.md § TraceabilitySATISFIES — source: docs/specification/docs/TRACEABILITY.md § Functional traceabilityREFERENCES — source: docs/backlog/umbrellas/U02-banking77-data-contract.md § TraceabilityREFERENCES — source: docs/backlog/umbrellas/U02-banking77-data-contract.md § TraceabilityREFERENCES — source: docs/backlog/umbrellas/U02-banking77-data-contract.md § TraceabilityCURRENTdocument: S02.2 — Validate canonical splits, label mapping, and provenanceS02.2task: S02.2AC-001 — Data contractacceptance-criterion: AC-001 — Data contractE02epic: E02FR-001 — Dataset prepara…requirement: FR-001 — Dataset preparationNFR-001 — Local compatib…requirement: NFR-001 — Local compatibilityNFR-008 — Dependency con…requirement: NFR-008 — Dependency controlT-002 — Pinned dataset p…task: T-002 — Pinned dataset provenance and validated splits
Hover an edge for its provenance · click a node to open it8 nodes · 18 edges