Uh oh!
There was an error while loading. Please reload this page.
feat(data ingest): rename --category/--table/--intent → --task/--name/--split (#180a) - #197
Conversation
LukasWodka
commented
Jul 9, 2026
Pushed the two review fixes (ba01f9e). A — reverted the Default-train decision (kept): omitting B — tightened table-name validation to mirror the ingestor. The ingestor's
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ba01f9e. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…e/--split (#180a) RFC-0002 §6 flag renames — the mechanical half of #180 (the data-first flow inversion is #180b, stacked separately). Every old flag stays on as a HIDDEN deprecated alias so existing scripts don't break; the wire/spec field names (category/table/intent) are unchanged. - --category → --task, and DROP the old image_classification default: omitting the task now drives the interactive picker (TTY) or a clear "which task? pass --task" error (non-interactive), never a silent image assumption. - --table → --name (the wire field stays "table"). - --intent → --split, default "train"; the prompt is reworded to "Is this training or test data?". - Reworded the interactive prompts, the Review labels, the pre-flight "Ingest settings" labels, all help/error copy, and the README example to the new names. Behavior is otherwise identical — exit codes, guards, and the destination-exists (exit 6) check are unchanged. Tests: the canonical flags work; each old flag still resolves via its hidden alias (canonical wins on conflict); omitting --task errors clearly off a TTY; omitting --split defaults to train. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…le-name rule
Reviewer feedback on #180a:
- Revert the --intent→--split rename. --intent stays the canonical
flag; --split is dropped entirely. The --category→--task and
--table→--name renames (with hidden deprecated aliases) are unchanged.
Omitting --intent still defaults to train (RFC-0002 §5); the wire/spec
field stays "intent".
- Tighten table-name validation to mirror the ingestor (the source of
truth): names must start with a letter or underscore
(^[A-Za-z_][A-Za-z0-9_]*$), matching data-ingestors'
validators/table_name_validator.py. The old pattern was looser and
let leading-digit / all-digit names ("123", "1data") through the
CLI only for the cluster to reject them post-upload.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>ba01f9e to
b4e5678CompareUh oh!
There was an error while loading. Please reload this page.
The #197 fix seeds the task picker with promptCategories[0] when the task is unset, since survey.Select rejects an empty default. No test drove taskSet=false with an empty category, so a reseed to "" would have kept the suite green while crashing a real terminal. This case omits the "Task" answer so the fake returns the seeded default, then asserts the category landed on promptCategories[0] — verified to fail if the seed regresses to "". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
#180b (#198) landed the data-first flow inversion + family-scoped task picker on develop, which supersedes most of this branch: - The flat Select("Task", ...) picker — and its empty-default crash fix (#197 finding 1/2) — is gone, replaced by resolveFamily + pickTask. Resolved interactive.go to develop's new flow. - The "Destination table name" → "Dataset name" rename is superseded by develop's "What should we call this dataset?" prompt. Resolved the test conflicts to develop's rewritten new-flow suite (my old-flow tests, incl. the seed test, are obsolete). Kept the still-relevant copy fixes: - README quickstart --split → --intent (auto-merged). - --name flag help states the leading-letter rule (auto-merged), and I folded the same wording into develop's interactive name prompt so the prompt and the flag help agree (finding 4 drift, otherwise reintroduced by the merge). gofmt -l clean; go build ./..., go vet, go test ./internal/cli/... ./internal/push/... green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…/label (#199) * fix(data ingest): address #197 code-review findings - interactive picker no longer passes an empty default to survey.Select after --task's default was dropped (crashed "omit --task to pick interactively" on a TTY); falls back to the first task. - rename the guided name prompt "Destination table name" -> "Dataset name" to match --name / the Review + summary labels (finish the #180 rename). - --name flag help now states the leading letter/underscore rule the tightened validator enforces. - README quickstart: --split train -> --intent train (--split was removed; --intent stayed canonical). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(data ingest): finish the name-prompt rename + drop dead picker seed Two review follow-ups on #199: - The PromptHint above the "Dataset name" prompt still described "the table created on the cluster (and its folder on the shared storage). Letters, digits, underscores only" — it leaked the k8s/MySQL ceremony the rename was removing and stated the old rule (implying a leading digit is allowed, which ValidateTableName rejects). Reworded to plain language matching the flag help + validator. - The picker's default was seeded from a.Spec.Category, which is always "" in the !taskSet branch, so the len-guarded fallback always fired. Seed promptCategories[0] directly — the list is a fixed non-empty package var backed by the hardcoded category registry. go build ./..., go vet, gofmt -l clean; go test ./internal/cli/... ./internal/push/... green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(data ingest): cover the picker's default-seed path The #197 fix seeds the task picker with promptCategories[0] when the task is unset, since survey.Select rejects an empty default. No test drove taskSet=false with an empty category, so a reseed to "" would have kept the suite green while crashing a real terminal. This case omits the "Task" answer so the fake returns the seeded default, then asserts the category landed on promptCategories[0] — verified to fail if the seed regresses to "". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Asad Iqbal <asad.dsoft@gmail.com>

Stacked on #179 — merge after #179. Base is
feat/179-plain-language-ceremony, notdevelop; the diff shown against develop until #179 lands will include #179's commit. Retarget todeveloponce #179 merges.Part of #180. This is #180a, the mechanical flag renames from RFC-0002 §6. It does notclose#180 — the data-first flow inversion + task-picker rework is #180b, stacked on top of this.
Summary
Renames the three core
data ingestflags to plain, task-first names, and keeps every old flag as a hidden deprecated alias so existing scripts don't break. The wire/spec field names (category/table/intent) are unchanged — this is a CLI-surface rename only.--category--taskimage_classificationdefault dropped--table--nametable--intent--splittrainWhat changed
--category→--task, and theimage_classificationdefault is dropped. Omitting the task now drives the interactive picker (on a TTY) or returns a clearwhich task is this data for? pass --task …error (non-interactive) — never a silent image assumption.--table→--name. Plain-language help ("a name for this dataset — you'll reference it by this name when you start a training run"); the k8s/PVC detail is gone from the flag help.--intent→--split, defaulttrain. The guided prompt is reworded to "Is this training or test data?". The default is applied after the interactive block, so guided runs still ask; non-interactive runs that omit it gettrain.MarkHidden(absent from--help) and reconciled inRunE: the canonical flag wins; a legacy alias fills in only when the new flag wasn't passed.Behavior is otherwise identical — exit codes, guards, and the destination-exists (exit 6) check are unchanged. No overwrite-promptability (that's #180b).
Test plan
go build ./...,go test ./...,gofmt -s -l .(empty),go vet ./..., plus errcheck / ineffassign / misspell — all green locally.New / updated unit tests:
TestDataIngest_DeprecatedFlagAliases— old names resolve; a bad value via--categorystill reaches the task gate (aliased value flows through, not ignored).TestDataIngest_OmitTask_NonInteractive_Errors— omitting--taskoff a TTY exits 2 with a message naming--task.TestDataIngest_OmittedSplit_DefaultsToTrain— omitting--splitno longer rejects; falls through to the injected bad kubeconfig (exit 3).Manual smoke test against a bad kubeconfig (built binary):
--task→ exit 2 with the clear--taskerror;--split→ exit 3 (defaulttrainapplied);data ingest --help.Decisions to ratify
--splitdefaulttrainis applied post-interactive (anif a.Spec.Intent == "" { … = "train" }fallback), not baked into the cobra flag default. This keeps the guided flow asking "training or test?" while a non-interactive omit still getstrain. RFC-0002 §5.--taskand--category(etc.) are passed, the new flag wins and the alias is ignored. Documented and tested.--output-jsonkeys are left ascategory/table/intent(wire format — renaming would break scripts, the opposite of the alias promise).--table→--nametoken was touched on those lines.Note
Medium Risk
CLI flag and validation behavior changes can break scripts that relied on
--categorydefaulting to images or numeric-leading--tablenames; hidden aliases mitigate rename risk but not the stricter name rule or missing-task error.Overview
Renames the primary
data ingestflags to--nameand--task(plain-language help, pre-flight labels name / task), with hidden--table/--categoryaliases so scripts keep working; canonical flags win on conflict. Wire/spec fields staytable/category/intent;--output-jsonkeys are unchanged.--taskno longer defaults toimage_classification—omitting it triggers the interactive picker on a TTY or a clear exit-2 error off-TTY.--intentis still the flag name but now defaults totrainafter guided prompts (guided flow still asks train vs test).User-facing copy shifts from “category/table” to “task/name” across help, errors, and interactive prompts (
TaskSetreplacesCategorySet).ValidateTableNamenow requires[A-Za-z_][A-Za-z0-9_]*, aligned with the ingestor—leading-digit names like123fail at the CLI instead of after staging.Tests cover deprecated aliases, omitted
--task, and default intent; README example uses the new flag names.Reviewed by Cursor Bugbot for commit b4e5678. Bugbot is set up for automated code reviews on this repo. Configure here.