[GH-ISSUE #8083] [Issue]: Dottore approval reads an older canceled check over the newer passing run #7553

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

Originally created by @SpicyMarinara on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8083

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Dottore's advisory approval helper can reject a head whose current required checks have passed. checks_not_passed() iterates check runs in newest-first API order but overwrites passed[name] for every duplicate, so an older canceled run replaces the newer successful result.

Owner: @SpicyMarinara. This is a focused follow-up for Engine-owned shared reviewer tooling; no implementation is included in Agents #1583.

Expected behavior

For repeated instances of a check, evaluate the current applicable result while preserving required-check/source identity. A superseded canceled Catalog run must not replace a newer passing Catalog result. A genuinely current pending, failed, or missing requirement must still hold approval.

Actual behavior

On Pasta-Devs/Marinara-Agents#1583, immutable head 690e28d277a7f616928b1af3b1fb4e710bab42ca, the complete examination returned Viable, With Notes, zero defects, and no review threads. All seven latest required contexts passed. Yet discharge job 119895816788 printed at 2026-10-22 14:52:23 UTC:

Not approved: these checks have not passed: `Catalog validation`

The captured check-runs API response contains these two entries, in this order:

Check run Workflow run Result Completed (UTC)
119891448787 39798262571 success 14:46:11
119890653888 39798059995 cancelled 14:44:18

Both are named Catalog validation, use the same head, workflow path and GitHub Actions integration, and are eligible pull_request runs. The newer passing result is overwritten by the older cancellation.

Steps to reproduce

  1. On a PR head, let a required workflow job be canceled by a subsequent same-head run, then let the newer run pass.
  2. Capture GET /repos/{owner}/{repo}/commits/{head}/check-runs?per_page=100, effective base rules, and the combined commit status response.
  3. Invoke the unchanged checks_not_passed(base, head) with those API responses. The actual source function extracted with Python ast and the captured responses deterministically returned ["Catalog validation"] for the head above.

The relevant existing implementation is the assignment in checks_not_passed: passed[check_run.get("name")] = done runs for each duplicate name. The same helper exists in trusted Engine 95713e33f114283c98a0bc50d4eab1e8852c718a, which executed this review, and in merged Engine #8074 source 6dd282ba47a3b99dbc3f5015e532073dcb7c9004.

Environment

  • Marinara Engine version: shared reviewer tooling at the immutable revisions above.
  • Install type: reusable GitHub Actions workflow, invoked from Marinara-Agents.
  • OS: GitHub-hosted ubuntu-latest.
  • Browser or app shell: not applicable.

Logs, screenshots, or video

  • Completed substantive walkthrough, exact reviewed-head marker 690e28d277a7f616928b1af3b1fb4e710bab42ca.
  • Discharge job and its log.
  • The two immutable job links and captured response facts are listed above. The unchanged-source offline reproduction and complete API fixtures are preserved in the investigating session.

Additional context

This is a proven advisory approval bug. The helper's approval is explicitly a signal that no ruleset counts. GitHub separately reported mergeStateStatus=BLOCKED; the cause of that server state remains unproven, and this issue does not claim the helper caused it. No protection, model, secret, or paid-review changes are needed to reproduce the helper defect.

A single unchanged replay of the older canceled Catalog job is being used to obtain completed test evidence for the existing PR, not to fabricate a status or weaken a gate. No new paid review is required for this reproduction.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8083 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Dottore's advisory approval helper can reject a head whose current required checks have passed. `checks_not_passed()` iterates check runs in newest-first API order but overwrites `passed[name]` for every duplicate, so an older canceled run replaces the newer successful result. Owner: @SpicyMarinara. This is a focused follow-up for Engine-owned shared reviewer tooling; no implementation is included in Agents #1583. ## Expected behavior For repeated instances of a check, evaluate the current applicable result while preserving required-check/source identity. A superseded canceled Catalog run must not replace a newer passing Catalog result. A genuinely current pending, failed, or missing requirement must still hold approval. ## Actual behavior On Pasta-Devs/Marinara-Agents#1583, immutable head `690e28d277a7f616928b1af3b1fb4e710bab42ca`, the complete examination returned **Viable, With Notes**, zero defects, and no review threads. All seven latest required contexts passed. Yet discharge job [119895816788](https://github.com/Pasta-Devs/Marinara-Agents/actions/runs/39798958113/job/119895816788) printed at 2026-10-22 14:52:23 UTC: ```text Not approved: these checks have not passed: `Catalog validation` ``` The captured check-runs API response contains these two entries, in this order: | Check run | Workflow run | Result | Completed (UTC) | | --- | --- | --- | --- | | [119891448787](https://github.com/Pasta-Devs/Marinara-Agents/actions/runs/39798262571/job/119891448787) | 39798262571 | success | 14:46:11 | | [119890653888](https://github.com/Pasta-Devs/Marinara-Agents/actions/runs/39798059995/job/119890653888) | 39798059995 | cancelled | 14:44:18 | Both are named `Catalog validation`, use the same head, workflow path and GitHub Actions integration, and are eligible `pull_request` runs. The newer passing result is overwritten by the older cancellation. ## Steps to reproduce 1. On a PR head, let a required workflow job be canceled by a subsequent same-head run, then let the newer run pass. 2. Capture `GET /repos/{owner}/{repo}/commits/{head}/check-runs?per_page=100`, effective base rules, and the combined commit status response. 3. Invoke the unchanged `checks_not_passed(base, head)` with those API responses. The actual source function extracted with Python `ast` and the captured responses deterministically returned `["Catalog validation"]` for the head above. The relevant existing implementation is [the assignment in `checks_not_passed`](https://github.com/Pasta-Devs/Marinara-Engine/blob/6dd282ba47a3b99dbc3f5015e532073dcb7c9004/.github/dottore-review/dottore_review.py#L4497-L4516): `passed[check_run.get("name")] = done` runs for each duplicate name. The same helper exists in trusted Engine `95713e33f114283c98a0bc50d4eab1e8852c718a`, which executed this review, and in merged Engine #8074 source `6dd282ba47a3b99dbc3f5015e532073dcb7c9004`. ## Environment - Marinara Engine version: shared reviewer tooling at the immutable revisions above. - Install type: reusable GitHub Actions workflow, invoked from Marinara-Agents. - OS: GitHub-hosted `ubuntu-latest`. - Browser or app shell: not applicable. ## Logs, screenshots, or video - [Completed substantive walkthrough](https://github.com/Pasta-Devs/Marinara-Agents/pull/1583#issuecomment-6343741785), exact reviewed-head marker `690e28d277a7f616928b1af3b1fb4e710bab42ca`. - [Discharge job and its log](https://github.com/Pasta-Devs/Marinara-Agents/actions/runs/39798958113/job/119895816788). - The two immutable job links and captured response facts are listed above. The unchanged-source offline reproduction and complete API fixtures are preserved in the investigating session. ## Additional context This is a proven advisory approval bug. The helper's approval is explicitly a signal that no ruleset counts. GitHub separately reported `mergeStateStatus=BLOCKED`; the cause of that server state remains unproven, and this issue does not claim the helper caused it. No protection, model, secret, or paid-review changes are needed to reproduce the helper defect. A single unchanged replay of the older canceled Catalog job is being used to obtain completed test evidence for the existing PR, not to fabricate a status or weaken a gate. No new paid review is required for this reproduction. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-24 04:04:10 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Oct 22, 2026):

Implementation owner: @SpicyMarinara (Codex). I am reproducing duplicate check-run ordering with offline API fixtures and will preserve current pending/failing/missing-check and integration-source gates.

<!-- gh-comment-id:6345696554 --> @SpicyMarinara commented on GitHub (Oct 22, 2026): Implementation owner: @SpicyMarinara (Codex). I am reproducing duplicate check-run ordering with offline API fixtures and will preserve current pending/failing/missing-check and integration-source gates.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 22, 2026):

Resolved by #8095, merged to staging as c1283b1f29. Verified that the reviewed head is an ancestor of origin/staging. Check runs and statuses are paginated and selected by the newest ID while preserving the required App identity; current failures still block. API/identity uncertainty is reported as evidence uncertainty rather than a failed check. Ten deterministic cases, stream-progress regression, pnpm check, and substantive local review completed; all eight required hosted checks passed and final-head Dottore review ended Viable.

<!-- gh-comment-id:6347142380 --> @SpicyMarinara commented on GitHub (Oct 22, 2026): Resolved by #8095, merged to staging as c1283b1f29c0e765311647c0d5830832a3eb4792. Verified that the reviewed head is an ancestor of origin/staging. Check runs and statuses are paginated and selected by the newest ID while preserving the required App identity; current failures still block. API/identity uncertainty is reported as evidence uncertainty rather than a failed check. Ten deterministic cases, stream-progress regression, pnpm check, and substantive local review completed; all eight required hosted checks passed and final-head Dottore review ended Viable.
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#7553
No description provided.