You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): doctor optional deps, init next step, and check --timeout (#1504)
## Summary
Install-only users can run `assura check` after `cargo install` or a
prebuilt binary: `doctor` no longer requires rustc, cargo, or a
standalone `z3` CLI. `init` prints the first check command. `check
--timeout` matches the spec, and watch mode uses the same solver and
timeout.
## Problem
- `assura doctor` failed after a crates.io or GitHub Release install
because rustc, cargo, and `z3` on PATH were required. SMT already links
Z3 through the z3 crate (`gh-release`).
- `assura init` listed the scaffold files and stopped. The next command
was not printed.
- SPEC documents `assura check --timeout` (default 1000ms) and timeout
diagnostics say "consider increasing --timeout", but the CLI flag was
missing. Watch mode hardcoded Z3 and the default timeout.
## Change
- Doctor: rustc, cargo, and the standalone z3 CLI are optional. Missing
hints say `assura check` links Z3. Human footer is "`assura check` is
ready". JSON `ok` is true without those CLIs.
- Init: human and JSON `next` print `cd <dir>` and `assura check
contracts/lib.assura`.
- Check: `--timeout MS` overrides `VerifyOptions`. Watch receives the
resolved options (solver + timeout).
- Tests: encode_term Z3 and CVC5 helpers assert integer/boolean sorts,
not only `Some`. Formatter keeps the full `&&` / `||` clause.
- Library cleanup: if-encode and clause lower drop `expect`; IR codegen
uses `let _ = writeln!` on `String`.
- Docs: FAQ, SPEC §10.2/§10.3, MASTER-PLAN crate counts.
## Testing
```bash
cargo fmt --all -- --check
cargo clippy -p assura -p assura-smt -p assura-parser --lib --locked -- -D warnings
bash scripts/guards.sh
cargo test -p assura --test cli_integration --locked -- doctor_json_marks_toolchain
cargo test -p assura --test cli_integration --locked -- check_timeout_flag_is_accepted
```
- [x] `cargo fmt --all -- --check` passes
- [x] Targeted clippy on changed crates passes
- [x] Tests added or updated
- [ ] Full workspace clippy and demo check run in CI
## Related
Ref #1410
Ref #1411
Ref #1396
Ref #436
Does not close those issues (human outreach and upstream cvc5-rs
remain).
---------
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
0 commit comments