Repository navigation
feat(review): orchestrator review prompts boundary isolation guardrails parity (#605) - #611
Merged
dan-petty merged 1 commit intoSep 25, 2026
Conversation
dan-petty
deleted the
feat/605-orchestrator-prompt-boundary-isolation
branch
September 25, 2026 21:14
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.
Summary
Delivers Part 1 (Parity, P0) of Issue #605: establishes prompt boundary isolation, untrusted preambles, and guardrail parity between
ReviewPipelineOrchestratorandrunner.pyreview workflows, while eliminating the misleadingpersona_titleand{persona}placeholders.Key Changes
_persona_system_promptinsrc/devops_cli/ai/review/classification.pyand applied it across allReviewPipelineOrchestratoragents in_build_multi_persona_pipeline, embedding<project_conventions_context>, negative false-positive exemplars (render_negative_exemplars()), and prompt isolation guardrails (_GUARDRAILS_PROMPT) without circular imports.<target_code_to_review>with_UNTRUSTED_CONTENT_PREAMBLE, and wrapped symbols, RAG, and contract context in<untrusted_related_files>with_UNTRUSTED_CONTEXT_PREAMBLE.persona_titleand{persona}placeholders outright from task prompt templates (code_review_prompt.md,config_review_prompt.md,docs_review_prompt.md) and prompt builderbuild_context_review_prompt, eliminating persona identity collision where every persona reviewed as "DevSecOps Specialist".build_context_review_promptinto single-responsibility helpers (_format_untrusted_context,_resolve_review_task_and_label) to strictly maintain cyclomatic complexitycode_review_promptinsrc/devops_cli/ai/mcp/server.pyto format targets cleanly while prepending persona headers when requested.tests/test_review_classification.pyasserting boundary isolation, preambles, and that every_build_multi_persona_pipelineagent carries guardrails and exemplars using consolidated structural tuple equality assertions.Verification
uv run pytest tests/test_review_classification.py -v: 18/18 passedtests/test_review_pipeline.py&tests/test_review_page_line_numbers.py: passedtests/test_architectural_invariants.py: passed (zero circular imports inai/review)src/devops_cli/ai/review/classification.pyandtests/test_review_classification.pycompliant (uv run devops ci): 100% passing across all 10 quality gates (5,796 tests passed, 0 failures, 90.74% coverage)