[PR #8095] [MERGED] fix(review): use current check results for Dottore approval #8098

Closed
opened 2026-10-24 04:10:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8095
Author: @SpicyMarinara
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/8083-dottore-latest-check-runs


📝 Commits (4)

  • 6ea9e78 chore: start current Dottore check selection fix
  • e84410a fix(review): select latest source-bound check and status results
  • 1110f58 fix(review): preserve paginated status evidence and lookup errors
  • 6300a2a fix(review): report unverifiable approval evidence without crashing

📊 Changes

2 files changed (+206 additions, -13 deletions)

View changed files

📝 .github/dottore-review/dottore_review.py (+58 -13)
➕ scripts/regressions/dottore-check-results.regression.mjs (+148 -0)

📄 Description

Linked issue

Closes #8083

Why this change

Dottore's approval command can report a successful required check as missing when GitHub returns an older cancelled attempt after the latest successful run. It also lets same-named commit statuses overwrite check results.

What changed

  • Paginate check runs and commit statuses, select the newest record by ID, and preserve the required check's GitHub App binding.
  • Resolve a status-only app's identity from GitHub when no check run supplies it. Unknown sources cannot satisfy an app-bound requirement. Unverifiable lookups, including a potentially private app returning 404, cannot satisfy the binding. The approval command reports API errors, timeouts and malformed check evidence through its existing refusal message, with bounded details, rather than fabricating a failed check or crashing before answering an explicit request.
  • Keep a same-named check and commit status as separate gates. Current pending, failed, cancelled and missing required checks continue to block approval.
  • Select the latest publisher for unbound commit-status contexts, and the latest matching publisher for app-bound contexts.
  • Add ten deterministic regression cases covering the reported rerun order, reverse ordering, current failures, missing checks, app identity, status/check conflicts and pagination beyond 100 runs.

Validation

  • pnpm install --frozen-lockfile: passed.
  • pnpm check: passed, repeated after the hosted-review repairs.
  • node scripts/regressions/dottore-check-results.regression.mjs: passed (10 Python test cases, including automatic and explicitly requested approval error paths). The initial proof failed against the old implementation.
  • node scripts/regressions/dottore-stream-progress.regression.mjs: passed.
  • Local CodeRabbit review identified status-only app and unbound-publisher cases; both were fixed and covered. Hosted Dottore then identified paginated status formatting and lookup-error diagnostics; both were reproduced and repaired with two additional regressions. An additional end-to-end error-path control exposed the missing approval handler. It now reports lookup, timeout and parse failures without approving; red/green controls also cover a bounded error message and HTTP 404. The latest fresh local review reports no new findings across both changed files; its earlier error-handling finding is fixed and covered.
  • Read-only GitHub API verification confirmed current app IDs and full status records used by the selection logic. No paid model call is needed by the regression.

Human verification tasks:

  • Manually request Dottore approval on a PR with an older cancelled rerun and a newer successful run.
  • Manually verify a status-only integration's approval gate when one is configured.

Docs and release impact

No changes to reviewer models, branch protection, required-check names or release metadata.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8095 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/8083-dottore-latest-check-runs` --- ### 📝 Commits (4) - [`6ea9e78`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6ea9e783e6467bd39620bb61ddee0728ad18197c) chore: start current Dottore check selection fix - [`e84410a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e84410aa52e03285837f615b0124963cbdcd3e6c) fix(review): select latest source-bound check and status results - [`1110f58`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1110f5805f39f72742f82b1abcd2e45101b922e9) fix(review): preserve paginated status evidence and lookup errors - [`6300a2a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6300a2a6e26434c5f4338a2fe4b36810a28511c7) fix(review): report unverifiable approval evidence without crashing ### 📊 Changes **2 files changed** (+206 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `.github/dottore-review/dottore_review.py` (+58 -13) ➕ `scripts/regressions/dottore-check-results.regression.mjs` (+148 -0) </details> ### 📄 Description ## Linked issue Closes #8083 ## Why this change Dottore's approval command can report a successful required check as missing when GitHub returns an older cancelled attempt after the latest successful run. It also lets same-named commit statuses overwrite check results. ## What changed - Paginate check runs and commit statuses, select the newest record by ID, and preserve the required check's GitHub App binding. - Resolve a status-only app's identity from GitHub when no check run supplies it. Unknown sources cannot satisfy an app-bound requirement. Unverifiable lookups, including a potentially private app returning 404, cannot satisfy the binding. The approval command reports API errors, timeouts and malformed check evidence through its existing refusal message, with bounded details, rather than fabricating a failed check or crashing before answering an explicit request. - Keep a same-named check and commit status as separate gates. Current pending, failed, cancelled and missing required checks continue to block approval. - Select the latest publisher for unbound commit-status contexts, and the latest matching publisher for app-bound contexts. - Add ten deterministic regression cases covering the reported rerun order, reverse ordering, current failures, missing checks, app identity, status/check conflicts and pagination beyond 100 runs. ## Validation - `pnpm install --frozen-lockfile`: passed. - `pnpm check`: passed, repeated after the hosted-review repairs. - `node scripts/regressions/dottore-check-results.regression.mjs`: passed (10 Python test cases, including automatic and explicitly requested approval error paths). The initial proof failed against the old implementation. - `node scripts/regressions/dottore-stream-progress.regression.mjs`: passed. - Local CodeRabbit review identified status-only app and unbound-publisher cases; both were fixed and covered. Hosted Dottore then identified paginated status formatting and lookup-error diagnostics; both were reproduced and repaired with two additional regressions. An additional end-to-end error-path control exposed the missing approval handler. It now reports lookup, timeout and parse failures without approving; red/green controls also cover a bounded error message and HTTP 404. The latest fresh local review reports no new findings across both changed files; its earlier error-handling finding is fixed and covered. - Read-only GitHub API verification confirmed current app IDs and full status records used by the selection logic. No paid model call is needed by the regression. Human verification tasks: - [ ] Manually request Dottore approval on a PR with an older cancelled rerun and a newer successful run. - [ ] Manually verify a status-only integration's approval gate when one is configured. ## Docs and release impact No changes to reviewer models, branch protection, required-check names or release metadata. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:10:21 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
Pasta-Devs/Marinara-Engine#8098
No description provided.