Skip to content

rust(chore): warn on import retries and document column flags - #770

Open
rowenwu wants to merge 5 commits into
mainfrom
rowen/skill-ingest-preconditions
Open

rust(chore): warn on import retries and document column flags#770
rowenwu wants to merge 5 commits into
mainfrom
rowen/skill-ingest-preconditions

Conversation

@rowenwu

@rowenwu rowenwu commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What

This updates ingest guidance in two places:

  • The sift-cli skill 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.
  • The CLI retry warning is scoped to imports that create a named run with --run. It distinguishes local validation failures from failures after the request may have reached the server.
  • The MCP upload_dataset tool warns callers that a request with run_name creates 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's std feature explicitly. unicode-normalization otherwise selects its alloc-only path, which does not compile in tinyvec 1.13.0 and broke fresh dependency resolution in Rust CI.

Reproducing

Call upload_dataset twice with the same asset and run_name: both uploads target the same asset, but each call creates a distinct run. The equivalent CLI case is importing twice with the same --asset and --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 --check
  • cargo check --all-features
  • cargo clippy --all-features
  • cargo test --all-features
  • cargo test --offline -p sift_cli cmd::agent (38 passed)
  • cargo test --offline -p sift_mcp tool::data (15 passed)

rowenwu and others added 3 commits August 31, 2026 15:09
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
rowenwu marked this pull request as ready for review September 3, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant