Repository navigation
refactor(review): remove the review stage modules the pipeline never calls - #561
Merged
dan-petty merged 1 commit intoSep 25, 2026
Merged
Conversation
…calls Six of the seven run_*_stage functions in ai/review/stages had no caller. They duplicated the pipeline's logic and had drifted from it: the static scan stage still printed a misleading "completed" message and never called Trivy. Tests imported them, which kept them looking alive. Removed: pre_analysis, static_scan, persona_review, verification and reranking, and run_reporting_stage. stages keeps the adversarial debate and the report's executive summary. Two guards moved onto the pipeline, which lacked them. The orchestrator refuses a session directory with `..` or outside the reviews, working or temporary directory. _resolve_file_path resolves only inside the review target or its repository; it used to return any existing absolute path. Closes #530
This was referenced Sep 25, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #530.
Why
Six of the seven
run_*_stagefunctions inai/review/stages/had no caller. They duplicated the pipeline's logic and had drifted from it:static_scan.pystill printed "Static analyzers completed (0 finding(s) detected)" and never called Trivy (#516). Tests imported them, which kept them looking alive.Changes
Removed:
pre_analysis.py,static_scan.py,persona_review.py,verification.pyandreranking.py;run_reporting_stagefromreporting.py.stagesnow exports only what the pipeline uses: the adversarial debate and the report's executive summary.Guards moved onto the pipeline, which lacked them:
ReviewPipelineOrchestratorrefuses a session directory with a..component, or one outside the reviews, working or temporary directory, before writing to it (asrun_reporting_stagechecked)._resolve_file_pathresolves only to files inside the review target or its repository. A path outside both, absolute or through.., falls back to a missing in-target path (as_resolve_target_pathrequired). Previously it returned any existing absolute path.Test plan
tests/test_review_stages.pykeeps the adversarial debate testtests/test_subsystem_containment_and_redaction.py: session-directory and file-path containment now tested on the pipelinesrc/,tests/ordocs/uv run devops ci --force: all 13 gates pass