Skip to content

Tolerate prior-finding dispositions for externally resolved findings - #11

Merged
Troublor merged 1 commit into
mainfrom
william/fix/prior-finding-already-resolved
Aug 4, 2026
Merged

Tolerate prior-finding dispositions for externally resolved findings#11
Troublor merged 1 commit into
mainfrom
william/fix/prior-finding-already-resolved

Conversation

@Troublor

@Troublor Troublor commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

A human resolving a bot review thread while a review round is queued or running fails the entire pr-review check with PRIOR_FINDING_INVALID, discarding a clean review pass. Hit live on megaeth-labs/specification#3, reproduced on rerun.

Sequence:

  1. prepare calls sync_manifest_threads, sees isResolved: true on the thread, and sets the finding to status: resolved / thread_resolution: confirmed.
  2. The full manifest — resolved findings included — is embedded in review-input.json, so the model still sees the finding, its thread, and the reply. It correctly assesses it as fixed and returns disposition: resolved.
  3. compile built expected_prior_ids from open findings only and raised PRIOR_FINDING_INVALID for anything outside that set.

The model agreed with the pipeline's own state and the pipeline failed the run for saying so.

Changes

  • Validate prior_findings IDs against manifest membership rather than open status, so only a genuinely unknown (e.g. hallucinated) ID is a contract violation. Error text updated to match.
  • For a finding already resolved with thread_resolution: confirmed, ignore the model's disposition and log it. A concordant resolved becomes a no-op, and an open cannot reopen a thread a reviewer deliberately closed — external human resolution stays authoritative.
  • Prompt (action.yml): state that dispositions are expected only for findings whose status is open, and that already-closed findings appear as context so they are not re-raised. Keeps the tolerance path a backstop rather than the normal case.
  • Tests: concordant disposition tolerated; open cannot reopen an externally-resolved finding; unknown ID still fails. Existing unknown-ID test updated for the new message. 85 tests pass.

prior_questions validation is unchanged — it has no equivalent external-resolution path.

Notes

__pycache__/*.pyc for this action are tracked in the repo and get dirtied by any local test run; I reverted that churn out of this commit. Worth removing and gitignoring separately.

A reviewer who resolves a bot thread on GitHub while a review round is
queued or running makes prepare's sync_manifest_threads close that
finding, but the manifest handed to the model still contains it. The
model reads the thread, agrees it is fixed, and returns a `resolved`
disposition -- and compile rejected the whole round because the ID was
not in the open set, discarding an otherwise clean review pass.

Validate prior_findings IDs against manifest membership rather than open
status, so only a genuinely unknown ID is a contract violation. For a
finding already resolved with `thread_resolution: confirmed`, ignore the
model's disposition entirely: a concordant `resolved` is a no-op, and an
`open` must not reopen a thread a human deliberately closed. Tell the
model in the prompt to disposition only findings whose status is `open`,
so the tolerance path is a backstop rather than the normal case.
@Troublor
Troublor merged commit a1d26a3 into main Aug 4, 2026
1 check passed
@Troublor
Troublor deleted the william/fix/prior-finding-already-resolved branch August 4, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant