You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(review): the review orchestrator and the scanners take the reviewed workspace from their caller, and no review or scanner module reads Path.cwd() #2098
Part 2 of the tracker #772. The review orchestrator and the scanners find the reviewed workspace from the working directory of the process, not from their caller. So a test cannot give them a temporary workspace, and a review of a path depends on where the command starts.
src/devops_cli/ai/review/exporter.py: 2 (the workspace root and the allowed roots)
src/devops_cli/ai/review/pipeline.py: 1
src/devops_cli/ai/review/runner.py: 2 (the allowed roots and the git root)
src/devops_cli/security/base.py: 2 (the candidate roots and a fallback)
src/devops_cli/security/kubelinter.py, mypy.py, osv_scanner.py and popeye.py: 1 each
#772's acceptance criterion: the orchestrator receives the reviewed workspace (root, listing, reading, sibling and manifest discovery), its scanners and its enrichers through its constructor, and no review module probes Path.cwd(). tests/test_review_pipeline.py::test_review_pipeline_stages, tests/test_review_repos.py::TestReviewReposSubdirectories::test_review_path_summary_in_repos_directory and tests/test_review_security_tools.py::test_pipeline_multi_scanner_aggregation pass a temporary workspace and fakes, and each runs in under 5 s.
Acceptance criteria
No module under src/devops_cli/ai/review/ or src/devops_cli/security/ reads Path.cwd() or os.getcwd(). Only the command layer reads the working directory, one time, and gives the workspace down. A test holds this.
The three tests named above use a temporary workspace and fakes, and each runs in under 5 s.
Order
After #1978, #1983 and #1984 merge, because they change security/mypy.py, security/sarif.py and review/canary.py.
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 proposes a refactor to improve how the review orchestrator and scanners handle workspace paths.
Priority: P2-Medium. This change improves testability and consistency of path handling but is not critical for core functionality.
Value: Medium. The change improves the reliability of path reviews and makes testing easier, which benefits users indirectly.
Effort: High. The change requires modifying multiple modules under ai/review/ and security/ to remove Path.cwd() calls and pass workspace information through constructors.
Added scope, 2026-10-24 (from #1978). The review tests that build an orchestrator with no executor (about 34 test files) get ToolExecutorFake through the constructor. Then the root conftest no longer wraps DirectToolExecutor.run to answer the canary requests (pin_review_tool_canaries), which is a patch of a devops-cli name.
Activity
dan-petty commentedon Oct 24, 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 proposes a refactor to improve how the review orchestrator and scanners handle workspace paths.This change improves testability and consistency of path handling but is not critical for core functionality.The change improves the reliability of path reviews and makes testing easier, which benefits users indirectly.The change requires modifying multiple modules under ai/review/ and security/ to remove Path.cwd() calls and pass workspace information through constructors.Both items relate to path reviews but the candidate focuses on eliminating Path.cwd() usage while item #1038 addresses a specific issue with file path handling in single-file reviews.dan-petty commentedon Oct 24, 2026
Added scope, 2026-10-24 (from #1978). The review tests that build an orchestrator with no executor (about 34 test files) get
ToolExecutorFakethrough the constructor. Then the root conftest no longer wrapsDirectToolExecutor.runto answer the canary requests (pin_review_tool_canaries), which is a patch of a devops-cli name.refactor(review): the review orchestrator and the scanners take the r…
refactor(review): scanners and the origin lookup take the caller's di…