Skip to content

Redesign autotest PR comments: inline reviews + clean format#2281

Draft
albabn wants to merge 10 commits into
manuel.palenzuela/innovatumfrom
alba/autotest-comment-redesign
Draft

Redesign autotest PR comments: inline reviews + clean format#2281
albabn wants to merge 10 commits into
manuel.palenzuela/innovatumfrom
alba/autotest-comment-redesign

Conversation

@albabn

@albabn albabn commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace verbose autotest PR comments (collapsible sections for "What changed", "Production data", "Scenarios executed", etc.) with a clean, scannable format
  • Post findings as inline review comments on the specific diff line when file+line is known, fall back to issue comments otherwise
  • Agent now outputs structured JSON instead of markdown — only the JSON is used for PR comments
  • Full detailed output (execution logs, scenarios, prod data) written to validation_report.md as a CI artifact
  • Each comment includes stats line with link to CI job logs and feedback prompt

Before

Wall of text with multiple collapsed <details> sections per comment.

After

PASS: Brief explanation + stats + log link
FAIL with line: Inline review comment on the exact diff line with explanation
FAIL without line: Issue comment with bold title + explanation

Test plan

  • 13 unit tests covering parser, formatter, CI URL helper, and edge cases
  • Dry-run against a real PR to verify JSON output
  • Dogfood on dd-source PRs by updating pinned SHA in domains/ci-app/etc/ci/autotest-pipeline.yml

🤖 Generated with Claude Code

albabn and others added 10 commits April 20, 2026 11:50
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the single postPrComment method with three new methods:
- postResults: dispatches findings to inline or issue comments
- postIssueComment: posts a standard issue comment (GitHub/GitLab)
- postInlineReviewComment: posts inline review comments on specific
  lines via the GitHub pull request review API, with fallback to
  issue comments on failure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ge case tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use parseAgentReport() to validate before capturing reportText,
  instead of greedy ```json check that matched intermediate messages
- Prefer resultText (actual final output) over reportText from
  assistant messages when posting comments
- Remove dead code checking for old ## Autotest: header
- Remove unused zod import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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