feat: include human replies in review context #17
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/forgejo-auto-pr-review!17
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-16-human-review-context"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #16.\n\nMakes bounded, post-review human replies available as explicitly untrusted context on subsequent automated review runs, while excluding the previous automated review itself.\n\nCloses #16.
Automated code review
Reviewed commit:
533617d4e42aa9141f8aa3e87a06091358a7b2b8Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The pull request implements bounded, post-review human context injection with explicit untrusted labeling, byte-size limits, and AI output exclusion. The implementation correctly parses YAML comments, safely truncates UTF-8 text, and integrates the context into both review and validation prompts. Tests cover edge cases for parsing, truncation, and filtering.
Blocking findings
None.
Important findings
None.
Suggestions
YAML single-quote escape handling omitted in comment stripper (reviewer.py:148; high confidence)
elif character in ("'", '"'):
quote = character
Impact: Values containing YAML single-quote escapes (e.g., 'it''s fine' # comment) may be incorrectly truncated or parsed as comments.
Suggested fix: Add a check for consecutive single quotes to toggle the escape state, or document that single-quoted scalars with escapes are out of scope.
Timestamp comparison relies on lexicographical ordering (reviewer.py:235; medium confidence)
and comment.get("created_at", "") > after
Impact: Works for standard ISO 8601 timestamps but could fail or produce unexpected ordering if non-standard formats or missing timezone indicators appear in the API response.
Suggested fix: Parse timestamps with datetime.fromisoformat() for robust comparison, or explicitly document the expected timestamp format requirement.
Tests and validation
Questions
Review limitations
Diff coverage
.forgejo/ai-review.yml: reviewed — included in a context-limited batch.forgejo/workflows/ai-review.yml: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchreviewer.py: reviewed — included in a context-limited batchtests/test_reviewer.py: reviewed — included in a context-limited batchReview metadata