fix: separate review phases and resolve stale threads

This commit is contained in:
lezi-fun committed 2026-08-18 18:10:34 +08:00
1 parent e690b530c8
commit ceec15bf28
5 files changed
+416 -66

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ When Cloudflare R2 is configured, each successful review stores this metadata in
When a new commit triggers `synchronize`, or PR metadata/base changes trigger `edited`, the latest cache for that PR is restored. goose receives an earlier-head result plus the current complete PR patch, revalidates old findings, removes fixed findings, and checks the newest content. The previous merge decision is never reused without a fresh review. An `edited` event on the same head still runs a fresh complete review so title, description, and base-branch changes are respected.
For every `synchronize` event, ghbot posts a commit-scoped progress comment when review starts and updates that same comment when the run completes, fails, or becomes stale because the PR changed again. After the new review is published successfully, ghbot removes inline `review` and `change` comments from earlier bot reviews, dismisses any earlier active bot decision, and reduces its old summary to a superseded marker. GitHub does not allow a submitted review record itself to be deleted, so the newest review is the only full and active automated result.
For every `synchronize` event, ghbot posts a commit-scoped progress comment when review starts and updates that same comment when the run completes, fails, or becomes stale because the PR changed again. After the new review is published successfully, ghbot marks inline `review` and `change` threads from earlier bot reviews as resolved, dismisses any earlier active bot decision, and reduces its old summary to a superseded marker. If GitHub cannot expose a legacy thread through GraphQL, ghbot deletes only that unmappable inline comment as a fallback. GitHub does not allow a submitted review record itself to be deleted, so the newest review is the only full and active automated result.
Objects are isolated by repository ID and PR number. `latest.json` accelerates the next review, while `reviews/<head-sha>.json` preserves each successful head result. Closing or merging a PR does not proactively delete these objects. Cache data contains no API keys, full diff, or prompt.