Skip to content

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

Draft
rowenwu wants to merge 1 commit into
mainfrom
rowen/skill-ingest-preconditions
Draft

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

Conversation

@rowenwu

@rowenwu rowenwu commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What

Two additions to the sift-cli skill reference (references/cli.md), one per protocol step.

Step 3 — probe useful optionals. The list of import flags worth asking about covers --run, --preview, and per-format layout flags, but not the per-column ones. Adds -c/-d/-u/-n, which set a column's index, data type, unit, and description together.

Step 8 — on failure, read stderr and retry. Correct for every subcommand except import. Adds an exception scoped to file imports.

Why

Column flags. Without them import csv infers every column as a double with no unit, so channels arrive unlabelled and downstream reports show bare numbers. UpdateChannel accepts only display_description, display_units, metadata, and active in its update mask, so the data type in particular cannot be corrected after the import — it has to be right the first time.

Import retries. sift-cli import is not idempotent: every invocation creates a run. A shell loop over a batch of files that dies partway has already uploaded the files it got through, so following step 8 and re-running produces a second run with the same name holding duplicate samples. Nothing in the output makes this obvious afterwards, and Explore resolves a name matching several runs to the most recently created one, so the duplicate is what a later lookup finds.

Streaming ingest behaves the opposite way — it upserts on (channel, run, timestamp) — so re-sending the same samples there is safe. The warning is scoped to file imports for that reason.

Reproducing

Import any CSV twice with the same --asset and --run, then list runs for that asset: two runs, same name, same data. Repeat with the per-column flags omitted and inspect the resulting channels: all double, no units.

Notes

Documentation only, inside the skill bundle. The bundle is embedded with include_dir!, so this reaches installed clients on the next release, not before.

cargo test -p sift_cli --bins agent:: passes (38 tests), including the check that every bundled reference file is linked from SKILL.md.

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>
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