Skip to content

[3529 by Claude Opus 5.5] Compute one PR status and show it live at the top of the PR body - #3535

Merged
integry merged 15 commits into
3529-epic-pr-status-cuifrom
3529/claude-opus-5-5-compute-one-pr-status-and-20261113-1020-mgy
Nov 13, 2026
Merged

integry merged 15 commits into
3529-epic-pr-status-cuifrom
3529/claude-opus-5-5-compute-one-pr-status-and-20261113-1020-mgy

Conversation

@propr-dev

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

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3529

Branch: 3529/claude-opus-5-5-compute-one-pr-status-and-20261113-1020-mgy
Commits: ✅ Changes committed (dc473b8)


AI Processing Completed

Execution Details:

Summary:
I've implemented issue #3529. The affected suites pass (137 files); typecheck is clean in every workspace and lint is clean on the changed files.

One status computation (packages/core/src/services/pullRequestStatus/)

  • computePullRequestStatus(facts) is a pure function that returns state (working, needs_attention, ready, none) and detail: activity, Ultrafix cycle and maximum, review score, checks passed/failed/pending, the reason a PR needs you, and epic issues merged/total.
  • A loader gathers the facts: ProPR tasks and their latest states, queued jobs, Ultrafix loop and CI-wait state from Redis, blocking checks on the head (respecting nonBlockingChecks), mergeability, the latest review score, the instance rating goal and epic progress.
  • ready is never reported from the review score alone. Goal reached with checks pending is working; with a failed check it is needs_attention. Checks that can't be read never count as ready.
  • The PR body block and the three MCP tools both use this function.

The prStatusDisplay setting (off by default, applies to every branch of a repository)

  • It is wired through the config type, API validation, MCP update_repository_configuration / get_repository_configuration, the settings catalog, the CLI (--pr-status on|off on repo add and repo toggle), a UI toggle under Automation, and the regenerated settings docs.

The live block in the PR body

  • The block sits between <!-- propr:pr-status --> markers; only text between them is ever rewritten. New issue PRs are created with it already in the body (room is reserved in the body length budget). It is removed when the PR is merged or closed, or on the next change after the setting is turned off.
  • Updates are triggered by task state changes (follow-up, review, conflict resolution, implementation), Ultrafix state and CI-wait writes, recorded review scores, and PR and check-run webhooks.
  • Bursts of changes are merged into one update, and updates for the same PR are serialized with an in-process chain plus a Redis lock.
  • No PATCH is sent when only the "updated HH:MM" time would change.
  • A failed update is logged and never fails the task, review or loop that triggered it.
  • The other body writers (visual preview publication, upload-failure rewrite, goal PR completion, goal previews, epic body update) now all go through one helper that re-reads the current body and keeps the block.
  • ProPR's own body edits come back as edited webhooks; these are recognised and ignored before any handler runs.

MCP: get_pull_request, list_pull_requests and get_work_overview now return proprStatus. The two list tools compute it for at most 20 open PRs per call to bound GitHub traffic: the rest read null and the response sets statusTruncated.

Behaviour to know before merging

  • Status updates only run in processes that turn them on: the worker, the daemon's webhook handler, and the API when it receives webhooks directly. That keeps tests and library use free of side effects.
  • If the setting is turned off, the block is only removed from PRs where ProPR recorded writing it, via a Redis marker with a 180-day TTL. A block written before a Redis reset would stay until edited by hand.
  • A PR whose checks are pending reads working even when a person, not ProPR, made the push. I simplified "after ProPR's last push" to "pending on the current head".

Tests added:

  • Every row of the state table, including the four required cases.
  • A full transition sequence: created → follow-up → review → score → Ultrafix cycle → CI wait → loop end. A human edit, preview section and continuation marker stay byte-for-byte unchanged throughout.
  • No PATCH when only the time changes; removal on merge/close and when the setting is turned off.
  • Visual preview publication keeps the block; the status-only edited webhook is ignored.
  • A new issue PR opens with the block when the setting is on.
  • API, MCP, CLI and UI tests, plus a Playwright e2e test for the toggle.

Test environment: several suites failed only because /tmp/git-processor is read-only in this container; they pass with writable clone paths set.

Docs: a new docs/docs/features/pr-status.md page, plus rows in mcp.md and propr-cli.md, and a CHANGELOG entry. I captured a preview of the new toggle in Repositories → Automation.

Detailed Logs:

  • Conversation: 72 messages
  • Session: d6635a7d-5a9d-4147-b458-2dbb5fd625ac

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3529-2026-11-13T11-20-16-470Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3529-2026-11-13T11-20-16-470Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: I've implemented issue #3529. The affected suites pass (137 files); typecheck is clean in every workspace and lint is clean on the changed files.

**One status computation** (`packages/core/src/servic...


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


💡 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!


Visual preview

PR status setting in repository Automation

PR status setting in repository Automation

Repositories → integry/propr → Settings → Automation with the new "Show the ProPR status in the pull request" toggle turned on (desktop, 1440×900, API stubbed).

Connect sign-in required. Original retained until 2027-02-11T11:20:22.281Z.

View the full-resolution original in ProPR Connect

…ypecheck is clean in every workspace and lint is clean on the changed files.

One status computation (`packages/core/src/services/pullRequestStatus/`)
- `computePullRequestStatus(facts)` is a pure function that returns `state` (`working`, `needs_attention`, `ready`, `none`) and `detail`: activity, Ultrafix cycle and maximum, review score, checks passed/failed/pending, the reason a PR needs you, and epic issues merged/total.
- A loader gathers the facts: ProPR tasks and their latest states, queued jobs, Ultrafix loop and CI-wait state from Redis, blocking checks on the head (respecting `nonBlockingChecks`), mergeability, the latest review score, the instance rating goal and epic progress.
- `ready` is never reported from the review score alone. Goal reached with checks pending is `working`; with a failed check it is `needs_attention`. Checks that can't be read never count as ready.
- The PR body block and the three MCP tools both use this function.

The `prStatusDisplay` setting (off by default, applies to every branch of a repository)
- It is wired through the config type, API validation, MCP `update_repository_configuration` / `get_repository_configuration`, the settings catalog, the CLI (`--pr-status on|off` on `repo add` and `repo toggle`), a UI toggle under Automation, and the regenerated settings docs.

The live block in the PR body
- The block sits between `<!-- propr:pr-status -->` markers; only text between them is ever rewritten. New issue PRs are created with it already in the body (room is reserved in the body length budget). It is removed when the PR is merged or closed, or on the next change after the setting is turned off.
- Updates are triggered by task state changes (follow-up, review, conflict resolution, implementation), Ultrafix state and CI-wait writes, recorded review scores, and PR and check-run webhooks.
- Bursts of changes are merged into one update, and updates for the same PR are serialized with an in-process chain plus a Redis lock.
- No PATCH is sent when only the "updated HH:MM" time would change.
- A failed update is logged and never fails the task, review or loop that triggered it.
- The other body writers (visual preview publication, upload-failure rewrite, goal PR completion, goal previews, epic body update) now all go through one helper that re-reads the current body and keeps the block.
- ProPR's own body edits come back as `edited` webhooks; these are recognised and ignored before any handler runs.

MCP: `get_pull_request`, `list_pull_requests` and `get_work_overview` now return `proprStatus`. The two list tools compute it for at most 20 open PRs per call to bound GitHub traffic: the rest read `null` and the response sets `statusTruncated`.

Behaviour to know before merging
- Status updates only run in processes that turn them on: the worker, the daemon's webhook handler, and the API when it receives webhooks directly. That keeps tests and library use free of side effects.
- If the setting is turned off, the block is only removed from PRs where ProPR recorded writing it, via a Redis marker with a 180-day TTL. A block written before a Redis reset would stay until edited by hand.
- A PR whose checks are pending reads `working` even when a person, not ProPR, made the push. I simplified "after ProPR's last push" to "pending on the current head".

Tests added:
- Every row of the state table, including the four required cases.
- A full transition sequence: created → follow-up → review → score → Ultrafix cycle → CI wait → loop end. A human edit, preview section and continuation marker stay byte-for-byte unchanged throughout.
- No PATCH when only the time changes; removal on merge/close and when the setting is turned off.
- Visual preview publication keeps the block; the status-only `edited` webhook is ignored.
- A new issue PR opens with the block when the setting is on.
- API, MCP, CLI and UI tests, plus a Playwright e2e test for the toggle.

Test environment: several suites failed only because `/tmp/git-processor` is read-only in this container; they pass with writable clone paths set.

Docs: a new `docs/docs/features/pr-status.md` page, plus rows in `mcp.md` and `propr-cli.md`, and a CHANGELOG entry. I captured a preview of the new toggle in Repositories → Automation.
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

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

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

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

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

First action: /review

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

@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR introduces a shared status computation, connects it to MCP and PR bodies, and adds repository-wide configuration. It needs changes before merge: incomplete check reads can report readiness, PR ownership is inferred too broadly, and some status updates and cleanup paths are missed.

✅ Shared computation — Body rendering and MCP reads use the same pure status function, with explicit tests for pending CI, failed checks, and Ultrafix transitions.

✅ Configuration consistency — API preservation logic and UI toggles apply the setting across branch entries and preserve it when older clients omit the field.

✅ Controlled body updates — Status-only changes preserve surrounding body content, and timestamp-only changes avoid unnecessary PATCH requests.

This review is a static trace of the supplied code; no commands or tests were run. The supplied current-head checks show no failures and one pending check.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Truncated checks can report ready

  • Required behavior: Readiness must require complete evidence that blocking checks on the current head have finished successfully.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, loadCheckRuns and loadPullRequestStatusChecks.

    1. An open ProPR PR has no active work, an acceptable review score, and more than 300 check runs.
    2. The first three pages contain passing runs; a later page contains a failed or pending blocking run.
    3. loadCheckRuns stops after three pages and returns the partial array without recording truncation.
    4. loadPullRequestStatusChecks sets complete: true because both requests fulfilled. The computation consequently returns ready, and both MCP and the body can display it.

    The pagination cap bounds traffic but does not establish completeness. Existing tests use small check sets and do not cover this boundary. Verification provenance: static trace: the page cap discards total_count completeness information before calculating complete.

  • Minimum fix: Return completeness alongside collected runs and set checks.complete to false whenever the page budget leaves runs unread, or finish pagination before asserting completeness.

F2: 🔴 Reviewing a human PR changes its ownership classification

  • Required behavior: The status block applies to PRs ProPR created; other PRs must return none.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, loadPullRequestStatusTasks and isProprPullRequest.

    1. A person creates a PR in a repository with prStatusDisplay enabled.
    2. ProPR performs a review or follow-up on that PR, producing a review or pr-comment task associated through its issue number.
    3. loadPullRequestStatusTasks includes that task. isProprPullRequest then returns true solely because tasks.length > 0.
    4. A task transition schedules synchronization, which inserts a ProPR status block into the human-created PR. MCP also returns a working, attention, or ready state instead of none.

    Task association proves ProPR worked on the PR, not that it created it. The existing non-ProPR test has no tasks, so it does not cover this sequence. Verification provenance: static trace: the task query explicitly includes review/follow-up tasks, and the ownership predicate accepts every nonempty result.

  • Minimum fix: Establish creation provenance separately from activity, using an implementation task that produced the PR or the corresponding plan/goal/epic creation record. Keep review and follow-up tasks available for activity without treating them as creation evidence.

F3: 🔴 Commit-status transitions do not refresh the body

  • Required behavior: The live body must follow changes to the blocking checks used by the shared computation.

  • Evidence: packages/core/src/webhook/pullRequestStatusWebhook.ts, signalPullRequestStatusFromWebhook; packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, loadPullRequestStatusChecks.

    1. An otherwise idle ProPR PR uses a legacy commit-status context for CI.
    2. Synchronization reads that context as pending and writes “Waiting for CI.”
    3. CI changes the context to success or failure through a commit-status update.
    4. The signal function handles only pull-request, check-run, and check-suite payloads. A status event schedules nothing, leaving the body pending until an unrelated supported transition occurs, while a fresh MCP read returns the changed state.

    Debouncing only processes signals already received; there is no periodic reconciliation in the new scheduler to recover this missing signal. Verification provenance: static trace: legacy statuses explicitly contribute to the loaded facts, but their event type has no signaling branch.

  • Minimum fix: Handle commit-status updates by resolving affected open PRs for the reported SHA and scheduling their status synchronization, or provide equivalent bounded reconciliation.

F4: 🔴 Initially created blocks can escape cleanup

  • Required behavior: Turning the setting off must remove an existing block on the next PR transition.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts, initialPullRequestStatusBlock and syncPullRequestStatus; src/jobs/issueJobHelpers.ts, createPullRequest.

    1. An issue PR is created with the initial “Implementing” block while its implementation task is still active.
    2. A synchronization sees the same status. The unchanged branch returns without setting the Redis block marker; creation itself also never records that marker.
    3. The repository setting is disabled before any synchronization changes the rendered block.
    4. The task completes or the PR closes. Synchronization finds the setting disabled and no marker, so it returns skipped before reading the PR. The initial block remains.

    This requires neither a Redis reset nor marker expiry. The lock cannot help because the marker-based early return happens before body inspection. Existing cleanup tests first introduce the block through a successful synchronization PATCH, which creates the marker. Verification provenance: static trace: only the changed-body PATCH path records block ownership.

  • Minimum fix: Record ownership after successful PR creation with an initial block, and establish or refresh the marker when synchronization confirms an existing desired block without PATCHing.

Suggestions

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

S1: 🟢 Share queue reads across lists

attachPullRequestStatuses can invoke a full waiting/delayed/prioritized queue scan separately for each of 20 PRs. Reading the queue once per list call and grouping jobs by PR would reduce repeated Redis traffic. This is an optional efficiency improvement; the repeated reads alone do not demonstrate incorrect results.

Score

The shared design and focused tests provide a solid foundation, but four correctness gaps remain in readiness, ownership, freshness, and cleanup. Current checks are encouraging but do not cover these sequences.

Score: 5/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 8s
  • Tokens: 98,159 (96,334 in / 1,825 out)
  • Cost: $0.95

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 F1 F2 F3 F4 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 021591f

Addressed 1 AI review comment (IDs: 6851866088)

Addressed findings F1, F2, F3, F4

Summary of Changes

I fixed all four findings (F1–F4) and added a regression test for each. I ran every new test against the original code: each one fails there and passes with the fix. The status suites, the other webhook/PR-creation suites I re-ran, typecheck and lint are all clean.

F1 – Too many checks could still report ready. loadCheckRuns now also says whether it read every check run. If the three-page limit (300 runs) leaves some unread, the checks count as incomplete, so the PR shows "needs attention · checks could not be read" instead of ready. Legacy commit statuses didn't have this problem: when that response is cut short, the existing code already falls back to the overall commit state. The test puts a failing run on page 4. A second check confirms that exactly 300 runs still counts as complete.

F2 – Reviewing a human's PR made it look like ProPR's. Having tasks on a PR no longer proves ProPR created it. Creation is now proven only by one of these:

  • an implementation task (type issue, implementation or empty) whose pr_number is that PR.
  • a plan issue, a goal, or an epic branch.

Review, follow-up and conflict tasks still feed the activity shown in the status. They just don't mark the PR as ProPR's. The test runs review, follow-up and merge-conflict tasks on a human PR: it stays none and nothing is written to its body.

F3 – Commit status changes didn't refresh the body. A status webhook now looks up the open PRs for that commit and refreshes their status. Repositories with the setting off cost no GitHub lookup. A burst of status events for the same commit triggers only one lookup, and the per-PR refreshes are still merged and serialized as before. The test goes from "Waiting for CI" to "Ready" through this path.

F4 – The block a PR was created with could survive turning the setting off. ProPR now records the block in two places:

  • right after a new issue PR is created with the block.
  • whenever a sync finds the block already up to date and skips the PATCH.

Turning the setting off then removes that block on the PR's next change. Tests cover both, plus the worker side: PR creation records the marker, and doesn't when the setting is off.

I also added three lines to docs/docs/features/pr-status.md: someone else's PR stays none, the 300-check limit, and commit statuses as a trigger. There are no visual previews: the change only affects PR body text and server behaviour.

Separate issues I found but didn't fix (outside the four findings):

  • A check_run event that lists no PRs (typical for fork PRs) triggers no refresh. ProPR's own PRs come from branches in the repository, so this shouldn't affect them.
  • A PR becoming unmergeable because its base branch moved sends no event for that PR, so the body can lag until the PR's next change.

🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 10m 48s
  • Tokens: 3,696,980 (3,669,876 in / 27,104 out)
  • Cost: $1.81
  • Subscription usage: Weekly +1%, Fable +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…st for each. I ran every new test against the original code: each one fails there and passes with the fix. The status suites, the other webhook/PR-creation suites I re-ran, typecheck and lint are all clean.

I fixed all four findings (F1–F4) and added a regression test for each. I ran every new test against the original code: each one fails there and passes with the fix. The status suites, the other webhook/PR-creation suites I re-ran, typecheck and lint are all clean.

**F1 – Too many checks could still report ready.** `loadCheckRuns` now also says whether it read every check run. If the three-page limit (300 runs) leaves some unread, the checks count as incomplete, so the PR shows "needs attention · checks could not be read" instead of `ready`. Legacy commit statuses didn't have this problem: when that response is cut short, the existing code already falls back to the overall commit state. The test puts a failing run on page 4. A second check confirms that exactly 300 runs still counts as complete.

**F2 – Reviewing a human's PR made it look like ProPR's.** Having tasks on a PR no longer proves ProPR created it. Creation is now proven only by one of these:
- an implementation task (type `issue`, `implementation` or empty) whose `pr_number` is that PR.
- a plan issue, a goal, or an epic branch.

Review, follow-up and conflict tasks still feed the activity shown in the status. They just don't mark the PR as ProPR's. The test runs review, follow-up and merge-conflict tasks on a human PR: it stays `none` and nothing is written to its body.

**F3 – Commit status changes didn't refresh the body.** A `status` webhook now looks up the open PRs for that commit and refreshes their status. Repositories with the setting off cost no GitHub lookup. A burst of status events for the same commit triggers only one lookup, and the per-PR refreshes are still merged and serialized as before. The test goes from "Waiting for CI" to "Ready" through this path.

**F4 – The block a PR was created with could survive turning the setting off.** ProPR now records the block in two places:
- right after a new issue PR is created with the block.
- whenever a sync finds the block already up to date and skips the PATCH.

Turning the setting off then removes that block on the PR's next change. Tests cover both, plus the worker side: PR creation records the marker, and doesn't when the setting is off.

I also added three lines to `docs/docs/features/pr-status.md`: someone else's PR stays `none`, the 300-check limit, and commit statuses as a trigger. There are no visual previews: the change only affects PR body text and server behaviour.

**Separate issues I found but didn't fix (outside the four findings):**
- A `check_run` event that lists no PRs (typical for fork PRs) triggers no refresh. ProPR's own PRs come from branches in the repository, so this shouldn't affect them.
- A PR becoming unmergeable because its base branch moved sends no event for that PR, so the body can lag until the PR's next change.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

integry commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Change of scope for the setting. The live status block at the top of the PR body must not be configurable: write it on every open pull request ProPR created, in every repository, with no setting. ProPR already owns that part of the body and the edits leave no timeline entry, so there is nothing to opt out of.

Remove the prStatusDisplay gate from the body block and from everything that only exists to gate it (the "turning the setting off removes the block" path and its tests). Keep one per-repository boolean for the title slot that the next issue (#3530) adds: rename the setting to prTitleStatus, default on, described as "Show the PR state as a leading emoji in the pull request title". Keep it on every surface repository settings have (config type and loader, API validation, MCP, settings catalog, CLI, UI, generated settings docs) so #3530 only has to read it; in this PR it gates nothing yet, and the docs and the setting's description must say that it controls the title only. The status computation, the MCP status fields and all other requirements of #3529 are unchanged. Update the docs and the CHANGELOG entry to match.

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 54fe15b

Summary of Changes

The status line at the top of the PR body no longer has a setting: ProPR now writes it on every open pull request it created, in every repository. The setting is now prTitleStatus, on by default, and nothing reads it yet. The status computation and the MCP proprStatus fields are unchanged.

Body block, no gate

  • The body sync and the block a new pull request is created with no longer read any repository setting. In a process that runs status updates (the worker, the daemon, and the API when it receives webhooks), every new issue PR opens with the block. Library use and tests still write nothing.
  • I removed the code that only existed for "turning the setting off removes the block": the 180-day Redis marker, recordPullRequestStatusBlock and its call when a PR is created, and the check that skipped GitHub reads for repositories with the setting off.
  • I removed the tests for that path too. In their place, tests check that the block is written with no setting involved and that a PR created with the block is confirmed without a PATCH, then kept up to date.

prTitleStatus setting

  • It's on every surface repository settings have:
    • config type and a loader, loadRepositoryPrTitleStatus, ready for Show the PR state as one leading emoji in the PR title #3530
    • API validation and preserve logic
    • the MCP get/update tools
    • the settings catalog (repository.pr_title_status)
    • the CLI flag --pr-title-status <on|off> on repo add and repo toggle
    • a UI toggle labelled "Show the PR state as a leading emoji in the pull request title"
    • the regenerated settings docs
  • It's repository-wide and only off when an entry of the repository sets it to false; clients that leave the field out keep the stored value.
  • The catalog description, the MCP field description, the CLI help, the UI text and the docs all say it controls the title only.

Docs: the PR status page now says the body line has no setting and can't be turned off. It has a new "The title setting" section saying the setting changes nothing until the title emoji arrives. The rows in mcp.md, propr-cli.md and the CHANGELOG entry match this.

Tests: the status, PR-creation, visual-preview, CLI, UI and API settings suites pass, as does the Playwright test for the toggle. Typecheck and lint are clean on the changed files. Three API tests fail, but they fail the same way on the unchanged branch head, so they aren't caused by this change:

  • repository read failures retain tolerant defaults…: "Missing expected rejection".
  • settings catalog documentation paths exist in the bundled docs index: the docs index isn't built in this container.
  • observable MCP surface…: also needs the docs index.

I captured a new preview of the renamed toggle in Repositories → Automation, shown on by default.

Visual preview

PR title status setting in repository Automation

PR title status setting in repository Automation

Repositories → integry/propr → Settings → Automation with the renamed "Show the PR state as a leading emoji in the pull request title" toggle, on by default, stating it controls the title only (desktop, 1440×900, API stubbed).

Connect sign-in required. Original retained until 2027-02-11T12:35:45.565Z.

View the full-resolution original in ProPR Connect


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 38m 16s
  • Tokens: 7,328,329 (7,291,369 in / 36,960 out)
  • Cost: $2.84

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6852147972✓

…etting: ProPR now writes it on every open pull request it created, in every repository. The setting is now `prTitleStatus`, on by default, and nothing reads it yet. The status computation and the MCP `proprStatus` fields are unchanged.

The status line at the top of the PR body no longer has a setting: ProPR now writes it on every open pull request it created, in every repository. The setting is now `prTitleStatus`, on by default, and nothing reads it yet. The status computation and the MCP `proprStatus` fields are unchanged.

**Body block, no gate**
- The body sync and the block a new pull request is created with no longer read any repository setting. In a process that runs status updates (the worker, the daemon, and the API when it receives webhooks), every new issue PR opens with the block. Library use and tests still write nothing.
- I removed the code that only existed for "turning the setting off removes the block": the 180-day Redis marker, `recordPullRequestStatusBlock` and its call when a PR is created, and the check that skipped GitHub reads for repositories with the setting off.
- I removed the tests for that path too. In their place, tests check that the block is written with no setting involved and that a PR created with the block is confirmed without a PATCH, then kept up to date.

**`prTitleStatus` setting**
- It's on every surface repository settings have:
  - config type and a loader, `loadRepositoryPrTitleStatus`, ready for #3530
  - API validation and preserve logic
  - the MCP get/update tools
  - the settings catalog (`repository.pr_title_status`)
  - the CLI flag `--pr-title-status <on|off>` on `repo add` and `repo toggle`
  - a UI toggle labelled "Show the PR state as a leading emoji in the pull request title"
  - the regenerated settings docs
- It's repository-wide and only off when an entry of the repository sets it to `false`; clients that leave the field out keep the stored value.
- The catalog description, the MCP field description, the CLI help, the UI text and the docs all say it controls the title only.

**Docs:** the PR status page now says the body line has no setting and can't be turned off. It has a new "The title setting" section saying the setting changes nothing until the title emoji arrives. The rows in `mcp.md`, `propr-cli.md` and the CHANGELOG entry match this.

**Tests:** the status, PR-creation, visual-preview, CLI, UI and API settings suites pass, as does the Playwright test for the toggle. Typecheck and lint are clean on the changed files. Three API tests fail, but they fail the same way on the unchanged branch head, so they aren't caused by this change:
- `repository read failures retain tolerant defaults…`: "Missing expected rejection".
- `settings catalog documentation paths exist in the bundled docs index`: the docs index isn't built in this container.
- `observable MCP surface…`: also needs the docs index.

I captured a new preview of the renamed toggle in Repositories → Automation, shown on by default.

PR: #3535
Comment by: @integry (ID: 6852147972)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements the revised scope well, but needs changes before merge because unavailable facts can produce a false ready status and status growth can prevent body updates.

✅ Shared computation — The body updater and MCP readers both use computePullRequestStatus, keeping their state rules centralized.

✅ Revised setting scope — prTitleStatus defaults on across configuration surfaces and does not gate the body block.

✅ Focused coverage — Added tests exercise lifecycle transitions, body preservation, timestamp-only suppression, and incomplete check-run pagination.

The supplied current-head checks show no failures, with two checks still pending. This review is based on static inspection; no commands or tests were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F5: 🔴 Unavailable activity and review facts can report ready

  • Required behavior: The shared status must distinguish completed work from unavailable evidence; a reviewed PR below its goal or an active Ultrafix loop must not be reported as ready.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, loadPullRequestStatusFacts

    1. An open ProPR PR has completed tasks and passing checks, but its latest persisted review score is below the rating goal.
    2. latestReviewScore(...) rejects. Its catch converts that failure to null, the same value used for a PR that was never reviewed.
    3. attentionReason consequently skips the below-goal condition, and computePullRequestStatus returns ready.
    4. The same failure pattern affects an active Ultrafix loop when loadUltrafix rejects and becomes null, and queued work when its lookup rejects and becomes 0.

    Both the body and MCP can therefore assert readiness while required facts are unavailable. Check completeness protects only check reads; the other catches erase their failure information before computation. The MCP outer catch cannot return an unavailable status because these errors were already swallowed. Verification provenance: static trace of the loader catches and computation branches; no test executed.

  • Minimum fix: Preserve unavailable fact states or propagate these read failures so they cannot produce ready. For body updates, retain the previous block or display an unavailable state; MCP can use its existing null fallback. Cover review, Ultrafix, and configured queue lookup failures.

F6: 🔴 Unknown mergeability is treated as conflict-free

  • Required behavior: ready requires that the PR does not conflict with its base; an unresolved mergeability calculation does not establish that condition.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatus.ts, attentionReason and computePullRequestStatus; packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, loadPullRequestStatusFacts

    1. A synchronization reads an open ProPR PR while GitHub is still computing mergeability, represented by mergeable: null in the new facts contract.
    2. Tasks are completed, checks pass, and the review score is absent or meets the goal.
    3. attentionReason tests only mergeable === false; null passes through to the unconditional ready return.
    4. The body and MCP show “Ready” before conflict status is established, including when that calculation subsequently resolves to a conflict.

    The loader explicitly preserves unknown mergeability as null, but the computation provides no unknown-state guard. Check-read completeness does not address this separate fact. Verification provenance: static trace of the declared mergeability contract and return branches; no test executed.

  • Minimum fix: Prevent ready while mergeability is unknown, and arrange a bounded refresh so the body can settle after GitHub finishes computing it.

F7: 🔴 Status growth exceeds the reserved body budget

  • Required behavior: New PR descriptions must reserve enough space for the live block to remain maintainable as its contents change.

  • Evidence: src/jobs/issueJobHelpers.ts, createPullRequest; packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts, syncPullRequestStatus

    1. A generated description fills the body budget supplied to describePullRequest.
    2. Creation subtracts only pullRequestStatusBlockLength(statusBlock), where the initial block contains the short “Implementing” status.
    3. A subsequent transition adds review information, check counts, Ultrafix details, or failed-check names. The replacement block is longer than the initially reserved space.
    4. syncPullRequestStatus inserts that larger block and PATCHes the entire body without another length check, exceeding the body limit and leaving the original status stale when the update fails.

    The creation budget protects only the initial rendering. Logging and retrying on later transitions cannot make an oversized body valid, while trimming the surrounding description would violate its preservation contract. Verification provenance: static trace of the creation budget, variable-length renderer, and unconditional PATCH; no test executed.

  • Minimum fix: Reserve a bounded maximum block budget during creation and enforce that bound in rendering. When inserting into an existing near-limit body, use a length-aware fallback without truncating user content.

Suggestions

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

S2: 🟢 Exercise distributed lock expiry

The concurrency test uses one process and a fake Redis implementation without TTL expiry, so it verifies local serialization rather than the cross-process guarantee. A follow-up test covering the fixed 30-second lease during delayed GitHub reads would help determine whether renewal or ownership checks are needed. This is optional here because no actual lease-overrun failure was established during this review.

Score

The shared design and targeted tests are useful, but false readiness and an insufficient body budget require correction. Current checks have no reported failures; two remain pending.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 18s
  • Tokens: 93,376 (91,647 in / 1,729 out)
  • Cost: $0.89

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 F5 F6 F7 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 26829b2

Addressed 1 AI review comment (IDs: 6853671904)

Addressed findings F5, F6, F7

Summary of Changes

I've fixed F5, F6 and F7, and added a regression test for each. I ran each new test against the original code: 8 fail there and pass now. The one exception is the block-size test, which also passes on the old code because the old block already stayed under the limit. Typecheck is clean in core, api, shared and the root, and lint is clean on the changed source files. The related suites pass: prTemplateDescription, visualPreviewAttachments, checkRunHandler, mcpPullRequests, mcpWorkOverview, and the two status suites (48 tests).

F5: facts that can't be read no longer produce "Ready"

  • In pullRequestStatusFacts.ts, failed reads of the review score, the Ultrafix state and the queued-job count now raise an error. Before, they were silently treated as "never reviewed", "no loop" and "0 queued". Epic progress still falls back to "none" (now with a warning), because it never decides the state.
  • When a read fails, the body sync sends no update, so the PR keeps its previous status line. MCP returns proprStatus: null.
  • Each of the three failures has a test that checks the loader fails and the body is left unchanged.

F6: unknown mergeability is not "Ready"

  • computePullRequestStatus now returns working with a new activity, checking_mergeability ("🔨 Checking for conflicts"), when everything else would be ready but GitHub hasn't decided mergeability yet. Known problems such as a failed check or a low review score still show "Needs you".
  • GitHub sends no event when it finishes working out mergeability, so ProPR checks again after about 3, 10, 30 and 60 seconds, then stops. A new change during that wait triggers an update within the usual 1-second delay instead of waiting for the next check.
  • The test covers a PR that turns out to conflict, and checks that the re-checks stop after the schedule.

F7: the body budget covers the block's maximum size

  • PR_STATUS_BLOCK_MAX_LENGTH (512 characters) is now in @propr/shared. The renderer keeps the block within it: it drops failed-check names first, then cuts the line, always keeping the markers and the update time.
  • When a new PR is created, its description now leaves room for the largest block, not just the short initial one (pullRequestStatusBlockReserve in src/github/pullRequestBodyWriter.ts).
  • If a body is close to GitHub's 65,536-character limit, the sync uses a shorter line with just the state and time. If even that doesn't fit, it leaves the line out, or removes an existing one rather than leave it out of date. Text outside the markers is never shortened.
  • The same check applies when other ProPR features rewrite the body: if keeping the block would go over the limit, their text is written and the block is dropped.

I updated docs/docs/features/pr-status.md and the CHANGELOG entry. I didn't make a visual preview, because the change only affects text in the PR body on GitHub, not ProPR's UI.

Separate problem I noticed but didn't fix: the size budget only applies to descriptions built from a repository's PR template. The default description has no length limit: a very long agent summary produced a 130,647-character body in a test. That was already the case before this PR, so I left it alone.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 12m 39s
  • Tokens: 5,615,031 (5,577,377 in / 37,654 out)
  • Cost: $2.50

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…ach. I ran each new test against the original code: 8 fail there and pass now. The one exception is the block-size test, which also passes on the old code because the old block already stayed under the limit. Typecheck is clean in core, api, shared and the root, and lint is clean on the changed source files. The related suites pass: `prTemplateDescription`, `visualPreviewAttachments`, `checkRunHandler`, `mcpPullRequests`, `mcpWorkOverview`, and the two status suites (48 tests).

I've fixed F5, F6 and F7, and added a regression test for each. I ran each new test against the original code: 8 fail there and pass now. The one exception is the block-size test, which also passes on the old code because the old block already stayed under the limit. Typecheck is clean in core, api, shared and the root, and lint is clean on the changed source files. The related suites pass: `prTemplateDescription`, `visualPreviewAttachments`, `checkRunHandler`, `mcpPullRequests`, `mcpWorkOverview`, and the two status suites (48 tests).

**F5: facts that can't be read no longer produce "Ready"**
- In `pullRequestStatusFacts.ts`, failed reads of the review score, the Ultrafix state and the queued-job count now raise an error. Before, they were silently treated as "never reviewed", "no loop" and "0 queued". Epic progress still falls back to "none" (now with a warning), because it never decides the state.
- When a read fails, the body sync sends no update, so the PR keeps its previous status line. MCP returns `proprStatus: null`.
- Each of the three failures has a test that checks the loader fails and the body is left unchanged.

**F6: unknown mergeability is not "Ready"**
- `computePullRequestStatus` now returns `working` with a new activity, `checking_mergeability` ("🔨 Checking for conflicts"), when everything else would be ready but GitHub hasn't decided mergeability yet. Known problems such as a failed check or a low review score still show "Needs you".
- GitHub sends no event when it finishes working out mergeability, so ProPR checks again after about 3, 10, 30 and 60 seconds, then stops. A new change during that wait triggers an update within the usual 1-second delay instead of waiting for the next check.
- The test covers a PR that turns out to conflict, and checks that the re-checks stop after the schedule.

**F7: the body budget covers the block's maximum size**
- `PR_STATUS_BLOCK_MAX_LENGTH` (512 characters) is now in `@propr/shared`. The renderer keeps the block within it: it drops failed-check names first, then cuts the line, always keeping the markers and the update time.
- When a new PR is created, its description now leaves room for the largest block, not just the short initial one (`pullRequestStatusBlockReserve` in `src/github/pullRequestBodyWriter.ts`).
- If a body is close to GitHub's 65,536-character limit, the sync uses a shorter line with just the state and time. If even that doesn't fit, it leaves the line out, or removes an existing one rather than leave it out of date. Text outside the markers is never shortened.
- The same check applies when other ProPR features rewrite the body: if keeping the block would go over the limit, their text is written and the block is dropped.

I updated `docs/docs/features/pr-status.md` and the CHANGELOG entry. I didn't make a visual preview, because the change only affects text in the PR body on GitHub, not ProPR's UI.

**Separate problem I noticed but didn't fix:** the size budget only applies to descriptions built from a repository's PR template. The default description has no length limit: a very long agent summary produced a 130,647-character body in a test. That was already the case before this PR, so I left it alone.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements the revised scope: unconditional body status maintenance and a default-on, title-only setting. The shared computation and extensive tests are useful, but two correctness gaps need correction before merge.

✅ Shared status computation — Body updates and MCP reads use the same facts loader and pure state computation.

✅ Revised setting scope — prTitleStatus is exposed across configuration, API, MCP, CLI and UI without gating the body block.

✅ Conservative readiness checks — Unreadable check runs and unknown mergeability cannot produce ready.

This assessment is based on static review of the supplied code; no commands were run. Current checks show no failures and two pending checks.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F8: 🔴 Task history limit can hide active work

  • Required behavior: A PR with queued or running ProPR work must report working; readiness requires that nothing is running.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts:67, loadPullRequestStatusTasks

    1. A PR has an older active task and 20 newer terminal task records—for example, newer queued tasks were cancelled while the older task continued.
    2. The loader orders all matching tasks by creation time and applies limit(20) before considering their latest states. The active task is excluded.
    3. With no remaining queued jobs or active Ultrafix loop, passing checks, sufficient review score and confirmed mergeability, computePullRequestStatus returns ready.
    4. Both MCP and the body block therefore advertise readiness while ProPR is still working on the PR.

    static trace: The query limits history without a separate active-task lookup, and currentActivity examines only the returned array. The supplied tests exercise small task collections and do not cover this limit boundary. No invariant enforcing that active tasks must fall within the newest 20 records is present in the supplied code.

  • Minimum fix: Query active tasks independently of the history limit, while retaining a bounded query for the latest terminal outcome. Add a regression covering an active task older than 20 terminal records.

F9: 🔴 Body lock expires during protected work

  • Required behavior: Status updates and other ProPR body writers must serialize their read-modify-write operations without dropping another writer’s changes.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts:121, withPullRequestBodyLock; syncPullRequestStatusOnce; updatePullRequestBody

    1. A daemon status sync acquires the Redis lock with a fixed 30-second TTL, reads body A, then awaits desiredStatus, which performs database, queue, Redis and GitHub reads.
    2. Those reads remain outstanding beyond 30 seconds. The lock expires; this implementation neither renews it nor bounds the protected operation to the TTL.
    3. A worker handling visual-preview publication acquires the now-available lock, reads A, writes body B containing the new preview, and releases its lock.
    4. The daemon’s facts read completes. It constructs the status update from its previously captured body A and PATCHes it, deleting the preview from B.

    static trace: The interruption point is the awaited desiredStatus call after readPull. Cross-process writers use separate localChains maps, so local serialization does not prevent this interleaving. The Redis token is checked only during release; there is no ownership check before the PATCH. This sequence specifically concerns an operation exceeding the explicit non-renewing lease, rather than assuming a renewing lease loses ownership. The concurrency test uses one process and a fake Redis implementation without expiration.

  • Minimum fix: Renew the lock throughout protected work and abort before mutation if ownership is lost. Cover expiration/takeover with separate simulated writers and verify that a stale status writer cannot overwrite the newer body.

Suggestions

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

S3: 🟢 Share queued-job reads across lists

countQueuedPullRequestJobs retrieves the entire waiting, delayed and prioritized queue for each PR. A 20-PR MCP response can repeat that full scan 20 times. Loading and indexing queued jobs once per list request would reduce Redis traffic and memory use. This is an optional efficiency improvement; it does not independently establish incorrect results.

Score

The implementation follows the amended scope and has substantial coverage, but active-work detection and cross-process body serialization still permit incorrect externally visible state. Current checks have no failures, with two still pending.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 28s
  • Tokens: 99,145 (97,399 in / 1,746 out)
  • Cost: $0.93

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 F8 F9 S3

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit ea6b9e5

Addressed 1 AI review comment (IDs: 6854504744)

Addressed findings F8, F9

Summary of Changes

I've fixed F8 and F9 and added a regression test for each path. Each new test fails on the old code and passes now. Typecheck and lint are clean in core, and the related suites pass (130 tests across the status, sync, MCP pull request, work overview and visual preview attachment suites).

F8: active work hidden by the 20-task limit (pullRequestStatusFacts.ts)

  • loadPullRequestStatusTasks still reads the 20 newest task records, which give the latest outcome. It now also reads every task that is still active, with no limit, in a separate query. A task with no history counts as pending, as it did before.
  • The two results are de-duplicated and sorted newest first, so tasks[0] is still the newest record.
  • To keep the definition of "active" in one place, pullRequestStatus.ts now exports TERMINAL_TASK_STATES and the query uses it.
  • New test: one running follow-up task followed by 20 newer cancelled tasks. The status now reads "Follow-up in progress" instead of Ready.
  • I checked the other inputs to the status: queued jobs, Ultrafix state and checks have no history limit, so they don't have the same problem.

F9: body lock expiring during protected work (new pullRequestBodyLock.ts)

  • The lock is renewed while the protected work runs. It counts as lost when a renewal finds another owner, or when the lease runs out because renewals keep failing.
  • The protected work now receives a lease and must call lease.assertHeld() right before it writes. That call checks ownership in Redis, extends the lease, and throws PullRequestBodyLockLostError if the lock was lost.
  • Both writers that change PR bodies, the status sync and updatePullRequestBody, now make that check before their PATCH. No other code PATCHes a PR body, so nothing else needed the change.
  • If a scheduled status sync loses the lock, it runs again: it re-reads the newer body and fits the status back in.
  • Behaviour change: other body writers, such as visual-preview publication, now get an error when they lose the lock, instead of silently writing over a newer body.
  • The lock code moved into its own module because the sync file was close to the 400-line limit. withPullRequestBodyLock is still exported from the package index.
  • What is still unguarded: the GitHub PATCH can't be protected by Redis. If renewals fail for a whole 30-second lease while that one request is in flight, two writers could still overlap. That is a race between two external services, so I bounded it rather than tried to make it impossible.

Tests for F9 (packages/core/test/pullRequestStatusSync.test.ts)

  • The fake Redis now models lease expiry, the renew script and failing renewals. The other process is a second, separate copy of the lock module, so it doesn't share the first one's in-process queue.
  • There are four tests:
    • Renewal holds the lock: a slow status read holds it, and the other process waits.
    • Status writer taken over: the lock is lost and taken by the other process. The status write throws, the newer preview body stays, and the retry keeps the preview.
    • Renewals fail: they fail for longer than the lease, and nothing is written.
    • Other writer taken over: the same takeover case for updatePullRequestBody.

There's no visual change in this fix, so I didn't capture a preview.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 19m 52s
  • Tokens: 2,276,252 (2,255,656 in / 20,596 out)
  • Cost: $1.25

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…ath. Each new test fails on the old code and passes now. Typecheck and lint are clean in core, and the related suites pass (130 tests across the status, sync, MCP pull request, work overview and visual preview attachment suites).

I've fixed F8 and F9 and added a regression test for each path. Each new test fails on the old code and passes now. Typecheck and lint are clean in core, and the related suites pass (130 tests across the status, sync, MCP pull request, work overview and visual preview attachment suites).

**F8: active work hidden by the 20-task limit** (`pullRequestStatusFacts.ts`)
- `loadPullRequestStatusTasks` still reads the 20 newest task records, which give the latest outcome. It now also reads every task that is still active, with no limit, in a separate query. A task with no history counts as pending, as it did before.
- The two results are de-duplicated and sorted newest first, so `tasks[0]` is still the newest record.
- To keep the definition of "active" in one place, `pullRequestStatus.ts` now exports `TERMINAL_TASK_STATES` and the query uses it.
- New test: one running follow-up task followed by 20 newer cancelled tasks. The status now reads "Follow-up in progress" instead of Ready.
- I checked the other inputs to the status: queued jobs, Ultrafix state and checks have no history limit, so they don't have the same problem.

**F9: body lock expiring during protected work** (new `pullRequestBodyLock.ts`)
- The lock is renewed while the protected work runs. It counts as lost when a renewal finds another owner, or when the lease runs out because renewals keep failing.
- The protected work now receives a lease and must call `lease.assertHeld()` right before it writes. That call checks ownership in Redis, extends the lease, and throws `PullRequestBodyLockLostError` if the lock was lost.
- Both writers that change PR bodies, the status sync and `updatePullRequestBody`, now make that check before their PATCH. No other code PATCHes a PR body, so nothing else needed the change.
- If a scheduled status sync loses the lock, it runs again: it re-reads the newer body and fits the status back in.
- **Behaviour change:** other body writers, such as visual-preview publication, now get an error when they lose the lock, instead of silently writing over a newer body.
- The lock code moved into its own module because the sync file was close to the 400-line limit. `withPullRequestBodyLock` is still exported from the package index.
- **What is still unguarded:** the GitHub PATCH can't be protected by Redis. If renewals fail for a whole 30-second lease while that one request is in flight, two writers could still overlap. That is a race between two external services, so I bounded it rather than tried to make it impossible.

**Tests for F9** (`packages/core/test/pullRequestStatusSync.test.ts`)
- The fake Redis now models lease expiry, the renew script and failing renewals. The other process is a second, separate copy of the lock module, so it doesn't share the first one's in-process queue.
- There are four tests:
  - **Renewal holds the lock:** a slow status read holds it, and the other process waits.
  - **Status writer taken over:** the lock is lost and taken by the other process. The status write throws, the newer preview body stays, and the retry keeps the preview.
  - **Renewals fail:** they fail for longer than the lease, and nothing is written.
  - **Other writer taken over:** the same takeover case for `updatePullRequestBody`.

There's no visual change in this fix, so I didn't capture a preview.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

This PR centralizes PR status computation and implements the revised, title-only prTitleStatus setting. It needs changes before merge because the new body updater can overwrite concurrent human edits, and PR ownership detection can incorrectly include human-created PRs.

✅ Shared computation — The body updater and MCP tools use the same facts loader and pure status function.

✅ Revised setting scope — prTitleStatus defaults on across configuration surfaces and does not gate the body block.

✅ Defensive update handling — Timestamp-only changes avoid PATCH requests; body length limits and renewing Redis leases have focused coverage.

This review is based on static tracing of the supplied code; no commands were run. The authoritative checks show zero failures and two pending checks.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F10: 🔴 Status updates can overwrite human edits

  • Required behavior: Status maintenance must preserve text outside its markers, including human edits.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts, syncPullRequestStatusOnce

    1. A status transition starts synchronization, acquires the Redis lock, and reads the current PR body.
    2. Synchronization awaits desiredStatus, which performs database, Redis, queue, and GitHub check reads.
    3. During those awaited operations, a person saves an edit to the PR description through GitHub. That operation does not acquire ProPR’s Redis lock.
    4. Synchronization builds next from the earlier pull.body, successfully asserts its still-valid lease, and PATCHes that stale description. The person’s edit is erased.

    The lease protects cooperating ProPR writers, but does not establish that GitHub’s body remains unchanged. A subsequent webhook cannot recover text already overwritten. Existing preservation tests keep the human text fixed throughout synchronization and therefore do not cover this sequence.

    static trace: the body is read before fact loading and never refreshed before PATCH. proposed regression: suspend a facts read, change the fake GitHub body, resume synchronization, and assert the human edit survives.

  • Minimum fix: After gathering facts, re-read the PR immediately before applying the block and preserve that latest body. Revalidate state and head as needed. This closes the demonstrated fact-loading window; it does not require atomicity between GitHub and Redis or eliminate the residual GET/PATCH race.

F11: 🔴 Branch names incorrectly establish PR ownership

  • Required behavior: The live block belongs only on pull requests ProPR created; human-created PRs must remain none.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, isProprPullRequest

    1. A person opens a PR from a branch named 800-epic-short-name-x7y, matching the supplied EPIC_BRANCH_PATTERN, without any corresponding ProPR creation record.
    2. The opened webhook schedules status synchronization.
    3. isProprPullRequest immediately returns true from the branch-name match, bypassing all creation-record queries.
    4. The computation returns a ProPR status and synchronization inserts the managed block into the human-created PR.

    The same classification affects MCP status reads. Neither the body lock nor the existing non-ProPR tests prevents this: those tests use a branch that does not match the epic pattern.

    static trace: the unconditional epic-pattern return precedes all database ownership checks. proposed regression: use a matching branch with no creation records and assert none and no body PATCH.

  • Minimum fix: Require durable evidence linking the epic PR to ProPR creation. Keep the branch pattern for locating epic progress, but do not use it alone to authorize body maintenance.

Suggestions

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

S4: 🟢 Share queued-job snapshots

countQueuedPullRequestJobs loads every waiting, delayed, and prioritized job for each PR. A list request can repeat that scan twenty times. Sharing one queue snapshot per list call would reduce Redis traffic and allocation. This is an optional performance improvement; the supplied code does not establish a concrete capacity failure.

Score

The shared computation, setting integration, and focused tests are strong, but the body-preservation and ownership defects require correction. Current checks have no failures, with two still pending.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 17s
  • Tokens: 102,792 (101,136 in / 1,656 out)
  • Cost: $0.98

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 F10 F11 S4

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 78d675d

Addressed 1 AI review comment (IDs: 6855529011)

Addressed findings F10, F11

Summary of Changes

The background mcpWorkOverview run has finished the way I described: all 5 tests passed, none failed, and the process hung at exit until the timeout ended it. Nothing changes in the earlier report.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (high)
  • Requested By: @propr-ultrafix
  • Time: 24m 46s
  • Tokens: 3,527,188 (3,526,706 in / 482 out)
  • Cost: $1.17

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

… described: all 5 tests passed, none failed, and the process hung at exit until the timeout ended it. Nothing changes in the earlier report.

The background `mcpWorkOverview` run has finished the way I described: all 5 tests passed, none failed, and the process hung at exit until the timeout ended it. Nothing changes in the earlier report.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned darwin-x64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned darwin-x64 package
  • Result: failure
  • Commit: 78d675d51176 (78d675d51176cd8c981456102ed92599ad031203)
  • Details: View CI failure

Failure evidence

.github:36
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit be70c62

Summary of Changes

This failure didn't come from this PR's code. npm ci failed because the macOS runner couldn't reach nodejs.org. While rebuilding the better-sqlite3 native module, node-gyp tried to download the Node headers and got ConnectTimeoutError: Connect Timeout Error (attempted address: nodejs.org:443, timeout: 10000ms).

The step wraps npm ci in apps/desktop/scripts/retry-transient-download.mjs, which retries only on known network-error patterns. It didn't recognise this one: node-gyp prints Undici's error class and message but not the UND_ERR_CONNECT_TIMEOUT code that the script looks for. So it logged "Command failed without a transient download signature; not retrying." and failed on the first attempt. That script is the same on main.

Fix

  • apps/desktop/scripts/retry-transient-download.mjs: added ConnectTimeoutError / Connect Timeout Error to the patterns that trigger a retry.
  • apps/desktop/scripts/retry-transient-download.test.mjs: added the exact line from the job log to the cases that must retry. I also added a test that runs npm ci with the full node-gyp failure output and checks that it is retried after the backoff and then succeeds.

Checks

  • All 14 tests in the retry suite pass.
  • Run against the old script, the 2 new tests fail and the other 12 still pass.
  • Lint printed only an npm update notice and no lint output, so I can't say lint actually ran on these two files.

Nothing visible changed, so there's no visual preview.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-dev[bot]
  • Time: 3m 32s
  • Tokens: 395,025 (391,582 in / 3,443 out)
  • Cost: $0.34

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6856400934✓

…ed because the macOS runner couldn't reach nodejs.org. While rebuilding the `better-sqlite3` native module, node-gyp tried to download the Node headers and got `ConnectTimeoutError: Connect Timeout Error (attempted address: nodejs.org:443, timeout: 10000ms)`.

This failure didn't come from this PR's code. `npm ci` failed because the macOS runner couldn't reach nodejs.org. While rebuilding the `better-sqlite3` native module, node-gyp tried to download the Node headers and got `ConnectTimeoutError: Connect Timeout Error (attempted address: nodejs.org:443, timeout: 10000ms)`.

The step wraps `npm ci` in `apps/desktop/scripts/retry-transient-download.mjs`, which retries only on known network-error patterns. It didn't recognise this one: node-gyp prints Undici's error class and message but not the `UND_ERR_CONNECT_TIMEOUT` code that the script looks for. So it logged "Command failed without a transient download signature; not retrying." and failed on the first attempt. That script is the same on `main`.

**Fix**
- `apps/desktop/scripts/retry-transient-download.mjs`: added `ConnectTimeoutError` / `Connect Timeout Error` to the patterns that trigger a retry.
- `apps/desktop/scripts/retry-transient-download.test.mjs`: added the exact line from the job log to the cases that must retry. I also added a test that runs `npm ci` with the full node-gyp failure output and checks that it is retried after the backoff and then succeeds.

**Checks**
- All 14 tests in the retry suite pass.
- Run against the old script, the 2 new tests fail and the other 12 still pass.
- Lint printed only an npm update notice and no lint output, so I can't say lint actually ran on these two files.

Nothing visible changed, so there's no visual preview.

PR: #3535
Comment by: @propr-dev[bot] (ID: 6856400934)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements the revised scope well, but needs changes before merge: ownership detection can modify a human-created fork PR, and synchronization can publish stale readiness despite receiving newer mergeability information.

✅ Title-only configuration — prTitleStatus defaults on across the configuration surfaces, while body synchronization has no repository setting gate.

✅ Careful body preservation — Status updates re-read the description, preserve surrounding text, reserve space for new descriptions, and avoid timestamp-only PATCH requests.

✅ Substantial regression coverage — Tests cover transitions, unavailable facts, head changes, body limits, and lock takeover.

This is a static review of the supplied code; no commands were run. Current checks report 32 passed, two pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F12: 🔴 Verify the epic branch’s repository

  • Required behavior: Only pull requests ProPR created may receive the live status block; human-created pull requests must remain none.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, isRecordedEpicBranch, isProprPullRequest, and PullRequestStatusPull.

    1. ProPR has a recorded epic branch, such as 800-epic-short-name-x7y, associated with a plan draft.
    2. A person opens a pull request from their fork using that same branch name. The PR has no ProPR implementation, plan-issue PR association, or goal creation record.
    3. The loader passes only pr.head.ref into epic ownership detection. The existing plan’s matching epicLabel makes isRecordedEpicBranch return true.
    4. The new synchronization path treats this human-created PR as ProPR-owned and writes the status block into its description.

    The ownership checks validate the stored branch name but never compare the head repository. The supplied ownership tests cover missing and differently named epic records, not a matching branch name in a different repository. static trace: the supplied pull type does not carry head repository identity, and the epic result independently satisfies the ownership predicate.

  • Minimum fix: Include head repository identity in the loaded PR data and require it to match the repository where ProPR recorded the epic branch before accepting this ownership fallback. Add a matching-name fork regression.

F13: 🔴 Reject changed mergeability before publishing

  • Required behavior: ready must describe the current pull request and require confirmed absence of merge conflicts.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts, sameStatusSubject and statusForLatestPull.

    1. An open ProPR PR has passing checks, no active work, and mergeable: true on the initial read.
    2. While desiredStatus awaits its database, queue, or GitHub reads, another actor pushes a conflicting change to the target branch. The PR’s head SHA and open state remain unchanged.
    3. The second readPull returns mergeable: false, but sameStatusSubject compares only state, merged status, and head SHA. It accepts the old computed ready status.
    4. Synchronization writes “Ready” despite having just received an explicit conflicting result. Because that computed status is not awaiting mergeability, it schedules no mergeability refresh.

    The Redis lease protects cooperating body writers, not pushes to the target branch. The new webhook signaling function also has no push branch to guarantee a corrective refresh from that event. static trace: the latest mergeability value is available but discarded when deciding whether the previously computed status remains valid; the supplied tests exercise head changes but not this unchanged-head case.

  • Minimum fix: Treat a changed mergeability value as requiring recomputation before publishing. Include the relevant base identity in subject validation to detect retargeting or base changes, and test an unchanged-head transition from mergeable to conflicting during the facts read.

Suggestions

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

S5: 🟢 Share queue reads across list results

countQueuedPullRequestJobs fetches all waiting, delayed, and prioritized jobs for each PR. A 20-PR MCP response can therefore fetch and filter the same queue 20 times. Sharing one queue snapshot within a list request would reduce Redis traffic and memory use. This is an optional performance improvement; the supplied code does not demonstrate a production capacity failure.

Score

The revised configuration, body preservation, and tests are strong, but the two correctness defects require localized fixes before merge. Pending checks alone do not lower the score.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 55s
  • Tokens: 111,041 (108,790 in / 2,251 out)
  • Cost: $1.09

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 F12 F13 S5

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements the revised scope well: unconditional body status maintenance and a default-on, title-only setting reserved for future use. One coverage gap prevents merge readiness.

✅ Shared computation — Body updates and MCP reads use the same status computation, including conservative handling of unavailable checks and unknown mergeability.

✅ Body preservation — Status updates re-read the description after gathering facts, validate the PR revision, and coordinate ProPR writers through a renewable Redis lease.

✅ Revised setting scope — prTitleStatus is exposed across configuration, API, MCP, CLI and UI without gating body updates.

This was a static review of the supplied code; no commands were run. Authoritative checks show 34 passed, none failed, and one pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F18: 🔴 Backfill permanently excludes overflow pull requests

  • Required behavior: The authorized follow-up requires the status block on every open pull request ProPR created, in every repository.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusReconcile.ts, listOpenPullRequests and schedulePullRequestStatusBackfill; packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts, runBackfill.

    1. Deploy this release with 301 existing open PRs in a monitored repository, where PR 301 in creation order is ProPR-created and has no status block.
    2. Startup backfill reads only the first three 100-item pages. It logs truncation but returns no continuation and schedules no update for PR 301.
    3. The repository is considered successfully processed, so runBackfill does not retry its overflow. If that PR remains idle, its block is never installed.
    4. Restarting repeats the same oldest-first selection. Similarly, repositories beyond the first 100 are always excluded.

    The bounded retries cover failed listings, not truncated successful listings. Base-push reconciliation repeats the same three-page cutoff, so it does not reliably repair this exclusion either. static trace: the supplied limit test explicitly confirms that owned PR 320 is omitted. No test was executed.

  • Minimum fix: Retain bounded batches, but schedule continuation through remaining pages and repositories until enumeration completes. Apply the same continuation mechanism to truncated base-push enumeration.

Suggestions

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

S9: 🟢 Test MCP status response contracts

The supplied additions thoroughly test computation and body synchronization, but do not directly test the new MCP status attachment paths. Endpoint-level tests for shared PRs in work-overview rows, the 20-open-PR limit, closed results, and unavailable facts would protect these response contracts. This is optional additional coverage; no defect in those paths was established.

Score

The shared computation, preservation safeguards and extensive tests are strong. The unconditional rollout still misses eligible PRs beyond fixed enumeration limits, requiring a localized correction before merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 59s
  • Tokens: 120,752 (119,681 in / 1,071 out)
  • Cost: $1.14

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 F18 S9

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit a79ea18

Addressed 3 AI review comments (IDs: 6859496332, 6859633574, 6859693425)

Addressed findings F16, F17, F18

Summary of Changes

I fixed all three findings. A finished check failure now shows as needs attention even while other checks are still running, and the startup backfill and base-push refresh now continue past their batch limits until every pull request has been read. The three status suites pass (93 tests), as do the two root suites that use the status block.

F16: pending checks no longer hide a confirmed failure (pullRequestStatus.ts)

  • The order is now:
    1. ProPR work still running (a task, an active Ultrafix loop, or a queued job) → working.
    2. A confirmed problem → needs_attention. The problems are a failed last run, a failed conflict resolution, a stopped Ultrafix loop, a failed check, a merge conflict, or a review score below the goal.
    3. Otherwise, checks still pending → working.
  • The finding's exact case (goal reached, score 8, one check failed and one pending) now returns needs_attention / check_failed.
  • Behaviour change: a review score below the goal (and the other confirmed problems) now also wins over pending checks. Before, they read working until CI finished.
  • "Checks could not be read" still comes after pending checks, because it isn't a confirmed problem.
  • New tests cover each confirmed problem with checks pending, show running ProPR work still winning, and show the "could not be read" boundary. The behaviour tests fail on the old code.

F17/F18: no pull request or repository is left out (pullRequestStatusReconcile.ts, new pullRequestStatusReconcileRuns.ts)

  • Batches stay the same size: 3 pages of 100 pull requests, and 100 repositories per backfill batch.
  • A batch that hits the limit now records where it stopped: the last page it read and the highest PR number covered. The next batch starts after this one's updates have started (at least 2 seconds later).
    • Backfill: repositories past the first 100, and listings cut short, run in the next batch. They are deferred, not retried, so they run regardless of how many retries came before.
    • Base push: each branch is read batch by batch. If the branch is pushed again mid-way, ProPR finishes the remaining pages for the new tip, then reads the pages it had already covered again. If a new push restarted the read from page 1 instead, frequent pushes would mean later pages are never reached; a test fails if that happens.
  • PRs that close between batches move later ones to earlier pages. A resumed batch steps back to the page holding its last position, so none are skipped.
  • One related change: retries of a failed base-push batch now resume from where the batch stopped.
  • The old test that confirmed PR 320 was excluded now checks it is reached. Two new end-to-end tests (backfill, and a push to main) show PR 320 getting its status; both fail on the old code.
  • I moved the batching logic into the new file so pullRequestStatusSync.ts stays under the 400-line lint limit.

docs/docs/features/pr-status.md now describes the new order of states and the batches that continue until everything is read.

Found along the way, not fixed:

  • Gap within one batch: if a PR closes in the moment between two page reads of the same batch, one PR can slip past unread. GitHub's REST pull request list has no stable cursor, so preventing this would mean moving to the GraphQL API.
  • Test typechecking: pullRequestStatusSync.test.ts already has three type errors, at lines 20 and 427–428. They don't show up because core tests aren't typechecked. I fixed the typing in the helper I added.

There's no visual preview, since nothing in the UI changed.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (xhigh)
  • Requested By: @propr-ultrafix
  • Time: 21m 25s
  • Tokens: 7,970,956 (7,879,267 in / 91,689 out)
  • Cost: $4.33

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…ows as needs attention even while other checks are still running, and the startup backfill and base-push refresh now continue past their batch limits until every pull request has been read. The three status suites pass (93 tests), as do the two root suites that use the status block.

I fixed all three findings. A finished check failure now shows as needs attention even while other checks are still running, and the startup backfill and base-push refresh now continue past their batch limits until every pull request has been read. The three status suites pass (93 tests), as do the two root suites that use the status block.

**F16: pending checks no longer hide a confirmed failure** (`pullRequestStatus.ts`)
- The order is now:
  1. ProPR work still running (a task, an active Ultrafix loop, or a queued job) → `working`.
  2. A confirmed problem → `needs_attention`. The problems are a failed last run, a failed conflict resolution, a stopped Ultrafix loop, a failed check, a merge conflict, or a review score below the goal.
  3. Otherwise, checks still pending → `working`.
- The finding's exact case (goal reached, score 8, one check failed and one pending) now returns `needs_attention` / `check_failed`.
- **Behaviour change:** a review score below the goal (and the other confirmed problems) now also wins over pending checks. Before, they read `working` until CI finished.
- "Checks could not be read" still comes after pending checks, because it isn't a confirmed problem.
- New tests cover each confirmed problem with checks pending, show running ProPR work still winning, and show the "could not be read" boundary. The behaviour tests fail on the old code.

**F17/F18: no pull request or repository is left out** (`pullRequestStatusReconcile.ts`, new `pullRequestStatusReconcileRuns.ts`)
- Batches stay the same size: 3 pages of 100 pull requests, and 100 repositories per backfill batch.
- A batch that hits the limit now records where it stopped: the last page it read and the highest PR number covered. The next batch starts after this one's updates have started (at least 2 seconds later).
  - **Backfill:** repositories past the first 100, and listings cut short, run in the next batch. They are deferred, not retried, so they run regardless of how many retries came before.
  - **Base push:** each branch is read batch by batch. If the branch is pushed again mid-way, ProPR finishes the remaining pages for the new tip, then reads the pages it had already covered again. If a new push restarted the read from page 1 instead, frequent pushes would mean later pages are never reached; a test fails if that happens.
- PRs that close between batches move later ones to earlier pages. A resumed batch steps back to the page holding its last position, so none are skipped.
- One related change: retries of a failed base-push batch now resume from where the batch stopped.
- The old test that confirmed PR 320 was excluded now checks it is reached. Two new end-to-end tests (backfill, and a push to `main`) show PR 320 getting its status; both fail on the old code.
- I moved the batching logic into the new file so `pullRequestStatusSync.ts` stays under the 400-line lint limit.

`docs/docs/features/pr-status.md` now describes the new order of states and the batches that continue until everything is read.

**Found along the way, not fixed:**
- **Gap within one batch:** if a PR closes in the moment between two page reads of the same batch, one PR can slip past unread. GitHub's REST pull request list has no stable cursor, so preventing this would mean moving to the GraphQL API.
- **Test typechecking:** `pullRequestStatusSync.test.ts` already has three type errors, at lines 20 and 427–428. They don't show up because core tests aren't typechecked. I fixed the typing in the helper I added.

There's no visual preview, since nothing in the UI changed.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements the revised scope well, but needs a localized correction before merging: mixed legacy commit statuses produce inaccurate check counts.

✅ Scope change implemented — The body block has no repository setting gate, while prTitleStatus defaults on and is exposed across configuration, API, MCP, CLI, UI, and documentation.

✅ Careful body updates — Status synchronization re-reads the description after gathering facts, checks for head/base changes, and verifies the renewing body lease before writing.

✅ Substantial regression coverage — Added tests cover transitions, ownership, body preservation, pagination, retries, and lock takeover.

This review used static analysis of the supplied code; no commands were run. Current checks report 0 failed, 2 pending, and 32 passed.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F19: 🔴 Mixed commit statuses misreport passing checks

  • Required behavior: The shared status must accurately report passed, failed, and pending checks on the current head.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, loadPullRequestStatusChecks

    1. An open ProPR PR has two legacy commit-status contexts: one failed and one pending, with no non-blocking patterns.
    2. The loader passes their combined failure state and both contexts to summarizeCheckSignals.
    3. In the supplied helper, the combined-failure branch returns the failed context but an empty pending list. Its per-context handling is conditional on finding a non-blocking context, so it does not apply here.
    4. The new loader calculates passed = count - nonBlockingCount - failed - pending, producing { passed: 1, failed: 1, pending: 0 }. Both the body and MCP therefore report the unfinished check as passed.

    static trace: verified against the new loader and the supplied checkRunHelpers.ts:312–367. The overall state remains needs_attention, but its advertised check summary is incorrect. Complete retrieval, body locks, and retries do not fix this deterministic classification error; the supplied mixed-check tests exercise check runs rather than mixed legacy contexts.

  • Minimum fix: When every legacy context was retrieved, classify each blocking context independently into passed, failed, and pending, regardless of whether non-blocking patterns matched. Preserve conservative handling for incomplete responses and add a mixed legacy-status regression test.

Suggestions

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

S10: 🟢 Share queue reads across list results

countQueuedPullRequestJobs retrieves the entire waiting, delayed, and prioritized queue for each PR. A 20-PR MCP response can repeat that scan 20 times. Sharing a queue snapshot within one list request would reduce Redis traffic and improve latency. This is an optional performance improvement; the supplied code does not establish a production capacity failure.

Score

The implementation has strong scope alignment and extensive defensive testing, but the incorrect check summary needs correction. Pending checks also remain to complete.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 1s
  • Tokens: 127,705 (126,360 in / 1,345 out)
  • Cost: $1.22

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 F19 S10

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 32adaa2

Addressed 1 AI review comment (IDs: 6860684787)

Addressed finding F19

Summary of Changes

The fix for F19 is in place and verified.

What was wrong. The status loader in packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts handed legacy commit statuses to the shared check summary and derived passed by subtraction. The shared summary only classifies legacy contexts individually when a non-blocking pattern matched. Otherwise it reads the combined state, so a head with one failed and one pending context came back as one failed and nothing pending, and the loader reported the unfinished context as passed.

The correction. The loader now classifies legacy contexts itself whenever the status response listed every context. Each blocking context is counted as failed, pending, or passed on its own, and non-blocking contexts count as none of those. When contexts went unlisted, the loader still passes the combined state to the shared summary so its conservative reading is kept. Check-run handling is unchanged. The code lives in a new classifyLegacyStatuses helper so the loader stays under the lint complexity limit.

Sibling check. The PR body block and all three MCP tools read checks through this one loader, so the fix covers every PR-changed consumer. The Ultrafix CI-wait path uses the shared helper directly, but that code and the helper predate this PR, so I left them alone.

Regression tests were added to the sync suite, since the facts module opens a database connection that only that suite closes at teardown:

  • Failed plus pending legacy contexts report one failed, one pending, zero passed.
  • Listed legacy contexts and check runs are counted together, context by context.
  • A non-blocking legacy context neither fails nor holds the status and is not counted as passed.
  • Unlisted contexts fall back to the combined state.

The two mixed-context tests fail against the previous loader and pass with the fix.

Check Result
Sync suite, 56 tests pass
Negative run on old loader 2 of 4 new tests fail, as expected
Core typecheck clean
Core lint on the changed source file, zero warnings clean

Independent discovery, not changed. The pre-existing shared helper has the same blind spot for its own callers: with a failed and a pending legacy context and no non-blocking patterns, the Ultrafix CI-wait description lists only the failed context and omits the pending one. That is outside this PR's changed behaviour.

No visual preview was produced. The change alters the counts in a text status line, which is not a perceptible UI change to capture.


🤖 Implementation Details

  • Model: Claude Fable 5.1 (medium)
  • Requested By: @propr-ultrafix
  • Time: 14m 6s
  • Tokens: 2,337,767 (2,318,227 in / 19,540 out)
  • Cost: $2.44

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

The fix for F19 is in place and verified.

**What was wrong.** The status loader in `packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts` handed legacy commit statuses to the shared check summary and derived `passed` by subtraction. The shared summary only classifies legacy contexts individually when a non-blocking pattern matched. Otherwise it reads the combined state, so a head with one failed and one pending context came back as one failed and nothing pending, and the loader reported the unfinished context as passed.

**The correction.** The loader now classifies legacy contexts itself whenever the status response listed every context. Each blocking context is counted as failed, pending, or passed on its own, and non-blocking contexts count as none of those. When contexts went unlisted, the loader still passes the combined state to the shared summary so its conservative reading is kept. Check-run handling is unchanged. The code lives in a new `classifyLegacyStatuses` helper so the loader stays under the lint complexity limit.

**Sibling check.** The PR body block and all three MCP tools read checks through this one loader, so the fix covers every PR-changed consumer. The Ultrafix CI-wait path uses the shared helper directly, but that code and the helper predate this PR, so I left them alone.

**Regression tests** were added to the sync suite, since the facts module opens a database connection that only that suite closes at teardown:

- Failed plus pending legacy contexts report one failed, one pending, zero passed.
- Listed legacy contexts and check runs are counted together, context by context.
- A non-blocking legacy context neither fails nor holds the status and is not counted as passed.
- Unlisted contexts fall back to the combined state.

The two mixed-context tests fail against the previous loader and pass with the fix.

| Check | Result |
|---|---|
| Sync suite, 56 tests | pass |
| Negative run on old loader | 2 of 4 new tests fail, as expected |
| Core typecheck | clean |
| Core lint on the changed source file, zero warnings | clean |

**Independent discovery, not changed.** The pre-existing shared helper has the same blind spot for its own callers: with a failed and a pending legacy context and no non-blocking patterns, the Ultrafix CI-wait description lists only the failed context and omits the pending one. That is outside this PR's changed behaviour.

No visual preview was produced. The change alters the counts in a text status line, which is not a perceptible UI change to capture.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Fable 5.1
@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements the revised scope well, but needs localized correctness fixes before merging.

✅ Title-only configuration — prTitleStatus defaults on across the configuration surfaces, while body synchronization has no repository setting gate.

✅ Protected body updates — Status synchronization renews its Redis lease, checks ownership before writing, and re-reads the PR after gathering facts to preserve intervening body edits.

✅ Shared status computation — The body and MCP tools use the same pure computation, with substantial coverage of transitions and readiness boundaries.

This review used static analysis of the supplied code; no commands were run. Current checks report zero failures and five pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F20: 🔴 Truncated legacy statuses produce false counts

  • Required behavior: Status detail must accurately report passed, failed, and pending checks; unread or pending checks must not be counted as passed.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, classifyLegacyStatuses and loadPullRequestStatusChecks.

    1. A head has 101 blocking legacy contexts: one failed, one pending, and 99 successful.
    2. The single request with per_page: 100 returns the failed context, the pending context, and 98 successful contexts, with combined state failure and total_count: 101.
    3. Because the response is incomplete, classifyLegacyStatuses delegates to summarizeCheckSignals. Its combined-failure path returns failed names but no pending names.
    4. The new loader calculates passed by subtraction from the total, reporting 100 passed, one failed, and zero pending.

    Both MCP and the live body consequently misreport a known pending check as passed. The check-run pagination guard does not cover legacy contexts. The added “legacy contexts left unlisted” test accepts this arithmetic rather than checking the known pending context.

    static trace: followed the incomplete-context branch through the supplied shared summarizer and the new count calculation.

  • Minimum fix: Paginate legacy contexts before calculating exact counts, or preserve known classifications and explicitly represent incomplete coverage without treating the remainder as passed.

F21: 🔴 Reconciliation drops retries after check-read failures

  • Required behavior: Startup and base-push reconciliation must retry transient failed reads on their bounded schedule, because no subsequent transition may occur to refresh the status.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts, loadPullRequestStatusChecks; packages/core/src/services/pullRequestStatus/pullRequestStatusSync.ts, runScheduled and finishScheduled.

    1. Startup backfill schedules an idle, open ProPR PR with reconcile: true; its tasks are complete and mergeability is known.
    2. During synchronization, a GitHub check request temporarily rejects. Promise.allSettled absorbs the rejection and returns checks with complete: false.
    3. The computation produces needs_attention / checks_unavailable, and the body PATCH succeeds.
    4. runScheduled considers the operation settled because it neither threw nor awaits mergeability. finishScheduled clears reconciliation and removes the scheduled entry.
    5. GitHub recovers without a new PR or check transition. The PR remains marked “checks could not be read” indefinitely instead of receiving the promised bounded retries.

    The same loss occurs during base-push reconciliation once the returned base SHA matches the awaited tip. Existing retry tests throw from other fact loaders, so they exercise the catch path that check-read failures bypass.

    static trace: followed a rejected check request through the fulfilled sync outcome and reconciliation cleanup.

  • Minimum fix: Carry transient check-read failure information into the synchronization outcome and retain bounded reconciliation retries for it. Distinguish transport failures from intentional pagination limits to avoid unnecessary retries.

Suggestions

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

S11: 🟢 Share queue reads across list results

countQueuedPullRequestJobs fetches the entire waiting, delayed, and prioritized queue for each PR. A 20-item MCP response can repeat that scan 20 times. Sharing a queue snapshot within a list request would reduce Redis traffic and memory use. This is an optional efficiency improvement; no concrete capacity failure is established here.

Score

The shared computation, configuration coverage, and body-write protections are strong. Incorrect legacy counts and prematurely settled reconciliation still require fixes; the current checks have no reported failures but remain incomplete.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 12s
  • Tokens: 130,850 (129,142 in / 1,708 out)
  • Cost: $1.27

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 F20 F21 S11

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 244c1a5

Addressed 1 AI review comment (IDs: 6861462374)

Addressed findings F20, F21

Summary of Changes

Both findings are fixed and verified. The three status suites pass (103 tests, up from 97), the two root suites that render the block pass (34 tests), core typechecks, and lint is clean on the changed source files. No visual change, so no preview was captured.

F20: legacy contexts are paginated and counted per context (packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts)

  • Legacy commit statuses are now read page by page under the same three-page budget as check runs, through one shared pager. The 101-context head from the finding takes two requests and reports 99 passed, 1 failed, 1 pending.
  • Passed is no longer derived by subtracting from GitHub's total. Only a listed, blocking, successful context counts as passed. A context left unread by the budget is neither passed nor pending.
  • When contexts stay unread, every listed failed or pending context keeps its classification. A combined failure or pending state that no listed context accounts for is attributed to an unread context, so it still blocks readiness.
  • The check-run pager had the same assumption in one corner: a short page with runs still unlisted used to be marked complete. It now reads as incomplete, the same as for legacy contexts.

F21: rejected check reads keep their reconciliation retries (pullRequestStatusSync.ts)

  • The checks fact carries a new optional readFailed flag, set only when a GitHub check request rejected. The page budget leaves it unset, so a commit with too many checks is never retried.
  • The sync outcome carries that flag, and a scheduled run treats it as unsettled when the run came from the startup backfill or a base push. The existing bounded refresh schedule then re-reads, and a complete read ends the retries. Ordinary transition updates still rely on the next transition, as before.

Tests in packages/core/test/pullRequestStatusSync.test.ts. The fake GitHub now pages legacy statuses and can reject check reads. I replaced the test that accepted the subtraction arithmetic with four loader tests, including the exact scenario from the finding, and added three scheduling tests: backfill retry, base-push retry, and the page budget not retrying. Six of the seven fail on the previous code; the page-budget test is the control and passes on both.

Docs: two sentences in docs/docs/features/pr-status.md now state the commit-status read limit and which failures are retried.

Independent discovery, not changed: the pre-existing shared check reader in packages/core/src/webhook/checkRunHelpers.ts still reads a single page of legacy contexts. Its summarizer falls back to the combined state, so it does not miscount, but it carries the same single-page assumption. It is outside this PR's changed behaviour.


🤖 Implementation Details

  • Model: Claude Fable 5.1 (medium)
  • Requested By: @propr-ultrafix
  • Time: 12m 48s
  • Tokens: 3,523,157 (3,492,230 in / 30,927 out)
  • Cost: $3.86

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…es pass (103 tests, up from 97), the two root suites that render the block pass (34 tests), core typechecks, and lint is clean on the changed source files. No visual change, so no preview was captured.

Both findings are fixed and verified. The three status suites pass (103 tests, up from 97), the two root suites that render the block pass (34 tests), core typechecks, and lint is clean on the changed source files. No visual change, so no preview was captured.

**F20: legacy contexts are paginated and counted per context** (`packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts`)
- Legacy commit statuses are now read page by page under the same three-page budget as check runs, through one shared pager. The 101-context head from the finding takes two requests and reports 99 passed, 1 failed, 1 pending.
- Passed is no longer derived by subtracting from GitHub's total. Only a listed, blocking, successful context counts as passed. A context left unread by the budget is neither passed nor pending.
- When contexts stay unread, every listed failed or pending context keeps its classification. A combined failure or pending state that no listed context accounts for is attributed to an unread context, so it still blocks readiness.
- The check-run pager had the same assumption in one corner: a short page with runs still unlisted used to be marked complete. It now reads as incomplete, the same as for legacy contexts.

**F21: rejected check reads keep their reconciliation retries** (`pullRequestStatusSync.ts`)
- The checks fact carries a new optional `readFailed` flag, set only when a GitHub check request rejected. The page budget leaves it unset, so a commit with too many checks is never retried.
- The sync outcome carries that flag, and a scheduled run treats it as unsettled when the run came from the startup backfill or a base push. The existing bounded refresh schedule then re-reads, and a complete read ends the retries. Ordinary transition updates still rely on the next transition, as before.

**Tests** in `packages/core/test/pullRequestStatusSync.test.ts`. The fake GitHub now pages legacy statuses and can reject check reads. I replaced the test that accepted the subtraction arithmetic with four loader tests, including the exact scenario from the finding, and added three scheduling tests: backfill retry, base-push retry, and the page budget not retrying. Six of the seven fail on the previous code; the page-budget test is the control and passes on both.

**Docs:** two sentences in `docs/docs/features/pr-status.md` now state the commit-status read limit and which failures are retried.

**Independent discovery, not changed:** the pre-existing shared check reader in `packages/core/src/webhook/checkRunHelpers.ts` still reads a single page of legacy contexts. Its summarizer falls back to the combined state, so it does not miscount, but it carries the same single-page assumption. It is outside this PR's changed behaviour.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Fable 5.1
@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements a shared status computation, live body updates, and the revised title-only setting. It needs a localized correction before merge: the webhook filter mistakes human edits for ProPR’s own updates.

✅ Scope change implemented — The body block has no repository setting; prTitleStatus defaults on and is wired through configuration, API, MCP, CLI, UI, and documentation.

✅ Defensive synchronization — Body updates re-read the PR after gathering facts, validate the status subject, and check a renewable Redis lease before writing. Added tests cover concurrent writers and intervening human edits.

This review used static analysis only; no commands were run. The supplied current checks report 34 passed, none failed, and one pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F22: 🔴 Human status edits bypass reconciliation

  • Required behavior: Every open ProPR-created pull request must retain an accurate live status block; only ProPR’s own status edits should bypass webhook processing.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusBlock.ts:isStatusBlockOnlyEdit, packages/core/src/webhook/webhookHandler.ts:423

    1. An idle, open ProPR-created PR has a status block showing needs_attention.
    2. A person edits its description, either deleting that block or replacing its contents while leaving the rest unchanged.
    3. GitHub delivers an edited event with only changes.body. Stripping the block from both versions produces identical text, so isStatusBlockOnlyEdit returns true.
    4. processWebhookEvent returns before signalPullRequestStatusFromWebhook runs. The block remains absent or displays the person’s replacement status until another transition or worker restart happens.

    The predicate verifies neither the origin nor whether ProPR actually wrote the resulting block. The body lock cannot prevent GitHub-side edits, and the startup backfill is not periodic. Existing tests explicitly classify every block removal as an own edit, without distinguishing its author or provenance. static trace: verified through the predicate and the early return preceding status signaling.

  • Minimum fix: Suppress reconciliation only for a confirmed ProPR-authored update, using recorded write provenance or an equivalent reliable mechanism. For unrecognized block-only edits, schedule status reconciliation while still avoiding unrelated agent work. Cover human block deletion and replacement in regression tests.

Suggestions

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

S12: 🟢 Share queue reads across statuses

countQueuedPullRequestJobs retrieves the entire waiting, delayed, and prioritized queue for each PR. A list call can repeat that retrieval 20 times. Sharing one queue snapshot across a list request would reduce Redis traffic and allocation without changing status semantics. This is optional performance work; the supplied code does not establish a production capacity failure.

Score

The implementation has substantial defensive logic and regression coverage, but the webhook provenance defect breaks unconditional status maintenance. The pending check alone does not lower the score.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 2s
  • Tokens: 132,669 (131,353 in / 1,316 out)
  • Cost: $1.27

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 F22 S12

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 74f321e

Addressed 1 AI review comment (IDs: 6862271214)

Addressed finding F22

Summary of Changes

F22 is fixed and verified. ProPR now recognises its own status edits by the block it recorded writing, not by the shape of the edit, and a person's block-only edit gets the status reconciled instead of standing.

What changed

  • Write provenance in a new module, pullRequestStatusProvenance.ts. Right before each PATCH, under the body lock, the sync records the block it is about to leave in the body, or its removal. Records are kept in-process and shared through Redis with a 6-hour expiry, keeping the last 8 writes per PR so a burst of updates with several webhooks in flight still matches. Recording happens before the PATCH, so the webhook it causes can never arrive ahead of its record. A failed record is logged and only costs one extra status read.
  • Webhook classification replaces the old own-edit predicate. A block-only edited event is "own" only when the resulting block, or its absence, is a recorded write. Comparison is exact, update time included, with CRLF normalised for browser saves. Anything else is "foreign": the handler schedules a status update for that PR and returns an accepted, seat-free disposition with reason pull_request_status_block_edited, without running any other handler. Own edits are still ignored as before.
  • Redis access for the webhook process is registered with the signal module when sync is enabled, so the webhook module stays off the heavy sync import graph. A process that does not maintain the status has no record to consult and treats block-only edits as foreign, where the reconcile request is a no-op.
  • Docs: the pr-status page now says how own edits are recognised and what happens when a person deletes or rewrites the line.

Sibling check. The other body writers keep the block, so their edits are never block-only and were never affected. The block a new PR is created with is written by an opened event, not an edit, and is not recorded, so a person deleting it is correctly reconciled. A removal ProPR makes on close or merge is recorded and recognised as its own.

Tests. Five new tests cover: a cross-process own edit matched only through Redis, human deletion, human replacement of the block text, deletion of the creation block, and the removal case on a closed PR, plus the record-before-PATCH ordering and CRLF matching. All four human-edit tests fail on the old classification and pass now. Results:

Suites Result
Core status suites + routing payload 111 pass
Root webhook suites (intent withdrawal, delivery interest, repository filter) 213 pass
Core typecheck, lint on changed files, core dist build clean

No visual change, so no preview was captured.


🤖 Implementation Details

  • Model: Claude Fable 5.1 (high)
  • Requested By: @propr-ultrafix
  • Time: 16m 35s
  • Tokens: 2,997,539 (2,963,671 in / 33,868 out)
  • Cost: $3.82

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…tus edits by the block it recorded writing, not by the shape of the edit, and a person's block-only edit gets the status reconciled instead of standing.

F22 is fixed and verified. ProPR now recognises its own status edits by the block it recorded writing, not by the shape of the edit, and a person's block-only edit gets the status reconciled instead of standing.

**What changed**

- **Write provenance** in a new module, `pullRequestStatusProvenance.ts`. Right before each PATCH, under the body lock, the sync records the block it is about to leave in the body, or its removal. Records are kept in-process and shared through Redis with a 6-hour expiry, keeping the last 8 writes per PR so a burst of updates with several webhooks in flight still matches. Recording happens before the PATCH, so the webhook it causes can never arrive ahead of its record. A failed record is logged and only costs one extra status read.
- **Webhook classification** replaces the old own-edit predicate. A block-only `edited` event is "own" only when the resulting block, or its absence, is a recorded write. Comparison is exact, update time included, with CRLF normalised for browser saves. Anything else is "foreign": the handler schedules a status update for that PR and returns an accepted, seat-free disposition with reason `pull_request_status_block_edited`, without running any other handler. Own edits are still ignored as before.
- **Redis access for the webhook process** is registered with the signal module when sync is enabled, so the webhook module stays off the heavy sync import graph. A process that does not maintain the status has no record to consult and treats block-only edits as foreign, where the reconcile request is a no-op.
- **Docs**: the pr-status page now says how own edits are recognised and what happens when a person deletes or rewrites the line.

**Sibling check.** The other body writers keep the block, so their edits are never block-only and were never affected. The block a new PR is created with is written by an `opened` event, not an edit, and is not recorded, so a person deleting it is correctly reconciled. A removal ProPR makes on close or merge is recorded and recognised as its own.

**Tests.** Five new tests cover: a cross-process own edit matched only through Redis, human deletion, human replacement of the block text, deletion of the creation block, and the removal case on a closed PR, plus the record-before-PATCH ordering and CRLF matching. All four human-edit tests fail on the old classification and pass now. Results:

| Suites | Result |
|---|---|
| Core status suites + routing payload | 111 pass |
| Root webhook suites (intent withdrawal, delivery interest, repository filter) | 213 pass |
| Core typecheck, lint on changed files, core dist build | clean |

No visual change, so no preview was captured.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Fable 5.1
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Ultrafix stopped before reaching its goal. Requested goal: 8/10. Last score: unknown. Max cycles were exhausted, so manual review and merge are now required.

integry commented Nov 13, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=8 max=3

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

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

First action: /review

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

@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements the revised scope well overall, but needs a localized correction before merge: historical write provenance can cause human edits to leave the live status missing or stale.

✅ Unified computation — Body updates and MCP reads share the same status computation, including pending checks, failures, and unknown mergeability.

✅ Body preservation — Status synchronization re-reads the description after gathering facts and checks its renewable lease before proceeding.

✅ Revised setting scope — prTitleStatus defaults on across the configuration surfaces and does not gate the body block.

The supplied current checks show no failures; five remain pending. This review is a static analysis of the supplied code; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F23: 🔴 Historical provenance suppresses legitimate reconciliation

  • Required behavior: The live block must remain present and current on every open ProPR-created pull request; only ProPR’s own status edits should be ignored.

  • Evidence: packages/core/src/services/pullRequestStatus/pullRequestStatusProvenance.ts, isRecordedPullRequestStatusWrite; packages/core/src/webhook/pullRequestStatusWebhook.ts, classifyPullRequestStatusEdit.

    1. A ProPR pull request closes. Status synchronization removes its block and records the empty string as a recent write.
    2. The pull request reopens within the six-hour Redis retention period. Synchronization restores its block, retaining the earlier empty-string record.
    3. After those updates settle, a person deletes the restored block.
    4. The resulting block-only edited webhook matches the historical empty-string record. Classification returns own, and processWebhookEvent returns before scheduling reconciliation.

    The open pull request remains without its required block until another transition occurs. Similarly, restoring an earlier recorded block can leave an outdated status displayed. The body lock does not govern browser edits, and the provenance lookup accepts any of eight historical values rather than checking whether the delivered value is still the intended current value. Local records also have no expiration.

    static trace: traced removal recording, historical retention, membership-based classification, and the webhook’s early return in the supplied diff.

  • Minimum fix: Reconcile events whose resulting block differs from the latest intended block, even when it matches an older recorded write. Retain historical records only for recognizing delivery history, without allowing them to suppress restoration of the current status. Cover close → reopen → human deletion and restoration of an older block.

Suggestions

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

S13: 🟢 Bound local provenance retention

The localWrites map retains every encountered PR indefinitely, despite the documented six-hour recognition window. Expiring local entries would bound memory usage in long-running processes and align local behavior with Redis. This resource cleanup is optional and separate from correcting historical-write classification.

Score

The shared computation, scope adjustment, and extensive regression coverage are strong. One verified reconciliation defect remains; the supplied checks otherwise show no failures.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 11s
  • Tokens: 135,252 (133,725 in / 1,527 out)
  • Cost: $1.30

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 F23 S13

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit ae529a5

Addressed 1 AI review comment (IDs: 6862957098)

Addressed finding F23

Summary of Changes

I fixed F23. ProPR now ignores a block-only edited webhook only when the block it leaves is the latest one ProPR meant to write. Matching any block it wrote at some point is no longer enough.

The fix (packages/core/src/services/pullRequestStatus/pullRequestStatusProvenance.ts)

  • The list of eight past writes is replaced by one record per pull request: the latest block ProPR is about to write (empty for a removal), with the time it was recorded. Each write replaces the previous record. The record is still made before the PATCH, kept in this process, and shared through Redis.
  • isRecordedPullRequestStatusWrite takes the newer of the in-process and Redis records and compares its block exactly with the delivered block.
    • Close, reopen, then a person deletes the block: the old removal record has been replaced, so the event counts as someone else's edit and the status is reconciled.
    • A person restores an older block: it doesn't match the latest record either, so the current status is written back.
  • In-process records now expire after the same six hours as the Redis ones.
  • Trade-off: past writes are no longer kept to recognise late deliveries. If ProPR writes twice in quick succession, the webhook from the first write now triggers a reconcile. That costs one status read and no PATCH, because the body already holds the latest block. Keeping past writes would bring the defect back.

I checked the other places that use provenance. classifyPullRequestStatusEdit is the only reader and status sync is the only writer; the other body writers keep the block as it is, so their edits are never block-only. One race remains and can't be closed: a person editing the body between ProPR's record and its PATCH. GitHub has no conditional body update.

New tests (packages/core/test/pullRequestStatusSync.test.ts), each checked with and without the Redis record:

  • Close, reopen, then a person deletes the restored block: the edit is treated as someone else's, the status update is scheduled, and the block comes back.
  • A person puts back an earlier block after the status changed: it is reconciled to the current "Ready".
  • A recorded write in this process stops counting after six hours.

All three fail against the previous code. The three status suites pass (70, 33 and 8 tests), core typechecks, and lint is clean on the changed source file. The existing tests still pass, including those for ProPR's own write, its removal on a closed pull request, and browser line endings. There is no visual change, so I didn't capture a preview.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 6m 14s
  • Tokens: 788,022 (778,207 in / 9,815 out)
  • Cost: $0.61
  • Subscription usage: Fable +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…k only when the block it leaves is the latest one ProPR meant to write. Matching any block it wrote at some point is no longer enough.

I fixed F23. ProPR now ignores a block-only `edited` webhook only when the block it leaves is the latest one ProPR meant to write. Matching any block it wrote at some point is no longer enough.

**The fix** (`packages/core/src/services/pullRequestStatus/pullRequestStatusProvenance.ts`)
- The list of eight past writes is replaced by one record per pull request: the latest block ProPR is about to write (empty for a removal), with the time it was recorded. Each write replaces the previous record. The record is still made before the PATCH, kept in this process, and shared through Redis.
- `isRecordedPullRequestStatusWrite` takes the newer of the in-process and Redis records and compares its block exactly with the delivered block.
  - **Close, reopen, then a person deletes the block:** the old removal record has been replaced, so the event counts as someone else's edit and the status is reconciled.
  - **A person restores an older block:** it doesn't match the latest record either, so the current status is written back.
- In-process records now expire after the same six hours as the Redis ones.
- **Trade-off:** past writes are no longer kept to recognise late deliveries. If ProPR writes twice in quick succession, the webhook from the first write now triggers a reconcile. That costs one status read and no PATCH, because the body already holds the latest block. Keeping past writes would bring the defect back.

I checked the other places that use provenance. `classifyPullRequestStatusEdit` is the only reader and status sync is the only writer; the other body writers keep the block as it is, so their edits are never block-only. One race remains and can't be closed: a person editing the body between ProPR's record and its PATCH. GitHub has no conditional body update.

**New tests** (`packages/core/test/pullRequestStatusSync.test.ts`), each checked with and without the Redis record:
- Close, reopen, then a person deletes the restored block: the edit is treated as someone else's, the status update is scheduled, and the block comes back.
- A person puts back an earlier block after the status changed: it is reconciled to the current "Ready".
- A recorded write in this process stops counting after six hours.

All three fail against the previous code. The three status suites pass (70, 33 and 8 tests), core typechecks, and lint is clean on the changed source file. The existing tests still pass, including those for ProPR's own write, its removal on a closed pull request, and browser line endings. There is no visual change, so I didn't capture a preview.

PR: #3535
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 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 13, 2026

Copy link
Copy Markdown
Contributor Author

⏳ Ultrafix is waiting for CI before the next /review.

These blocking checks on ae529a5 are holding the loop back:

  • Full Test Suite Shard 2/4 — not finished
  • Full Test Suite Shard 4/4 — not finished
  • Full Test Suite Shard 3/4 — not finished
  • Full Test Suite Shard 1/4 — not finished
  • Classify changed surfaces — not finished
  • Validate Changes — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished

Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops.

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements a shared status computation, live body maintenance, and MCP status fields while honoring the revised, title-only prTitleStatus setting. Static review found no verified merge blocker. Merge readiness is conditional on the two pending checks completing successfully.

✅ Scope change implemented — Body updates have no repository setting gate; prTitleStatus defaults on and is exposed across configuration, API, MCP, CLI, UI, and documentation.

✅ Conservative readiness — The computation prevents ready when checks are incomplete, mergeability is unknown, or ProPR work remains active.

✅ Body preservation and recovery — Status updates re-read the body after gathering facts, validate the status subject, and use a renewing shared lock. Added tests cover concurrent writers, human edits, pagination, and reconciliation retries.

This assessment uses the supplied diff and context only; no commands or tests were run. The authoritative check summary reports 32 passed, two pending, and no failures.

Merge blockers

No merge blockers.

Suggestions

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

S14: 🟢 Share queued-job snapshots

countQueuedPullRequestJobs retrieves the entire waiting, delayed, and prioritized queue for each PR. A list request can repeat that scan 20 times. Consider sharing one queue snapshot within a list request or reconciliation batch. This is an optional efficiency improvement; the supplied evidence does not demonstrate a production performance failure.

S15: 🟢 Evict expired provenance entries

pullRequestStatusProvenance.ts removes expired local records only when that particular PR is queried again. Records for inactive or closed PRs can therefore remain in localWrites for the process lifetime. Opportunistic cleanup or a bounded cache would improve long-running process hygiene. No material memory impact is established here, so this is non-blocking.

Score

The implementation follows the amended objective and includes substantial coverage of state transitions and recovery boundaries. No actionable defect was verified; the remaining checks are pending rather than failed.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 57s
  • Tokens: 137,144 (135,996 in / 1,148 out)
  • Cost: $1.31

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 S14 S15

🤖 Review by ProPR

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