Repository navigation
Closed
Labels
Description
Friction
- Mypy and the review canary start their tools outside the
ToolExecutorseam. A review therefore runs mypy over the default executor, also when the review gives its scanners another executor. - Review tests patch
run_mypy_scanto set the mypy scan aside, because mypy has no fake.
Evidence
Checked at main 4bb052c.
run_mypy_scan(src/devops_cli/security/mypy.py) takes no executor. Mypy startspython -I -m mypy. The interpreter is the.venvof the reviewed repository when it has one.- A
ToolRequestnames a tool of the tools lock. The executor finds the binary of that tool on thePATHof the host. So a request cannot name the interpreter of the reviewed repository. - The canary runner (
src/devops_cli/review/canary.py) builds the same mypy command. tests/test_review_tool_runs.py:107patchesdevops_cli.security.mypy.run_mypy_scan.docs/agent/tasks/task-772-the-review-scanners-run-through-the-tool-executor.mdlists this part as not done.- feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 lists this change as its later part 1 of six. After the split, feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 only tracks its child issues, and no pull request closes feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 itself. So this candidate asks for a change that no other issue holds.
Existing tool considered
- The
ToolExecutorseam of feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 Part A (feat(review): add the tool executor seam, its sandbox executor and its fake #1914) andToolExecutorFake(tests/support/fakes/tool_executor.py) exist. This part reuses them. run_subprocessofcore.processstays the only code that starts a process. This part adds no other process runner.
Proposed remedy
- Let a
ToolRequestname a program that is not a tool of the lock, such as the interpreter of the reviewed.venv. TheToolRunrecords that program and its digest. run_mypy_scanand the canary runner take aToolExecutorand build aToolRequest.- The review gives mypy the same executor that it gives every other scanner.
- Remove the patch of
run_mypy_scanfrom the review tests. Use the executor fake.
Acceptance criteria
- A
ToolRequestcan name a program that is not a tool of the lock, and itsToolRunnames that program. -
run_mypy_scanand the canary runner start mypy only through theToolExecutorthat they get. A test overToolExecutorFakeasserts 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 cipasses.
Source: #772
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 23, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate changes how tools start through a ToolExecutor seam.The change improves code structure and testability but does not fix a bug or add a feature.The change helps ensure mypy and the review canary use the same executor as other scanners.The change requires modifying how mypy and the canary runner start tools and updating tests.test(review): scanner_fake answers the review scanners through the To…
refactor(review): the review orchestrator and the scanners take the r…
feat(review): a review runs its tools in the network-less sandbox by …