Add pr-reviewer module: Gitea webhooks, Spring AI structured output, quote-checked inline comments, de-duplication across pushes and live tests against Gitea 1.27.3 on Spring AI 2.1.0

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4HkWoC7hLzk61vZa8
This commit is contained in:
Claude
2026-12-04 07:49:36 +05:30
parent 38c9ca8452
commit 8fa3c5d682
74 changed files with 4794 additions and 0 deletions
@@ -0,0 +1,26 @@
package com.ankurm.prreviewer;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
/**
* One claim made by the model. Nothing in it is trusted yet: {@link LineGuard} decides whether
* {@code line} and {@code quote} really point at a line this pull request added.
*/
public record Finding(
@JsonPropertyDescription("Line number in the new file, copied from the left column of the diff")
int line,
@JsonPropertyDescription("The exact code on that line, copied character for character, without the line number and + marker")
String quote,
Severity severity,
Category category,
@JsonPropertyDescription("Short headline, under 80 characters")
String title,
@JsonPropertyDescription("Why this is a problem, one or two sentences")
String comment,
@JsonPropertyDescription("Replacement code or a concrete fix; empty string if none")
String suggestion) {
Finding atLine(int newLine) {
return new Finding(newLine, quote, severity, category, title, comment, suggestion);
}
}