Skip to content

Missing --label-column on a tabular task gives a cryptic raw-schema error instead of naming the flag #214

Description

@LukasWodka

Found during functional review of the data-ingest flow on develop (2026-07-10).

What

Omitting --label-column for a label-requiring tabular task in non-interactive mode produces a raw JSON-schema dump that never mentions --label-column:

$ tracebloc data ingest ./data.csv --task tabular_classification --name t --dry-run --no-input
synthesized spec failed schema validation (2 issues):
label: got string, want object
label: minLength: got 0, want 1
Error: synthesized spec failed schema validation; check the flag values above

(exit 2)

Contrast: a wrong--label-column value gets a friendly guard — "Pass --label-column with one of the existing columns …" (internal/push/preflight.go:~148, CheckLabelColumn).

Why

Ordering: schema validation (internal/cli/data.go, step 4) runs beforerunLocalPreflight (which holds CheckLabelColumn), so an empty label="" trips the ingest.v1.jsonlabel oneOf(string|object) before the friendly guard fires. Generalizes to tabular_regression / time_series_forecasting (label: got object, want string), all exit 2, none naming the flag.

Scope

Non-interactive / CI only — interactive mode prompts for the label (internal/cli/interactive.go:299/376). Pre-existing (predates #210). Correct exit code (2); message quality only.

Fix direction

Detect the empty-required-label case before raw schema validation (or reuse CheckLabelColumn's message) so the error names --label-column and lists the candidate columns.

Severity: LOW. Verified on the real develop binary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions