Skip to content

[3591 by Claude Opus 5.5] PR status: with several reviews of the same head, an open blocker or the lowest score decides, not the review posted last - #3651

Merged
integry merged 1 commit into
3589-epic-0-9-y3wfrom
3591/claude-opus-5-5-pr-status-with-several-re-20261117-0653-lnh
Nov 17, 2026
Merged

integry merged 1 commit into
3589-epic-0-9-y3wfrom
3591/claude-opus-5-5-pr-status-with-several-re-20261117-0653-lnh

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3591

Branch: 3591/claude-opus-5-5-pr-status-with-several-re-20261117-0653-lnh
Commits: ✅ Changes committed (40f3cbc)


AI Processing Completed

Execution Details:

Summary:
When one /review asks several models, the status now uses all the reviews of that round together instead of the one posted last. In the #3420 case (6/10 with blocker F1, then 8/10), the PR now reads ⚠️ Needs you · review below goal …/10 · review 6/10 and the title shows ⚠️➅, whichever review posts first.

What changed

  • Grouping the round (packages/core/src/services/reviewScoreStore.ts): a new latestReviewRound() helper takes every score row the newest review job wrote for the same head and Ultrafix cycle. It returns the lowest score and the total blocker count. A later review of a newer head is a different job, so it replaces the round as before.
  • Status (pullRequestStatusFacts.ts, pullRequestStatus.ts, pullRequestStatusBlock.ts):
    • The shown score is the round's lowest.
    • Below the goal, the reason is still review_below_goal.
    • I added one thing the issue didn't ask for: a round that meets the goal but has a blocker from any reviewer now gets a new reason, review_blockers, shown as "review has open blockers". Without it such a PR would show ready.
    • The title takes the same detail.reviewScore as the body line, so the digit and the line always agree.
  • Readiness gate (pullRequestReadinessGates.ts): summarizeReview uses the same helper, so the readiness API agrees with the status.
  • Ultrafix's own goal check (src/jobs/reviewScorePersistence.ts, src/jobs/reviewCommentGatherer.ts): a multi-model job now reaches the goal only if every reviewer meets it with no blockers. For a known result set the loop's score is the lowest reviewer's; a member with no score leaves the set unscored.

Behaviour change in Ultrafix: a cycle where one model scores 9 and another 7 with goal 8 used to pass if the 9 was posted last. It now fails. I updated two expectations in test/reviewScorePersistence.test.ts that had pinned the old "newest review decides" rule.

Tests

  • New regression tests cover both posting orders:
    • packages/core/test/pullRequestStatusTitle.test.ts runs the real sync against SQLite and checks both the body line and the title.
    • Also packages/core/test/pullRequestReadiness.test.ts and test/reviewCommentGatherer.test.ts.
  • With the grouping switched back to "last row only", 4 of the new title tests fail.
  • All the suites I ran pass, including the status, sync, epic, readiness, persistence, gatherer and the Ultrafix suites. tsc and the zero-warning ESLint gates are clean on the changed files.

There are no previews: the change is only in the PR status text and title, not in a screen the project renders.

Acceptance criteria

  • AC1: met — latestReviewRound in packages/core/src/services/reviewScoreStore.ts and reviewBelowGoal in pullRequestStatus.ts; test "a round scored 6 with a blocker and 8 needs you at 6…" (both orders) in packages/core/test/pullRequestStatusTitle.test.ts, plus packages/core/test/pullRequestReadiness.test.ts
  • AC2: met — test "a round scored 8 and 9 with no blocker is ready at 8…" (both orders) in packages/core/test/pullRequestStatusTitle.test.ts; readiness goal_reached at score 8 in packages/core/test/pullRequestReadiness.test.ts
  • AC3: met — test "a later single review of a newer head replaces the round" in packages/core/test/pullRequestStatusTitle.test.ts, plus the newer-head case in packages/core/test/pullRequestReadiness.test.ts
  • AC4: met — the title slot (pullRequestStatusTitle.ts, detail.reviewScore) and the body line read the same round score; every new title test asserts both the line and the title digit
  • AC5: met — every new case runs once per posting order: the for (const order …) loops in pullRequestStatusTitle.test.ts and test/reviewCommentGatherer.test.ts, and both reviews orders in pullRequestReadiness.test.ts

Review digest

Acceptance criteria (5 of 5 met, as stated by the agent)

  • ✅ AC1 (met): Two reviews of the same round with scores 6 (one blocker) and 8: state `needs_attention`, shown score 6, whatever the posting order. — `latestReviewRound` in `packages/core/src/services/reviewScoreStore.ts` and `reviewBelowGoal` in `pullRequestStatus.ts`; test "a round scored 6 with a blocker and 8 needs you at 6…" (both orders) in `packages/core/test/pullRequestStatusTitle.test.ts`, plus `packages/core/test/pullRequestReadiness.t…
  • ✅ AC2 (met): Two reviews 8 and 9 with no blockers: `ready`, shown score 8. — test "a round scored 8 and 9 with no blocker is ready at 8…" (both orders) in `packages/core/test/pullRequestStatusTitle.test.ts`; readiness `goal_reached` at score 8 in `packages/core/test/pullRequestReadiness.test.ts`
  • ✅ AC3 (met): A later single review of a newer head replaces the round as today. — test "a later single review of a newer head replaces the round" in `packages/core/test/pullRequestStatusTitle.test.ts`, plus the newer-head case in `packages/core/test/pullRequestReadiness.test.ts`
  • ✅ AC4 (met): The title slot digit and the body line agree. — the title slot (`pullRequestStatusTitle.ts`, `detail.reviewScore`) and the body line read the same round score; every new title test asserts both the line and the title digit
  • ✅ AC5 (met): Regression tests cover both posting orders. — every new case runs once per posting order: the `for (const order …)` loops in `pullRequestStatusTitle.test.ts` and `test/reviewCommentGatherer.test.ts`, and both reviews orders in `pullRequestReadiness.test.ts`

Risk-tiered paths

  • High risk: none
  • Normal risk (7 files)
    • packages/core/src/services/pullRequestStatus/pullRequestStatus.ts (+18/−3)
    • packages/core/src/services/pullRequestStatus/pullRequestStatusBlock.ts (+1/−0)
    • packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts (+7/−6)
    • packages/core/src/services/reviewScoreStore.ts (+43/−0)
    • packages/core/src/webhook/pullRequestReadinessGates.ts (+14/−11)
    • src/jobs/reviewCommentGatherer.ts (+12/−3)
    • src/jobs/reviewScorePersistence.ts (+9/−10)
  • Low risk (4 files)
    • packages/core/test/pullRequestReadiness.test.ts (+18/−0)
    • packages/core/test/pullRequestStatusTitle.test.ts (+58/−1)
    • test/reviewCommentGatherer.test.ts (+24/−0)
    • test/reviewScorePersistence.test.ts (+5/−5)

Validation evidence

  • No repository validation commands ran.

Diff size: 11 files changed, +209/−39 lines

Detailed Logs:

  • Conversation: 135 messages
  • Session: 9e9f49f6-9082-43fb-9809-ed65269f6d95

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3591-2026-11-17T07-03-26-453Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3591-2026-11-17T07-03-26-453Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: When one `/review` asks several models, the status now uses all the reviews of that round together instead of the one posted last. In the #3420 case (6/10 with blocker F1, then 8/10), the PR now reads...


This PR was created automatically by ProPR after processing issue #3591.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…eviews of that round together instead of the one posted last. In the #3420 case (6/10 with blocker F1, then 8/10), the PR now reads `⚠️ Needs you · review below goal …/10 · review 6/10` and the title shows `⚠️➅`, whichever review posts first.

What changed
- Grouping the round (`packages/core/src/services/reviewScoreStore.ts`): a new `latestReviewRound()` helper takes every score row the newest review job wrote for the same head and Ultrafix cycle. It returns the lowest score and the total blocker count. A later review of a newer head is a different job, so it replaces the round as before.
- Status (`pullRequestStatusFacts.ts`, `pullRequestStatus.ts`, `pullRequestStatusBlock.ts`):
  - The shown score is the round's lowest.
  - Below the goal, the reason is still `review_below_goal`.
  - I added one thing the issue didn't ask for: a round that meets the goal but has a blocker from any reviewer now gets a new reason, `review_blockers`, shown as "review has open blockers". Without it such a PR would show `ready`.
  - The title takes the same `detail.reviewScore` as the body line, so the digit and the line always agree.
- Readiness gate (`pullRequestReadinessGates.ts`): `summarizeReview` uses the same helper, so the readiness API agrees with the status.
- Ultrafix's own goal check (`src/jobs/reviewScorePersistence.ts`, `src/jobs/reviewCommentGatherer.ts`): a multi-model job now reaches the goal only if every reviewer meets it with no blockers. For a known result set the loop's score is the lowest reviewer's; a member with no score leaves the set unscored.

Behaviour change in Ultrafix: a cycle where one model scores 9 and another 7 with goal 8 used to pass if the 9 was posted last. It now fails. I updated two expectations in `test/reviewScorePersistence.test.ts` that had pinned the old "newest review decides" rule.

Tests
- New regression tests cover both posting orders:
  - `packages/core/test/pullRequestStatusTitle.test.ts` runs the real sync against SQLite and checks both the body line and the title.
  - Also `packages/core/test/pullRequestReadiness.test.ts` and `test/reviewCommentGatherer.test.ts`.
- With the grouping switched back to "last row only", 4 of the new title tests fail.
- All the suites I ran pass, including the status, sync, epic, readiness, persistence, gatherer and the Ultrafix suites. `tsc` and the zero-warning ESLint gates are clean on the changed files.

There are no previews: the change is only in the PR status text and title, not in a screen the project renders.

Acceptance criteria
- AC1: met — `latestReviewRound` in `packages/core/src/services/reviewScoreStore.ts` and `reviewBelowGoal` in `pullRequestStatus.ts`; test "a round scored 6 with a blocker and 8 needs you at 6…" (both orders) in `packages/core/test/pullRequestStatusTitle.test.ts`, plus `packages/core/test/pullRequestReadiness.test.ts`
- AC2: met — test "a round scored 8 and 9 with no blocker is ready at 8…" (both orders) in `packages/core/test/pullRequestStatusTitle.test.ts`; readiness `goal_reached` at score 8 in `packages/core/test/pullRequestReadiness.test.ts`
- AC3: met — test "a later single review of a newer head replaces the round" in `packages/core/test/pullRequestStatusTitle.test.ts`, plus the newer-head case in `packages/core/test/pullRequestReadiness.test.ts`
- AC4: met — the title slot (`pullRequestStatusTitle.ts`, `detail.reviewScore`) and the body line read the same round score; every new title test asserts both the line and the title digit
- AC5: met — every new case runs once per posting order: the `for (const order …)` loops in `pullRequestStatusTitle.test.ts` and `test/reviewCommentGatherer.test.ts`, and both reviews orders in `pullRequestReadiness.test.ts`
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=6
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 6)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR consistently applies the lowest score across a review round and preserves blockers from every reviewer. No merge-blocking defect was verified in the supplied diff and surrounding context. It is ready to merge within scope, conditional on the four pending test shards passing.

✅ Shared round calculation — Status and readiness both use latestReviewRound, grouping by task, head, and Ultrafix cycle.

✅ Consistent goal decisions — Persistence and comment gathering now require every reviewer’s score to meet the goal, eliminating dependence on posting order.

✅ Regression coverage — Added tests cover both posting orders, title/body agreement, above-goal blockers, and replacement by a newer-head review.

Review was static; no commands or tests were run.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Test round isolation boundaries

Consider direct tests for latestReviewRound covering separate tasks on the same head, separate cycles under the same task, and missing task identifiers. The implementation explicitly handles these boundaries, but the added tests primarily exercise aggregation and newer-head replacement. This is optional coverage for future regressions.

Score

The implementation meets the stated acceptance criteria with focused changes and meaningful regression tests. The supplied current-head status reports no failures, with four test shards still pending.

Score: 9/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 30s
  • Tokens: 52,582 (52,195 in / 387 out)
  • Cost: $0.43

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 17, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3591 by Claude Opus 5.5] PR status: with several reviews of the same head, an open blocker or the lowest score decides, not the review posted last ✅⑨ [3591 by Claude Opus 5.5] PR status: with several reviews of the same head, an open blocker or the lowest score decides, not the review posted last Nov 17, 2026
@integry
integry merged commit 9b093d8 into 3589-epic-0-9-y3w Nov 17, 2026
57 checks passed
@propr-dev propr-dev Bot changed the title ✅⑨ [3591 by Claude Opus 5.5] PR status: with several reviews of the same head, an open blocker or the lowest score decides, not the review posted last [3591 by Claude Opus 5.5] PR status: with several reviews of the same head, an open blocker or the lowest score decides, not the review posted last Nov 17, 2026
propr-dev Bot pushed a commit that referenced this pull request Nov 18, 2026
… checked first: upstream is still at `960f905c3`. Every check listed in the issue passes. The only code edit is the `PROPR_VERSION` constant; the rest is version metadata, the CHANGELOG, docs and the regenerated notices.

Version bump (the same files #3414 changed):
- Root `package.json`, the six `@propr` packages (api, cli, client, core, local-setup, shared) and `apps/desktop` are now 0.9.2. Their internal `^0.9.1` dependency ranges are now `^0.9.2`.
- In `package-lock.json`, the same 19 lines changed as in #3414 (9 version fields, 10 dependency ranges).
- `PROPR_VERSION` is `'0.9.2'`.
- The launcher manifest pins version, images `:0.9.2` and `git_sha` to `960f905c3…`, the same way 0.9.1 pinned its base commit.
- Left alone: the UI, docs and launcher package versions, the API compatibility date, and the vendored picomatch/braces tarballs.

CHANGELOG:
- `[Unreleased]` is now `## [0.9.2] - 2026-11-18`, with a new empty `[Unreleased]` above it and updated comparison links.
- 0.9.1 and earlier sections are byte-identical to before; I diffed them.
- I checked all 51 first-parent merges. Every entry any of them added is still present. 15 merges and 5 of the release-check epics had user-facing changes with no entry, so I added about 40 entries. These cover the review digest and acceptance criteria, PR readiness, repository events, retry lineage, blocked runs, held follow-ups in Settings and MCP, the bot-comment wording, and a number of MCP, CLI, Ultrafix and web UI fixes. Failed-attempt spend and token-outlier alerts were also missing; they came from the Cost visibility epic.
- Duplicates: there was only one picomatch entry (I added the single-pass backslash fix to it). The five separate bundled-CLI entries are now one entry describing the move from 0.9.1. One of them said "Codex stays on 0.168.0", which contradicted the final 0.169.0.
- The late changes you listed are now present and accurate:
  - The run summary picked by the summarization model (#3672).
  - One CI-failure comment per commit (#3674).
  - The bot comment wording (#3673).
  - The Automations Off/Repeat schedule.
  - The Automations search and repository filter.
  - The ❶–❿ digits. The entry still said `✅⑧`.
  - GPT-6.2 Sol and Astra, checked against the model catalog.
- I also fixed stale or inaccurate text in four existing entries. The worst was "the title emoji arrives in a later release", which is wrong in the same release that ships it.

Docs:
- I updated current-release examples in `README.md`, `apps/desktop/README.md`, `desktop-application.md`, `desktop-pairing.md` and `hosted-ui-release.md`. Historical references such as "v0.9.1 deploy failed", "tags up to v0.9.1" and the 0.9.0 screenshot folders are unchanged.
- One fix outside the version bump: `pr-status.md` called the current ❶–❿ digits the "older" style. The older style is ➀–➉.

Validation:
- `release:verify` with `EXPECTED_VERSION=0.9.2 RELEASE_TAG=v0.9.2 RELEASE_CANDIDATE=true` prints "Release metadata is consistent for v0.9.2".
- `releaseValidation`: 15/15. `orchestratorProprUrlsDrift`: 13/13. `vendoredPicomatch`: 13/13.
- Desktop tests: the release-config, release-workflow, macOS update-policy and branding, release-architecture, release-publish and nightly-native-bundle suites passed 107/107. The runtime-manifest, release-artifacts, preflight, Windows installer version and preview-release suites had 79 of 83 passing, 0 failing; the other 4 didn't run.
- `audit:runtime` and `desktop:audit:packaging` both passed.
- Typechecks passed for the root and for shared, core, api, cli, client, local-setup, propr-ui and desktop.
- Lint passed with `--max-warnings 0` on root `src/`, core, api, cli and propr-ui.
- `npm run build --prefix docs` succeeded, including after the last docs edit, and `git diff --check` is clean.
- `THIRD_PARTY_LICENSES.md` changed exactly as in #3414: the `Generated:` date and the three ProPR package versions. Regenerating it again gave a byte-identical file.

Two docs drifts I found and didn't fix:
- `agents.md` and `settings-locations.md` still use the old "Pause the schedule when scheduled runs keep producing no change" label.
- `pr-status.md` doesn't yet describe the wait for checks on a fresh head (#3631) or the "review has open blockers" reason (#3651).

There are no visual previews because nothing here changes what users see.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant