rust(chore): warn on import retries and document column flags - #770
Draft
rowenwu wants to merge 1 commit into
Draft
rust(chore): warn on import retries and document column flags#770rowenwu wants to merge 1 commit into
rowenwu wants to merge 1 commit 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>
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
Two additions to the
sift-cliskill 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 csvinfers every column as a double with no unit, so channels arrive unlabelled and downstream reports show bare numbers.UpdateChannelaccepts onlydisplay_description,display_units,metadata, andactivein 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 importis 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
--assetand--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 fromSKILL.md.