13 Commits

Author SHA1 Message Date
Daan Schouteden 6ebd04a60b Normalize Cursor verdict values and post PR comment on review failures.
Coerce common verdict/event variants before validation, skip retries on schema errors, and leave a failure comment plus reviewer removal for any failed run.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 14:02:57 +02:00
Daan Schouteden 95fa696935 Centralize best-effort deletes: log errors and continue review flow.
All cleanup deletes now use runBestEffort so Gitea delete failures never abort posting the new review.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 13:29:40 +02:00
Daan Schouteden 8bcd91cdb2 Make prior review cleanup best-effort so post review still runs.
Gitea can return 500 when deleting old reviews; log and continue instead of failing the whole webhook after a successful Cursor run.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 13:29:01 +02:00
Daan Schouteden a847017358 Post failure comment and unassign bot when review times out.
After a Cursor timeout, explain the failure on the PR and remove the bot from requested reviewers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 13:05:00 +02:00
Daan Schouteden 4ed3410eb4 Lower default Cursor review timeout to five minutes.
Balance responsiveness with cloud agent runtimes that exceeded the previous two-minute limit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 11:28:45 +02:00
Daan Schouteden 881719f743 Add PR progress comment and increase Cursor review timeout.
Post a temporary in-progress comment while reviewing, remove it when done, default timeout to 10 minutes, and skip retries on timeout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 11:28:24 +02:00
Daan Schouteden 28488d0be9 Fix Cursor cloud validation and dedupe after failed reviews.
Use a no-repo cloud agent since Gitea remotes are not supported for clone, and only mark dedupe complete on success so review_requested can retry.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 11:05:21 +02:00
Daan Schouteden 84db121a4c Accept review_requested on pull_request webhook events.
Gitea sends review requests as pull_request/review_requested, not only pull_request_review_request.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 10:59:22 +02:00
Daan Schouteden 376c499c81 Fix Cursor SDK invocation to use static Agent.prompt API.
Use cloud repo config with Gitea URL and head ref, parse RunResult output correctly, and log cursor run IDs for debugging.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 10:42:54 +02:00
Daan Schouteden e9aafdf8c4 Add structured JSON logging across webhook and review flow.
Improve observability with correlation IDs, skip/success/failure lifecycle events, and retry diagnostics while documenting log level configuration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 15:00:29 +02:00
Daan Schouteden 7233ab3f32 Update Dockerfile to point CMD to the correct server file location 2026-06-02 13:08:07 +02:00
Daan Schouteden 6dbf604a7f Add architecture diagram to README.md 2026-06-02 11:42:30 +02:00
Daan Schouteden 3d0e28f427 Init 2026-06-02 11:39:41 +02:00