Add Greptile-style review priorities #6

Merged
lambadalambda merged 1 commit from feat/review-priorities into main 2026-08-06 08:32:10 +00:00

Summary

  • replace review severity with strict P0/P1/P2 priorities in protocol v3
  • suppress low-value findings, order findings by priority, and enforce readiness rating caps
  • preserve crash-safe publication recovery for already-persisted v2 results
  • render priority badges and reviewed-commit footers

Verification

  • go test ./...
  • go vet ./...
  • sh scripts/adversarial-check.sh
  • dispatcher and worker container builds
  • independent code review: approved with no P0/P1/P2 findings
## Summary - replace review severity with strict P0/P1/P2 priorities in protocol v3 - suppress low-value findings, order findings by priority, and enforce readiness rating caps - preserve crash-safe publication recovery for already-persisted v2 results - render priority badges and reviewed-commit footers ## Verification - `go test ./...` - `go vet ./...` - `sh scripts/adversarial-check.sh` - dispatcher and worker container builds - independent code review: approved with no P0/P1/P2 findings
feat: add review priority protocol
All checks were successful
opencode/review OpenCode execution completed
8dd5ea724a
Author
Owner

/oc review

/oc review
Collaborator

OpenCode Review

Execution completed for lambadalambda/opencode-forgejo-bot at 8dd5ea724ae2 (job #37).

Rating: 5/5

This PR cleanly introduces review protocol v3 with Greptile-style priorities (p0/p1/p2) replacing the v2 severity field, plus a conservative migration path for persisted v2 results. Fresh submissions now require priority and reject severity; ratings are hard-capped by the worst finding (p0→1, p1→3, p2→4) and findings are stable-sorted by priority. DecodePersistedReviewReport tries the current decoder first, then falls back to a strict legacy decoder that maps critical→p0, high→p1, medium/low→p2, clamps ratings downward, and preserves original finding indices so durable inline-comment markers stay valid during publication recovery. The inline dedup was switched from exact-body matching to marker+bot-username matching, which correctly avoids duplicating comments whose labels changed from [HIGH]/[LOW] to [P0]/[P2]. The launcher now trusts the dispatcher-decoded persisted report instead of re-normalizing, which is safe because recovery re-uses the authoritative stored ResultJSON and ignores the worker-supplied body. Tests cover migration, ordering, rating caps, collapsed-duplicate preservation, and inline identity preservation across pending/submitted legacy reviews. vet/fmt clean; all tests and adversarial checks pass. No correctness, security, data-integrity, or performance defects found.

No findings were reported.

Production-ready. The protocol bump is implemented with a sound, well-tested backward-compatibility strategy: legacy v2 results are migrated only during publication recovery with conservative priority mapping and rating capping, finding indices are preserved to keep durable inline markers stable, and the marker-based dedup correctly handles the severity→priority label change without creating duplicate comments. Fresh submissions are strictly validated (priority-only, exact fields, rating caps enforced as hard rejections). The recovery flow correctly re-uses the authoritative stored ResultJSON and decodes via the persisted decoder at both claim and result boundaries. The change to persistedClaimReport is safe because it only runs in recovery where the dispatcher has already validated the report. The bundled 'Last reviewed commit' rendering is benign and tested. I found no actionable defects.

<!-- opencode-review:v1:647e983a3b0c8f93383f73a4c2ac26a2 --> <!-- opencode-reviewed-head:8dd5ea724ae247183daf2deb5a855b6d52601075 --> ## OpenCode Review _Execution completed for `lambadalambda/opencode-forgejo-bot` at `8dd5ea724ae2` (job #37)._ Rating: **5/5** This PR cleanly introduces review protocol v3 with Greptile-style priorities (p0/p1/p2) replacing the v2 severity field, plus a conservative migration path for persisted v2 results. Fresh submissions now require priority and reject severity; ratings are hard-capped by the worst finding (p0→1, p1→3, p2→4) and findings are stable-sorted by priority. DecodePersistedReviewReport tries the current decoder first, then falls back to a strict legacy decoder that maps critical→p0, high→p1, medium/low→p2, clamps ratings downward, and preserves original finding indices so durable inline-comment markers stay valid during publication recovery. The inline dedup was switched from exact-body matching to marker+bot-username matching, which correctly avoids duplicating comments whose labels changed from [HIGH]/[LOW] to [P0]/[P2]. The launcher now trusts the dispatcher-decoded persisted report instead of re-normalizing, which is safe because recovery re-uses the authoritative stored ResultJSON and ignores the worker-supplied body. Tests cover migration, ordering, rating caps, collapsed-duplicate preservation, and inline identity preservation across pending/submitted legacy reviews. vet/fmt clean; all tests and adversarial checks pass. No correctness, security, data-integrity, or performance defects found. No findings were reported. Production-ready. The protocol bump is implemented with a sound, well-tested backward-compatibility strategy: legacy v2 results are migrated only during publication recovery with conservative priority mapping and rating capping, finding indices are preserved to keep durable inline markers stable, and the marker-based dedup correctly handles the severity→priority label change without creating duplicate comments. Fresh submissions are strictly validated (priority-only, exact fields, rating caps enforced as hard rejections). The recovery flow correctly re-uses the authoritative stored ResultJSON and decodes via the persisted decoder at both claim and result boundaries. The change to persistedClaimReport is safe because it only runs in recovery where the dispatcher has already validated the report. The bundled 'Last reviewed commit' rendering is benign and tested. I found no actionable defects.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lambadalambda/opencode-forgejo-bot!6
No description provided.