codescout doctor: add the --scope flag (BL-65)
Context: codescout doctor (the CLI) exposes every param of the librarian doctor scanner except scope. It is omitted on purpose, and the omission is declared in SCANNER_PARAMS_THE_CLI_OMITS (src/cli/doctor.rs). The reason recorded there is now spent: the scanner genuinely narrows its population by scope since 2026-09-10 (DoctorScope::admit). The entry's own text calls the flag "now owed rather than justified". Tracked as BL-65 in docs/trackers/open-issue-work-queue.md.
Task: add --scope to DoctorArgs, emit it from to_tool_args, and remove the scope entry from SCANNER_PARAMS_THE_CLI_OMITS. Decide what that list becomes once it's empty: its two guard tests should keep meaning something.
Acceptance:
every_scanner_param_is_reachable_from_the_cli_or_named_as_omittedpasses with no omission forscope.- A test showing
--scope <value>reaches the scanner, and changes the scanned population on a fixture where scopes differ. A test that only checks the arg is forwarded would pass even if the scanner ignored it, which is the exact defect that blocked this before. - These tests are librarian-gated: run the default lane (
cargo test --workspace). The lean lane never compiles them.
Bug file: docs/issues/2026-09-24-residual-cli-doctor-scope-flag.md. History: docs/issues/archive/2026-09-09-doctor-accepts-a-scope-argument-and-never-reads-it.md.
Base your branch on a fresh origin/experiments.
Done. --scope shipped in 49d08af3 (the flag, validated by clap, sent only when set, omission list emptied). The remaining acceptance item, a test that --scope changes the scanned population, merged in #30 (b0d6cee0). Thanks @sdumitr3.