Skip to content

refactor(security): mypy and the review canary start their tools through a ToolExecutor #1978

Closed

Description

@dan-petty

Friction

  • Mypy and the review canary start their tools outside the ToolExecutor seam. A review therefore runs mypy over the default executor, also when the review gives its scanners another executor.
  • Review tests patch run_mypy_scan to set the mypy scan aside, because mypy has no fake.

Evidence

Checked at main 4bb052c.

Existing tool considered

Proposed remedy

  • Let a ToolRequest name a program that is not a tool of the lock, such as the interpreter of the reviewed .venv. The ToolRun records that program and its digest.
  • run_mypy_scan and the canary runner take a ToolExecutor and build a ToolRequest.
  • The review gives mypy the same executor that it gives every other scanner.
  • Remove the patch of run_mypy_scan from the review tests. Use the executor fake.

Acceptance criteria

  • A ToolRequest can name a program that is not a tool of the lock, and its ToolRun names that program.
  • run_mypy_scan and the canary runner start mypy only through the ToolExecutor that they get. A test over ToolExecutorFake asserts the request.
  • No review test patches run_mypy_scan.
  • Tests run offline with fakes and recorded tool output: no network, no real scanner, no model. Each new test runs under 1 s.
  • uv run devops ci passes.

Source: #772

Activity

  1. added
    source/agent
    type/refactor
    on Oct 23, 2026
  2. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/refactor. The candidate changes how tools start through a ToolExecutor seam.
    • Priority: P2-Medium. The change improves code structure and testability but does not fix a bug or add a feature.
    • Value: Medium. The change helps ensure mypy and the review canary use the same executor as other scanners.
    • Effort: High. The change requires modifying how mypy and the canary runner start tools and updating tests.
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

    source/agenttype/refactor

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions