Skip to content

data ingest/delete: misleading validation error messages (delete '(set --name)' on a positional arg, keypoints 0/neg, --label-policy type-noise) #76

Description

@saadqbal

Severity: LOW (error-message quality). Three confusing messages found during the #67 stress sweep; framing refreshed 2026-07-11 to the current data ingest / data delete verbs. All three still reproduce.

(a) data delete "" points at a flag the command doesn't have

tracebloc data delete ""# → Error: ... dataset name is required (set --name)

But data delete takes a positional<dataset> argument — there is no --name flag on delete (that's data ingest). The message comes from the shared push.ValidateTableName (internal/push/spec.go ~L100-102), and data_delete.go (~L110) calls it with no empty-arg pre-guard. Should be: dataset name is required — pass it as an argument: tracebloc data delete <dataset>.

(b) --number-of-keypoints 0 (or negative) says you didn't provide it

tracebloc data ingest ... --task keypoint_detection --number-of-keypoints 0
# → Error: keypoint_detection requires --number-of-keypoints ...
tracebloc data ingest ... --task keypoint_detection --number-of-keypoints -5
# → same "requires" message

The user did pass the flag. data.go (~L719) branches on NumberOfKeypoints <= 0 with a single "requires" message and no Changed/set-tracking, so it conflates "unset" (Go int zero value) with "set to an invalid value (≤ 0)". Distinguish them: --number-of-keypoints must be a positive integer (got 0).

(c) Bad --label-policy leaks an internal schema representation

tracebloc data ingest ... --task tabular_regression --label-policy banana
# → synthesized spec failed schema validation (2 issues):# label: got object, want string <-- internal noise, baffling to a user# label.policy: value must be one of 'passthrough', 'bucket'

The second line is the real, useful error. The first ("label: got object, want string") is an artifact of how the regression label is encoded as an object and should be suppressed when the more specific label.policy error is present (no type-noise suppression exists in validate.go today).

Part of #67.

Metadata

Metadata

Assignees

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