Uh oh!
There was an error while loading. Please reload this page.
fix(#386): strip surrounding quotes from the ingest path prompt + clarify dataset-name rules - #469
Merged
Merged
Conversation
… dataset-name rules Part 1: the interactive "Where is your data?" prompt is read literally, not shell-parsed, so a pasted quoted path (dragging a folder into a terminal auto-quotes it; users habitually quote paths with spaces) had the quote chars become part of the path and failed to resolve. Add stripSurroundingQuotes / dequotePath and apply them to the interactive answer before expandHome / statDatasetPath, and inside validateDatasetPath so the re-prompt guard is consistent. Conservative: strips at most one matching outer pair of the same quote char, leaves inner/mismatched quotes untouched, and only touches the guided answer — never the flag/positional path (the shell de-quotes those). Part 2: spell out "no hyphens or spaces — use _" in the name-prompt hint and on the first line of the ValidateTableName error. Wording only; nothing changes about what names are accepted or rejected. Regenerated zz-all-strings.golden for the hint change. Added table-driven tests for the quote helpers and a wording-pin test for the error. Closes#386 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
saadqbal
approved these changes
Aug 7, 2026
saadqbal
left a comment
Collaborator
There was a problem hiding this comment.
Clean, well-scoped fix — the dequote path canonicalization is consistent between store and validate, and the mismatched/inner-quote edge cases are handled correctly. Tests pass locally. 👍
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two independent UX papercuts in the interactive
tracebloc data ingestflow (both localized to the guided-prompt code).Part 1 — strip surrounding quotes from the "Where is your data?" prompt
The prompt is read literally, not shell-parsed. A pasted quoted path — common when dragging a folder into a terminal (auto-quoted) or quoting a path with spaces — had the quote chars become part of the path, so ingest failed with e.g.
no such file or directory: "'/home/me/my data/train'".stripSurroundingQuotes(removes at most one matching pair of the same surrounding quote char'/"; inner and mismatched quotes untouched) anddequotePath(trim → strip → trim).expandHome/statDatasetPath, and insidevalidateDatasetPathso the re-prompt guard is consistent (an answer of just an empty quote pair is now rejected at the prompt instead of dying later with a messy error).Acceptance: pasting
'…'or"…"resolves identically to the bare path; an unquoted path with spaces still works; a name that really contains a quote loses only the single matched outer pair.Part 2 — clarify the dataset-name rules
Names must match
[A-Za-z_][A-Za-z0-9_]*, but the hint/error never said hyphens and spaces are rejected, so kebab-case (tsc-train) surprised users.ValidateTableNameerror now leads with "no hyphens or spaces (use _)" before the MySQL/PVC rationale.Wording only — nothing changes about what names are accepted or rejected.
Validation
go build ./...,go test ./...,go vet,gofmt -sall pass.zz-all-strings.goldenfor the hint change (only that line moved).'/a/b',"/a/b", bare, spaces, name-with-a-quote, mismatched, empty-quote pairs) plus a wording-pin test for the error.Closes#386
🤖 Generated with Claude Code
Note
Low Risk
Localized CLI prompt/validation and copy changes with no change to accepted table names or non-interactive ingest paths.
Overview
Fixes two guided data ingest UX issues (#386).
Path prompt: The "Where is your data?" answer is read literally (not shell-parsed), so pasted
'…'or"…"paths failed withno such file or directory. The flow now storesdequotePath(trim +stripSurroundingQuotesfor one matching outer'/"pair) beforeexpandHome/ stat, andvalidateDatasetPathuses the same canonicalization so''/""are rejected at the prompt. This applies only to the interactive answer, not flag/positional paths.Dataset name: Copy-only updates to the name-prompt hint and
ValidateTableNameerror text to state that hyphens and spaces are not allowed and_should be used; validation rules are unchanged.Adds table-driven tests for the quote helpers and a wording pin for invalid kebab-case names; golden strings updated for the hint line.
Reviewed by Cursor Bugbot for commit e8cf38b. Bugbot is set up for automated code reviews on this repo. Configure here.