[GH-ISSUE #8237] [Issue]: Dottore Review re-raises disposed threads and reports false positives from missing context #8170

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

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

Originally assigned to: @Promansis on GitHub.

Summary

Dottore Review raises a high rate of false-positive findings, and some come back round after round. An analysis of the pooled findings since the 2026-10-18 cutover (reviewer prompt and rules.json unchanged since 39029be18) traces most of them to the harness and the review policy, not the model. The biggest pattern is a harness bug: threads a maintainer has answered or resolved keep feeding their repair contract back to the finder, so the finder judges the same disputed point again on every round (Engine#8151 x8, Engine#8153 x7).

Expected behavior

  • A thread a maintainer resolved stops influencing later rounds. A thread a maintainer answered is shown to the finder as settled, along with the reply.
  • Findings rest on code the review packet actually shows. Something outside the packet (tests on disk, repository variables, the linked issue) is treated as unknown, not as missing.
  • The severity scale in rules.json agrees with reviewer-prompt.md.
  • A confirmed verdict whose quoted evidence does not match the head is counted under coverage. It is not published as an "Unresolved Hypothesis".

Actual behavior

  • Disposed threads re-raised (pattern B, ~20 findings). produce_review carries prior_contract_state from the walkthrough header. The only way out is Dottore's own repair check marking the thread resolved. threads_to_check skips answered threads and never looks at threads resolved by hand.
  • Linked issue invisible (pattern F). pr_description fetches only the title and body, but the prompt says "the linked issue defines intent".
  • Tests listed, never shown (pattern E). TEST_PATH_RE removes tests from the bundle. Existing tests for a changed module are not mentioned at all, so findings that say "no regression covers X" are based on missing information.
  • Repository variables invisible (pattern E). Dottore asserted DOTTORE_AUTO_REVIEW was off on PRs about its own gating.
  • Stale-looking head (#105, #111). A push during a review lets the run finish on the previous head. The walkthrough reads as if it covers the current head.
  • Evidence-mismatch walk-backs. judge() downgrades these to uncertain, and agentic_review then publishes them with "The quoted evidence did not match the code."
  • Policy drift. rules.json grades "maintainability trap, or missing test" as medium and lists "missing regression tests" in review_focus. The prompt says thin proof is a pre-merge Proof Gap, not a finding.
  • Prompt patterns. It combines concerns that rest on different premises, claims reachability without naming the caller, proposes fixes that drop existing guards, flags behaviour the PR description or linked issue sets as the intended scope, and flags conventions already used unchanged in the module.

Steps to reproduce

  1. Open a PR that gets a Dottore finding.
  2. Reply to the thread with a by-design rationale, or resolve it by hand.
  3. Push a new commit so Dottore reviews again.
  4. The finder judges the same contract again and often raises it again, in the same file or a nearby one.

Environment

  • Marinara Engine version: 2.5.1 (staging at de6df1064; no Dottore changes since 3bc641c44)
  • Install type: GitHub Actions (.github/workflows/dottore-review.yml, .github/dottore-review/dottore_review.py)
  • OS + version: GitHub-hosted runner
  • Browser or app shell: n/a

Logs, screenshots, or video

Examples from the findings pool: Engine#8151 (8 re-raises of one disposed contract), Engine#8153 (7), #7954 and #7960 (repository-variable claims), #7986 (GitHub-token claims).

Additional context

Proposed fix, as one PR against staging (or two if the prompt edits need their own review round):

Harness

  • H1: Build thread dispositions (open, answered, resolved) from the existing REVIEW_THREADS_QUERY result, with no extra GraphQL call. Drop the contracts of resolved threads. Mark answered ones disposed, attach the reply, and render them under their own heading. Regression proof: scripts/regressions/dottore-thread-dispositions.regression.mjs.
  • H2: Fetch closingIssuesReferences into the bundle, at most two issues, truncated.
  • H3: Add a "Tests on disk" line to the bundle: names of tests matching a changed file's stem, without contents.
  • H4 (low priority): Add a "Repository variables" section, only when a changed file is under .github/. Never include secrets.
  • H5: When PR_HEAD_SHA differs from the current headRefOid, mark the walkthrough as superseded.
  • H6: Count evidence-mismatch downgrades under Verification Coverage, not under open questions.

rules.json

  • R1: Bring the medium/low severity wording and review_focus in line with the prompt.
  • R2: Add a docs-churn rule: don't ask for a clarification to be repeated elsewhere, and group prose nits into one low finding per file.

reviewer-prompt.md

  • P1 to P7: Combine only concerns that share a premise. Name the caller when claiming reachability. Treat anything outside the packet as unknown. Keep existing guards when proposing a fix. Let the description and linked issue set the scope. Treat disposed contracts as settled. Make findings on heuristics name a concrete input.
  • Maintainer decision needed (P7): Should a ponytail: note that names the specific input count as a decision for that input? The current checker text says no deferral is a decision. The proposal: a note that names the input settles that input, and a general ceiling still leaves the candidate standing.

Follow-up: After the Engine PR merges, a Marinara-Agents PR against its staging applies the R1 rules.json edit and bumps the wrapper's pinned SHA in the same change.

Out of scope: cancel-in-progress on the review workflow, loading test contents into the bundle, and the Agents dispatcher copies.

No open issue or PR covers Dottore false positives.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8237 Originally assigned to: @Promansis on GitHub. ## Summary Dottore Review raises a high rate of false-positive findings, and some come back round after round. An analysis of the pooled findings since the 2026-10-18 cutover (reviewer prompt and `rules.json` unchanged since 39029be18) traces most of them to the harness and the review policy, not the model. The biggest pattern is a harness bug: threads a maintainer has answered or resolved keep feeding their repair contract back to the finder, so the finder judges the same disputed point again on every round (Engine#8151 x8, Engine#8153 x7). ## Expected behavior - A thread a maintainer resolved stops influencing later rounds. A thread a maintainer answered is shown to the finder as settled, along with the reply. - Findings rest on code the review packet actually shows. Something outside the packet (tests on disk, repository variables, the linked issue) is treated as unknown, not as missing. - The severity scale in `rules.json` agrees with `reviewer-prompt.md`. - A confirmed verdict whose quoted evidence does not match the head is counted under coverage. It is not published as an "Unresolved Hypothesis". ## Actual behavior - **Disposed threads re-raised (pattern B, ~20 findings).** `produce_review` carries `prior_contract_state` from the walkthrough header. The only way out is Dottore's own repair check marking the thread `resolved`. `threads_to_check` skips answered threads and never looks at threads resolved by hand. - **Linked issue invisible (pattern F).** `pr_description` fetches only the title and body, but the prompt says "the linked issue defines intent". - **Tests listed, never shown (pattern E).** `TEST_PATH_RE` removes tests from the bundle. Existing tests for a changed module are not mentioned at all, so findings that say "no regression covers X" are based on missing information. - **Repository variables invisible (pattern E).** Dottore asserted `DOTTORE_AUTO_REVIEW` was off on PRs about its own gating. - **Stale-looking head (#105, #111).** A push during a review lets the run finish on the previous head. The walkthrough reads as if it covers the current head. - **Evidence-mismatch walk-backs.** `judge()` downgrades these to `uncertain`, and `agentic_review` then publishes them with "The quoted evidence did not match the code." - **Policy drift.** `rules.json` grades "maintainability trap, or missing test" as medium and lists "missing regression tests" in `review_focus`. The prompt says thin proof is a pre-merge Proof Gap, not a finding. - **Prompt patterns.** It combines concerns that rest on different premises, claims reachability without naming the caller, proposes fixes that drop existing guards, flags behaviour the PR description or linked issue sets as the intended scope, and flags conventions already used unchanged in the module. ## Steps to reproduce 1. Open a PR that gets a Dottore finding. 2. Reply to the thread with a by-design rationale, or resolve it by hand. 3. Push a new commit so Dottore reviews again. 4. The finder judges the same contract again and often raises it again, in the same file or a nearby one. ## Environment - Marinara Engine version: 2.5.1 (`staging` at de6df1064; no Dottore changes since 3bc641c44) - Install type: GitHub Actions (`.github/workflows/dottore-review.yml`, `.github/dottore-review/dottore_review.py`) - OS + version: GitHub-hosted runner - Browser or app shell: n/a ## Logs, screenshots, or video Examples from the findings pool: Engine#8151 (8 re-raises of one disposed contract), Engine#8153 (7), #7954 and #7960 (repository-variable claims), #7986 (GitHub-token claims). ## Additional context Proposed fix, as one PR against `staging` (or two if the prompt edits need their own review round): **Harness** - H1: Build thread dispositions (open, answered, resolved) from the existing `REVIEW_THREADS_QUERY` result, with no extra GraphQL call. Drop the contracts of resolved threads. Mark answered ones `disposed`, attach the reply, and render them under their own heading. Regression proof: `scripts/regressions/dottore-thread-dispositions.regression.mjs`. - H2: Fetch `closingIssuesReferences` into the bundle, at most two issues, truncated. - H3: Add a "Tests on disk" line to the bundle: names of tests matching a changed file's stem, without contents. - H4 (low priority): Add a "Repository variables" section, only when a changed file is under `.github/`. Never include secrets. - H5: When `PR_HEAD_SHA` differs from the current `headRefOid`, mark the walkthrough as superseded. - H6: Count evidence-mismatch downgrades under Verification Coverage, not under open questions. **`rules.json`** - R1: Bring the medium/low severity wording and `review_focus` in line with the prompt. - R2: Add a docs-churn rule: don't ask for a clarification to be repeated elsewhere, and group prose nits into one low finding per file. **`reviewer-prompt.md`** - P1 to P7: Combine only concerns that share a premise. Name the caller when claiming reachability. Treat anything outside the packet as unknown. Keep existing guards when proposing a fix. Let the description and linked issue set the scope. Treat disposed contracts as settled. Make findings on heuristics name a concrete input. - **Maintainer decision needed (P7):** Should a `ponytail:` note that names the specific input count as a decision for that input? The current checker text says no deferral is a decision. The proposal: a note that names the input settles that input, and a general ceiling still leaves the candidate standing. **Follow-up:** After the Engine PR merges, a Marinara-Agents PR against its `staging` applies the R1 `rules.json` edit and bumps the wrapper's pinned SHA in the same change. **Out of scope:** `cancel-in-progress` on the review workflow, loading test contents into the bundle, and the Agents dispatcher copies. No open issue or PR covers Dottore false positives. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-25 04:03:12 +07:00
Author
Owner

@Promansis commented on GitHub (Oct 24, 2026):

P7 decision: option B (a note that names the input settles that input).

A ponytail: note that names the specific failing input counts as a decision for that input, and the checker rejects a candidate that rests only on that input. A general ceiling or upgrade path that names no input still leaves the candidate standing.

Two limits:

  • The note must name the input that actually fails. A bug on any other input still stands.
  • A note doesn't cover inputs that this PR newly sends to that code.

Planned replacement for the last sentence of the rejected bullet in reviewer-prompt.md (checker step 3):

A ponytail: note that names the failing input records a decision for that input, unless this PR sends inputs to that code that the note doesn't name. A general ceiling or upgrade path without a named input leaves the candidate standing.

Why: AGENTS.md asks contributors to name the known ceiling in ponytail: notes, and the checker already treats "a decision that names the input" as settling it. B removes the one exception that contradicts both, without letting a vague note hide a real defect.

<!-- gh-comment-id:6380368957 --> @Promansis commented on GitHub (Oct 24, 2026): **P7 decision: option B (a note that names the input settles that input).** A `ponytail:` note that names the specific failing input counts as a decision for that input, and the checker rejects a candidate that rests only on that input. A general ceiling or upgrade path that names no input still leaves the candidate standing. Two limits: - The note must name the input that actually fails. A bug on any other input still stands. - A note doesn't cover inputs that this PR newly sends to that code. Planned replacement for the last sentence of the `rejected` bullet in `reviewer-prompt.md` (checker step 3): > A `ponytail:` note that names the failing input records a decision for that input, unless this PR sends inputs to that code that the note doesn't name. A general ceiling or upgrade path without a named input leaves the candidate standing. Why: `AGENTS.md` asks contributors to name the known ceiling in `ponytail:` notes, and the checker already treats "a decision that names the input" as settling it. B removes the one exception that contradicts both, without letting a vague note hide a real defect.
Author
Owner

@Promansis commented on GitHub (Oct 24, 2026):

@Promansis is working on this in draft #8238.

<!-- gh-comment-id:6380413197 --> @Promansis commented on GitHub (Oct 24, 2026): @Promansis is working on this in draft #8238.
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#8170
No description provided.