Fix pre-v2 CLI transcripts in spice search and spice trace output - #560
Open
claudespice wants to merge 1 commit into
Open
Fix pre-v2 CLI transcripts in spice search and spice trace output#560claudespice wants to merge 1 commit into
spice search and spice trace output#560claudespice wants to merge 1 commit into
Conversation
The Spice CLI was rewritten in Rust (spiceai/spiceai#9061) and since v2.0.0 renders `spice search` and `spice trace` with comfy-table's NOTHING preset (borderless), different column headers, `OK`/`ERR` statuses, and `Time: <secs> seconds.` timing. Three recipes still show the pre-rewrite Go CLI output. - docker: `spice search` showed `Rank N, Score: 89.7, Datasets [...]` line output with scores scaled x100 (the recipe's own API response below it reports 0.8974827 for the same match). - azure_openai: `spice search` showed a bordered `+---+` table with `Key (path)` / `Dataset(s)` headers. - text-to-sql: `spice trace` showed `TREE STATUS DURATION SPANID` headers with a check-mark status column.
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.
Summary
The Spice CLI was rewritten in Rust (spiceai/spiceai#9061, Jan 2026). Since then — and in every currently installable release, including stable
v2.1.2—spice searchandspice tracerender throughTableOutput, which uses comfy-table'sNOTHINGpreset: no borders, different column headers,OK/ERRstatuses, andTime: <seconds> seconds.timing.Three recipes still show the pre-rewrite Go CLI output, so a reader following them today sees something that looks nothing like their terminal.
v2.1.2printsdockerRank 1, Score: 89.7, Datasets [spice.public.films]line output;Time: 32ms.Rank / Match / Score / Datasettable; score0.8975;Time: 0.032 seconds.azure_openai+---+table, headersKey (path)/Dataset(s);Time: 650ms.Key/Dataset;Time: 0.650 seconds.text-to-sqlTREE STATUS DURATION SPANIDheaders, check-mark status columnTree / Status / Duration / Span IDheaders,OKstatusThe
dockerscore is the clearest break: the README printed89.7while the API response immediately below it — for the same match, same query — reports"_score": 0.8974827855112448. The old CLI displayed the score scaled ×100; the current one prints the raw score to four decimals.Verified against
spiceai/spiceaiatv2.1.2:bin/spice/src/output/table.rs—TableOutputloadspresets::NOTHING(borderless; one space of padding per cell).bin/spice/src/commands/search.rs— headers are["Rank", "Match", "Score", "Dataset"], or["Rank", "Key", "Match", "Score", "Dataset"]when results carry a primary key; score is formatted{:.4}; the footer isTime: {:.3} seconds. N results.bin/spice/src/commands/trace.rs— headers are["Tree", "Status", "Duration", "Span ID"](+Input/Output), status isOK/ERR, duration is{:>8.2}ms.The
azure_openaitable keeps itsKeycolumn (its API response includesprimary_key); thedockertable has none (its API response has noprimary_key).Evidence
Static review — the recipes need Docker, Azure OpenAI, and OpenAI credentials, so they were not run.
The layout was reproduced from the renderer and checked byte-for-byte against a transcript already in this repo that was captured on v2.x —
mcp/README.mdshows realspice trace ai_chatoutput, and a re-render of those rows through theNOTHINGpreset rules matches it exactly. Every value in the corrected blocks is carried over from the transcript it replaces; only the layout, headers, status column, score scale, and timing format changed.Two judgement calls worth a reviewer's eye:
dockeris truncated to three results (...). The old transcript listed ten, but only the top three have exact scores documented — they appear in the recipe's own API response block. Rendering ranks 4–10 would have meant inventing four-decimal precision from one-decimal percentages, so the transcript stops at three and marks the truncation.text-to-sql's trace is now flat, with no├──glyphs. That is genuinely what the CLI prints today: inrecurse_through_tree,new_indentreturnsString::new()wheneverindentis empty, so the indent never grows past the root and the connector branch is unreachable. Themcprecipe's captured v2.x output is flat for the same reason. This looks like a CLI regression rather than intended behaviour — happy to revert this hunk if the tree rendering is going to be restored upstream instead.