Skip to content

fix(cli): recall flags via server, list filters, doc tree/export, upgrade order, checksum, import bail-out, onboard TOML, config migration - #1376

Merged
ajianaz merged 1 commit into
developfrom
fix/cli-medium-findings
Oct 8, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/cli-medium-findings

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

What

CLI part of #1332 (validated Cora-scan findings, medium). Each was re-checked against the code first.

  • recall via server: POST /recall has no field for --strategy/--salience/--recency/--explain/--related/--depth/--context/--content-format/--where; they were dropped silently, so the same command ranked or printed differently depending on whether a server was running. They now return the existing "unsupported" signal so the command runs against the local store; --type/--enrich/--pack/--budget/--exclude-ids (which the server does support) are forwarded.
  • list --entity/--category: filtering ran on one already-paginated page. --limit/--offset now apply to the matches (paged scan of 200 rows).
  • doc list --tree printed roots only (children were looked up among the roots). Now renders the whole forest, with a cycle guard.
  • doc export: honours --output (it was ignored), the namespace (hard-coded None), and exports every document (stopped at 1000; core clamps limit to 1000). New Uteke::doc_list_page / Store::list_documents_page (stable order, id tie-break). JSON export is now an array of full documents (superset of the old summaries).
  • upgrade: stages and verifies the CLI and both companions before installing any; a broken uteke-serve used to leave a new CLI next to the old server. Also fixed a misplaced doc comment from fix(upgrade): retry ETXTBSY when verifying the freshly copied binary #1338.
  • verify-checksums: line chosen by exact file name instead of substring.
  • batch import: the "5 consecutive errors, zero success" bail-out counted the documents imported earlier, so it never fired; it now tracks the extraction loop only.
  • onboard: the namespace is escaped in the generated TOML (quotes/newlines used to break out or inject keys); the TOML builder is now a pure function with round-trip tests.
  • migrate_content: flat legacy keys are only recognised before the first [section]; a model inside [extraction] used to be moved to the embedding table and [store]/[embedding] were emitted twice.

Why

Findings of the v0.19.1 review (#1332). Most are silent wrong-output or invalid-config bugs rather than crashes.

Testing

  • 22 new tests across the 8 items; the migrate_content ones fail on the old code. The upgrade test installs a bundle with a broken companion and asserts the installed binaries and staging files are untouched.
  • cargo fmt --check, cargo clippy --workspace --all-targets clean; cargo test --workspace green (cli 109, core 643); vecq-only core build green (640).
  • Not covered: end-to-end uteke recall against a live server for the fallback (the decision is unit-tested; the existing unsupported fallback in main.rs is unchanged); an upgrade of a real release archive.

Refs #1332

🤖 Generated with Claude Code

…rade order, checksum match, import bail-out, onboard TOML, config migration

- recall: flags the server has no field for (strategy, salience, recency, explain, related, depth, context, content-format, where) fall back to the local store instead of being dropped; type/enrich/pack/budget/exclude-ids are forwarded
- list --entity/--category: --limit/--offset apply to the matches (paged scan), not to one pre-paginated page
- doc list --tree prints descendants; doc export honours --output and the namespace and exports every document (new Uteke::doc_list_page)
- upgrade stages and verifies every binary before installing any
- verify-checksums selects the line by exact file name
- batch import bail-out counts failures of the extraction loop only
- onboard escapes the namespace (and other values) in the generated TOML
- migrate_content only treats flat keys before the first [section] as legacy

Refs #1332

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@ajianaz ajianaz added bug Something isn't working scope:cli CLI and UX labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 52c685d into develop Oct 8, 2026
15 checks passed
@ajianaz
ajianaz deleted the fix/cli-medium-findings branch October 13, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working scope:cli CLI and UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant