• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

joaoh82 / rust_sqlite / 25190382873
69%

Build:
DEFAULT BRANCH: main
Ran 30 Apr 2026 09:35PM UTC
Jobs 1
Files 38
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Apr 2026 09:32PM UTC coverage: 58.9% (-8.9%) from 67.839%
25190382873

push

github

web-flow
Phase 7g.2: REPL .ask + dep-direction flip (#60)

Wires the REPL's `.ask <question>` meta-command — the smallest
per-product wrapper sub-phase, and the natural validation that
sqlrite-ask 0.1.18's foundational shape fits the consumer side.
Required a structural refactor 7g.1 didn't anticipate; this commit
lands both pieces together because they're inseparable.

## What ships

REPL UX (sqlrite> prompt):

    sqlrite> .ask How many users are over 30?
    Generated SQL:
      SELECT COUNT(*) FROM users WHERE age > 30
    Rationale: Counts users older than thirty.
    Run? [Y/n] y
    +-------+
    | count |
    +-------+
    | 47    |
    +-------+
    SELECT Statement executed. 1 row returned.

`.ask` parses verbatim (rest of line after `.ask `, preserving
quotes/punctuation/multiple spaces — natural-language questions
need that). Confirm-and-run via rustyline; empty/y/yes runs through
the same `process_command` pipeline as a typed statement. Ctrl-C /
EOF / `n` map to skip — paranoid default for LLM-generated SQL.
Empty SQL response (model declined) surfaces the model's
explanation rather than silently doing nothing.

`.help` updated. New tests in `src/meta_command/`: `parse_ask_*`
(verbatim capture, separator handling), `ask_meta_command_displays_*`.

## Why the dep-direction flip

The REPL binary needed to import `sqlrite-ask` to call ask().
But `sqlrite-ask` 0.1.18 imported `sqlrite-engine` (for
Connection/Database integration and the ConnectionAskExt trait).
That's a cargo cycle:

    sqlrite-engine[bin] → sqlrite-ask → sqlrite-engine[lib]

Cargo's static cycle detection counts every potential edge in
the dep graph regardless of features — `optional = true` on
either side doesn't escape it. Verified empirically:
`cargo check -p sqlrite-engine --no-default-features` errors
with `cyclic package dependency` even when the optional dep
isn't enabled.

The fix flipped the dep direction structurally:

  - `sqlrite-ask` 0.1.19 dropped `sqlrite-engine` entir... (continued)

43 of 80 new or added lines in 5 files covered. (53.75%)

1458 existing lines in 5 files now uncovered.

5496 of 9331 relevant lines covered (58.9%)

1.21 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
82.09
-6.42% src/meta_command/mod.rs
7
0.0
src/ask/mod.rs
5
8.03
-7.4% src/lib.rs
4
0.0
0.0% sqlrite-ask/src/lib.rs

Coverage Regressions

Lines Coverage ∆ File
1078
8.03
-7.4% src/lib.rs
318
8.94
-9.94% src/error.rs
54
0.0
0.0% sqlrite-ask/src/lib.rs
7
0.0
0.0% sqlrite-ask/src/prompt.rs
1
82.09
-6.42% src/meta_command/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 25190382873.1 30 Apr 2026 09:35PM UTC 38
58.9
GitHub Action Run
Source Files on build 25190382873
  • Tree
  • List 38
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ced1c87c on github
  • Prev Build on main (#25188551877)
  • Next Build on main (#25190780366)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc