Repository navigation
Make setup a closed loop from empty directory to verified SQL rows - #28
Merged
Merged
Conversation
The setup Quick Start ended at an empty `spice init`, which `spice validate`
reports as OK with zero datasets, so agents declared success with nothing to
query. setup is now the single entry point for getting Spice working:
- Add scripts/spice-local.sh (preflight, init, start, ready, verify, stop) and
a bundled 20-row sample CSV. It seeds a dataset, starts `spice run` in the
background on free loopback ports, waits for /v1/ready, checks each dataset
is Ready and a query returns rows, and reports directory, PID, ports, log,
and sample rows. It never installs software, refuses to start when the
runtime is missing, detects another runtime holding 8090, and stops only
the PID it started.
- Define what "working" means and the anti-patterns: stopping after
`spice init`, treating `spice validate` as proof, `pkill spiced`, JSON
/v1/sql bodies without `parameters`, metrics on the first run.
- Document /v1/sql request bodies in setup, sql, cache, cookbook, and cloud.
- Use `${ store:KEY }` consistently; note that spacing is optional.
- Make spicepod's Quick Start a credential-free local CSV, and add verify
sections to connectors and datasets.
- Lead AGENTS.md and README with the skill graph; list workflow-skill
regressions in AGENTS.md; update the reviewer disclosure for the new helper.
- Strengthen setup evals to require a seeded dataset, readiness, and rows.
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.
Why
The
setupQuick Start ended at an emptyspice init, thenspice runandshow tables.spice validatereportsOKfor a spicepod with zero datasets, and also for one whose data file doesn't exist, so an agent could declare success with nothing to query. Live runs with the previous skill reproduced this. Haiku 4.5 reported "Spice is now set up ✅" on a pod withdatasets=0, usingSELECT 1 … 'Hello Spice!'as proof. In other runs it bounced off/v1/sqltwice with JSON bodies, and ranpkill -f spiced. That killed another runtime holding port 8090, and the agent still reported success.What changed
setupis the single entry point that takes an agent from an empty directory to rows from a real dataset. The newskills/setup/scripts/spice-local.shcoverspreflight,init,start,ready,verify, andstop, and a 20-row sample CSV ships with it. The helper:--datapointing at the user's own file;spice runin the background on free loopback ports;/v1/ready, then checks that each dataset isReadyand that a query returns rows;spice versionreports no runtime, becausespice runwould download one;spice init, treatingspice validateas proof,pkill spiced, JSON/v1/sqlbodies withoutparameters, and metrics on the first run (a taken metrics port makes the runtime exit). It also explains a failed user-run install whose download URL contains/download//. That happens when the installer can't read the latest release tag, usually because of GitHub's anonymous rate limit./v1/sqlrequest bodies are now documented in setup, sql, cache, cookbook, and cloud. A raw SQL body works. A JSON body needs"parameters"([]when unused) and exactlyContent-Type: application/json.{"sql": "..."}alone returns400 Invalid JSON: missing field 'parameters', andapplication/json; charset=utf-8sends the JSON text to the SQL parser.${ store:KEY }everywhere. The secrets skill notes that spacing is optional: the runtime's lexer ignores whitespace, which I confirmed at runtime for inline and whole-value references.spiceai/quickstartpod on Spicerack is stillversion: v1and loads taxi data from public S3./v1/ready, then dataset status, thenSELECT … LIMIT 1.Deliberately not included
validate_plugin.py, so there are no install scripts and no brew/pin/upgrade fallbacks. One early draft named Homebrew andspice install, and Opus then added installer commands to 1 of 2 answers. After rewording, 0 of 4 did.setup, where agents already land. Skills install one at a time, so a second skill would have to duplicate the helper or depend on another skill's files.install/install.shby failing on an empty tag and usingcurl -f. The skill only describes the symptom and points to the docs.Verification
make check test-distribution release-previewpasses. The release preview packagesspice-local.shas executable, and no evals ship.I ran the helper against a real v2.3.2 runtime in these cases:
validatepasses (a bad TLS path);Live end-to-end evals used isolated
claude -psessions with only the plugin loaded and a real v2.3.2 runtime on PATH. They compared this branch withtrunkon three scenarios: the prompt "Set up Spice in ./my_app and show me a SQL result", the user's own CSV with a question to answer, and an existing project while another runtime holds port 8090.On the eight setup text evals this branch scores 35/35, and
trunkscores 31/35 on the same prompts.