Skip to content

fix(scan): run the same deterministic family as review (rules engine was skipped) #645

Closed

Description

@ajianaz

From the architecture audit. Part 4 of 6. Can run in parallel with 3/6 after 2/6.

Problem

cora scan silently skips the rules engine: rules::run_rules is only called from engine/deterministic.rs (review). Scan gets secrets+security via postprocess_report(Source::Files) and two index scans, but no built-in or custom rules, no quality gate, no sanitizer, no --ci/--severity/--quiet. commands/scan.rs::execute_scan (~L90-340) owns a private copy of the deterministic orchestration. Also DEFAULT_BATCH_TOKEN_BUDGET is used as a char limit.

Proposal

deterministic::run takes either source (diff chunks or the scan_input file lines from #610); run_rules accepts that input. Scan becomes walk + batch + judge + finalize. Decide explicitly (and document) which review flags scan gets.

Done when

  • Built-in and custom rules fire in cora scan; docs/cli-reference updated.
  • Scan's private orchestration is deleted; scan is testable with a fake judge / None.
  • Rename the batch constant to what it measures.

Activity

  1. added
    bug
    scope:core
    cora-scan
    on Oct 15, 2026
  2. ajianaz commented on Oct 15, 2026

    @ajianaz
    CollaboratorAuthor

    Series map (sequential, one PR each): 1/6 finalize #648 → 2/6 prepare/judge/finalize #649 → 3/6 untrusted judge output + cache #644 → 4/6 scan deterministic family #645 (can parallel 3/6) → 5/6 select_judge #646 → 6/6 MCP agent tools + skill #647.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcora-scanscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions