Repository navigation
feat(scan): add --rules-only as an alias of --no-llm and pin the offline and batch-failure guarantees - #735
Merged
Merged
Conversation
10 of 11 tasks
ajianaz
added a commit
that referenced
this pull request
Nov 16, 2026
…729) ## What The three CI fixes that only work together, in one PR: the Clippy `needless_bool` rewrite, the `Cargo.lock` bumps for `rustix` and `libz-sys`, the `rusqlite` 0.41 upgrade for the SQLite CVE, and the sorted directory walk that de-flakes a test. It supersedes #728 and #730, whose commits are included here. ## Why Every PR to `develop` fails the same three checks, none of them caused by the PR, so no single fix can be green on its own and none can be merged under the required checks: - **Clippy**: `clippy::needless_bool` at `src/engine/rules/builtin.rs` on Rust 1.100 (the CI toolchain; local 1.97 does not report it). - **Security Audit (CVE)**: `rustix 1.1.5` (RUSTSEC-2026-0486), `libz-sys 1.1.30` (RUSTSEC-2026-0418) and `libsqlite3-sys 0.28.0` (CVE-2026-119375, SQLite before 3.54.0). - **Test**: `mcp::agent_tools::tests::finalize_agrees_with_prepare_only_for_the_same_filters` depends on the filesystem's `readdir` order. ## How - `26768e8` (#728): `builtin.rs` returns the condition directly; `Cargo.lock` only: `rustix` 1.1.6, `libz-sys` 1.1.33. - `beee771`: `rusqlite` 0.31 to 0.41 (`libsqlite3-sys` 0.39.1, SQLite 3.54.1), `rust-version` 1.85 to 1.89, `usize` binds as `i64` in `index/brain.rs`, and `[lints.clippy] collapsible_if = "allow"` because Rust 1.89 enables let-chains and clippy would report 56 hits in untouched code (a wide mechanical rewrite for a later change). - `1275b71` (#730): `WalkBuilder::sort_by_file_name`, and the test uses a selection whose `path` and `source-first` orders differ by construction. - Two merge commits bring #728 and #730 in with no conflicts. - MSRV 1.89 is user-visible for anyone building with `cargo install` on an older toolchain; the release notes should say so. ## Testing - [x] `cargo test --features tree-sitter` passes (1313 unit tests + integration suites) - [x] `cargo fmt --all -- --check` passes - [x] `cargo clippy --all-targets --features tree-sitter -- -D warnings` passes (the CI Clippy check on Rust 1.100 is the real proof for `needless_bool`) - [ ] `cargo build --release --features tree-sitter` passes (left to CI) - [x] Locked versions after the merges: rustix 1.1.6, libz-sys 1.1.33, libsqlite3-sys 0.39.1, rusqlite 0.41.1. - [x] Database compatibility of the `rusqlite` upgrade was checked in both directions (old release binary indexed 800 symbols, new build read, re-indexed and ran a `brain` search on the same `cora.db`, old binary read it back, `PRAGMA integrity_check` = `ok`). - Individually, the earlier runs showed: #728 Clippy green (fix proven), #730 Test green (flake fixed), #729 Audit with only `rustix`/`libz-sys` left. ## Related Issues Supersedes #728 and #730. Unblocks #727, #731, #732, #733, #734, #735, #736, #737. ## Checklist - [x] Branch name follows convention (`chore/`) - [x] Branch is from `develop` - [x] Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) - [x] No secrets or credentials committed - [x] One logical change per PR: one logical goal (a green CI), several small causes that cannot be separated under the required checks 🤖 Generated with [Claude Code](https://claude.ai/code) https://claude.ai/code/session_01F36Uc6swK21c7x7J14k1wc --------- Co-authored-by: Claude <[email protected]>
…ine and batch-failure guarantees (#722) The deterministic pass already runs without a model, and a normal scan already keeps its rule findings when a model batch fails. What was missing was the name the issue asks for and a test for either guarantee. - `cora scan --rules-only` is a visible alias of `--no-llm`. - tests/scan_rules_only.rs: with a key and endpoint configured, --no-llm and --rules-only find the planted issues and open no connection (a counting listener); a normal scan against an endpoint that always answers 504 contacts it and still reports every planted finding.
ajianaz
force-pushed
the
feat/scan-rules-only-alias
branch
from
November 16, 2026 01:09
1af30d8 to
b5c7741
Compare
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.
What
cora scan --rules-onlybecomes a visible alias of--no-llm, and two integration tests pin the guarantees #722 asks for.Why
Closes #722, with a finding: most of what the issue asks for already exists. I checked each claim against the current code with the real binary before writing anything:
cora scan --no-llm(and the automatic no-key behaviour) runs the rules, secret and security scanners and the index scans. With three planted issues it reported all three and no model was configured.cora scanprinted "batch 1/1 — skipping", and still reported all three planted findings.What was missing was the name the issue uses and any test for either guarantee, so a refactor could silently break them. I did not add a second code path.
How
src/main.rs:#[clap(long, visible_alias = "rules-only")]onscan'sno_llm.tests/scan_rules_only.rs(new): plants a hardcoded secret, SQL built by concatenation and a token; a counting TCP listener stands in for the provider.rules_only_finds_the_planted_issues_and_never_connects: with a key and endpoint configured,--no-llmand--rules-onlyfind all planted issues, exit 0, and the listener sees 0 connections.rule_findings_survive_every_model_batch_failing: a normal scan against a listener that always answers 504 contacts it (at least 1 hit, which also proves the counter works) and still reports every planted finding.cli-reference.md) and the changelog.reviewexit 1 by default; the same policy forscanis a behaviour change for scan users, so I left it for its own issue.Testing
cargo test --features tree-sitterpasses (1349 unit tests + integration suites, including the 2 new ones)cargo fmt --all -- --checkpassescargo clippy --all-targets --features tree-sitter -- -D warningspassescargo build --release --features tree-sitterpasses (left to CI)scan --no-llmwith no key found 3 of 3 planted issues; a normal scan with every request answering 504 skipped its only batch and still printed the same 3 findings.planted_value_for_the_test_0123456789, which cora's own rule still flags.Related Issues
Closes #722. Related: #720 (#733), #713.
Checklist
feat/)develop