Skip to content

feat(review): pr post tested zero findings comment and eliminate positive observations (#604) - #623

Merged
dan-petty merged 1 commit into
release/v0.2.23from
feat/604-pr-post-tested-zero-findings-comment
Sep 26, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
feat/604-pr-post-tested-zero-findings-comment

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Description

Part 2 of Issue #604: Review Reports State Only What Was Checked, With a Tested Empty Outcome.

This PR completes the requirements of Issue #604 by delivering:

  1. Fixed, Tested Zero-Findings PR Comment for --post:
    • Implemented format_pr_review_comment emitting a deterministic zero-findings comment naming the exact files, personas, and static analyzers that ran.
    • Decomposed PR comment posting into _resolve_pr_files and _post_pr_review_comment in commands/review.py.
    • Preserves dry-run preview guarantees via _debug_block and print_warning.
  2. Elimination of positive_observations with Zero Legacy Remnants:
    • Removed positive_observations field, field validator, and merge logic from ReviewResult in src/devops_cli/ai/review_schema.py.
    • Removed positive_observations extraction and reconciliation from src/devops_cli/ai/review/verification.py.
    • Removed positive_observations rendering from src/devops_cli/output/formatters/panels.py and message definition from src/devops_cli/lang/en/messages.py.
    • Removed praise instructions and schema fields from prompt templates (src/devops_cli/ai/tasks/compose.md, src/devops_cli/ai/tasks/review_output_instruction.md).
    • Cleaned simulated dry-run result builders in src/devops_cli/ai/review/runner.py.
  3. Routing summary Under 'Model Notes (Not Verified)':
    • Replaced ## Summary with ## Model Notes (Not Verified) in _review_to_markdown in src/devops_cli/ai/review/runner.py.
    • Placed persona summaries under ## Model Notes (Not Verified) in PR comments.
  4. Comprehensive Test Coverage:
    • Added tests/test_review_pr_post.py covering zero-findings comments, findings rendering, multi-persona unverified notes, --post publishing, and --dry-run.
    • Cleaned existing test suites (tests/test_review_runner.py, tests/test_review_path.py, tests/test_review_verification.py).

Type of Change

  • feat: New feature or capability
  • docs: Documentation updates or additions
  • test: New or updated tests

Target Base Branch

  • Base branch targeting: release/v0.2.23

Enterprise SDLC Quality Gate Checklist

  • Test-First Implementation (TDD): Comprehensive unit and integration tests authored before implementation code.
  • Full CI Quality Gate: devops ci executed locally with 10/10 green quality gates.
  • Strict Code Coverage: Maintained strict >= 90% code coverage requirement across src/ (achieved 90.8%).
  • Architectural Invariants Gate:
    • Cyclomatic complexity <= 10 project-wide across all functions and closures (devops scan complexity).
    • Maximum nesting depth <= 5 (< 6 indentation levels) across all code blocks (test_no_excessive_nesting_in_src).
    • Standardized domain exceptions inheriting from DevOpsCLIError.
    • Pytest collection hygiene enforced.
  • Zero-Trust Security & Egress Safety:
    • Zero plaintext secrets, API keys, or credentials stored in code, configurations, or commit history.
    • No information leaked or extracted from private or .gitignored paths.
    • SSRF mitigation and bounded subprocess timeouts strictly enforced.
  • Canonical Location Formatting: All CLI outputs, Rich tables, reports, and review findings formatted as filename.ext:n-n.
  • Documentation Synchronization: CLI options, markdown guides, and README synchronized via devops docs generate --sync-readme.
  • Conventional Commit Messages: Commit history adheres strictly to Conventional Commits format (feat(review): ...).

Related Issues / Milestones

@dan-petty
dan-petty merged commit 4ff7c4e into release/v0.2.23 Sep 26, 2026
8 checks passed
@dan-petty
dan-petty deleted the feat/604-pr-post-tested-zero-findings-comment branch September 26, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant