rust(chore): warn on import retries and document column flags - #770
Open
rowenwu wants to merge 5 commits into
Open
rust(chore): warn on import retries and document column flags#770rowenwu wants to merge 5 commits into
rowenwu wants to merge 5 commits into
Conversation
Two gaps in the sift-cli skill reference, both observed while importing a multi-file CSV batch. Step 8 tells the agent to adjust and re-run after a non-zero exit. That is right for every subcommand except `import`, which creates a run per invocation. A shell loop that dies partway through a batch has already uploaded the first file, so the retry produces a second run with the same name and duplicate samples. The duplicate is easy to miss afterwards because Explore resolves an ambiguous run name to the most recently created match. Streaming ingest upserts on (channel, run, timestamp), so the warning is scoped to file imports. Step 3 lists the import optionals worth probing but omits the per-column `-c/-d/-u/-n` flags, so channels arrive as inferred doubles with no units. UpdateChannel accepts only display_description, display_units, metadata, and active, which makes the data type in particular unrecoverable after the fact. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`import csv` rejects a command whose `-d`, `-u`, and `-n` counts do not
each match `-c`:
occurrences of --data-type, --units, and --descriptions must equal
--channel-column
The previous wording listed the four flags without saying they come as a
set, so a reader who wants a type and a unit but no description omits `-n`
and the command fails. `--help` notes that a description can be empty, so
`-n ""` is the answer; say so here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rowenwu
marked this pull request as ready for review
September 3, 2026 19:41
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 free
to 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.
What
This updates ingest guidance in two places:
sift-cliskill explains that CSV column overrides are balanced sets of-c/-d/-u/-n, and that default inference produces doubles for numeric columns and strings for nonnumeric columns.--run. It distinguishes local validation failures from failures after the request may have reached the server.upload_datasettool warns callers that a request withrun_namecreates a new run and must not be retried automatically after an ambiguous failure.Why
A named ingest is not idempotent at the run-creation boundary. Repeating the same request can create another run with the same name, even when the samples themselves would be upserted into an existing run. Agents need to check for an exact run-name match on the asset before retrying a request that may have reached the server.
The previous CSV guidance also overstated default inference: nonnumeric values are inferred as strings, not doubles. Explicit column flags are still important because the channel data type cannot be changed after import.
The workspace also enables
tinyvec'sstdfeature explicitly.unicode-normalizationotherwise selects itsalloc-only path, which does not compile intinyvec 1.13.0and broke fresh dependency resolution in Rust CI.Reproducing
Call
upload_datasettwice with the sameassetandrun_name: both uploads target the same asset, but each call creates a distinct run. The equivalent CLI case is importing twice with the same--assetand--run.For CSV inference, preview or import a file containing both numeric and nonnumeric columns without column overrides. Numeric columns are inferred as doubles and nonnumeric columns as strings, with no inferred units or descriptions.
Notes
The CLI guidance remains part of the embedded skill bundle. The MCP warning is part of the tool description returned to clients.
Validation:
cargo fmt --checkcargo check --all-featurescargo clippy --all-featurescargo test --all-featurescargo test --offline -p sift_cli cmd::agent(38 passed)cargo test --offline -p sift_mcp tool::data(15 passed)