Repository navigation
Description
Problem
To learn whether a ProPR pull request is being worked on, waiting for CI, stuck, or ready to merge, an operator has to open it and read the comment thread. Nothing in ProPR computes that answer in one place: Ultrafix has its own readiness check, the MCP tools return raw reviews and checks, and the UI derives its own view.
What to build
1. One status computation. Add a single function in @propr/core that returns the status of a ProPR pull request. Every surface in this plan, and the MCP tools, must use it; do not add a second derivation.
The status has a persistent state and a live detail:
state |
When |
|---|---|
working |
A ProPR task for this PR is queued or running (implementation, follow-up, review, conflict resolution), or an Ultrafix loop is active (including while it waits for CI), or checks on the current head are still pending after ProPR's last push. |
needs_attention |
Nothing is running and one of: the last ProPR run on the PR failed; an Ultrafix loop ended without reaching its goal (cycles exhausted, failed, stopped on CI timeout); a check on the current head failed and no CI follow-up is queued; the PR conflicts with its base and no resolution is queued, or the resolution failed; the latest review score is below the instance Ultrafix rating goal. |
ready |
Nothing is running, every check on the current head has completed and passed, the PR does not conflict with its base, and the latest review score (when the PR has been reviewed) meets the instance Ultrafix rating goal. |
none |
The PR is closed or merged, or is not a ProPR pull request. |
ready must never be reported from the review score alone. Today Ultrafix can declare goal_reached on a commit whose checks later fail; in that case the status is working while checks are pending and needs_attention once one fails.
detail carries what is happening right now, for display: the activity (implementing, follow-up in progress, review in progress, resolving conflicts, waiting for CI), the Ultrafix cycle and maximum when a loop is active, the latest review score, a checks summary (passed / failed / pending counts), the reason for needs_attention, and for epic PRs the merged and total issue counts.
2. A per-repository setting. Add a boolean repository setting prStatusDisplay, off by default, across every surface repository settings have (config type and loader, API validation, MCP update_repository_configuration, the settings catalog, CLI, UI, generated settings docs). autoAssignPullRequests is a working example of each surface. This setting gates the body block below and the title slot added by the next issue.
3. A live status block at the top of the PR body. When the setting is on, ProPR keeps a short block as the first thing in the body of every open pull request it created, delimited by HTML comment markers so it can be found and replaced. One line, for example:
ProPR 🔨 Follow-up in progress · Ultrafix cycle 3 of 10 · last review 6/10 · checks: 31 passed, 4 pending · updated 09:41 UTC
ProPR ✅ Ready · review 8/10 · checks: 35 passed · updated 10:02 UTC
ProPR
⚠️ Needs you · Ultrafix stopped after 10 cycles at 6/10 · updated 10:15 UTC
Update it on every change of state or detail. Body edits leave no timeline entry, so this block may change often. When the PR is merged or closed, replace it with nothing (remove the block).
4. Expose the status through MCP. Add the computed status to get_pull_request, list_pull_requests and get_work_overview results so agents and operators read the same answer the PR shows.
Requirements
- The block is only ever written between its own markers. The rest of the body, including a human's edits and the existing sections (implementation summary, visual preview section and slot, continuation markers, the epic issue list and
Fixes #lines), is preserved byte for byte. - Other ProPR code that rewrites a PR body (visual preview publication, the epic body builder, goal PR completion, the upload-failure rewrite) must not drop or duplicate the block. Route body writes through one helper that re-reads the current body and preserves the block, or otherwise guarantee this, and test it.
- No PATCH is sent when the rendered block is unchanged.
- ProPR's own body edits arrive back as
pull_requesteditedwebhooks. They must not trigger another status update or any agent work. - A failed status update never fails the task, review or loop that triggered it; it is logged and retried on the next transition.
- With the setting off, behaviour is unchanged and no block is written. Turning the setting off removes the block from open PRs on their next transition.
Acceptance criteria
- One exported function computes the status; the body block and the three MCP tools all use it.
- Each row of the state table has a test, including: goal reached while checks are pending is
working; goal reached with a failed check isneeds_attention; reviewed below the goal with nothing running isneeds_attention; never reviewed with passing checks isready. - With the setting on, a new issue PR is created with the block already in its body, and the block changes through follow-up start, review start, review completion with a score, Ultrafix cycle, CI wait, and loop end.
- A body containing a human edit, a visual preview section and a continuation marker keeps all three unchanged across a status update, and a visual preview publication keeps the status block.
- An
editedwebhook caused by a status update produces no further GitHub write. - The block is removed when the PR is merged or closed.
- The setting appears in the API, MCP, CLI, UI and generated settings docs, and the settings catalog guard tests pass.
-
docs/describes the block, the states and the setting;CHANGELOG.mdhas an entry.
Implementation
Starting points (verify each before relying on it):
- Existing partial readiness logic:
src/jobs/ultrafixReadinessPolicy.ts(checkReadiness),evaluateReadinessinsrc/jobs/ultrafixLoopContinuationHelpers.ts, and the PR inventory/correlation inpackages/api/mcp/pullRequestInventory.ts. Review scores:packages/core/src/services/reviewScoreStore.ts(loadPullRequestScoreHistory). - Transitions to hook: follow-up start/end (
src/jobs/processPullRequestCommentJob.ts,src/jobs/prCommentPostExecution.ts,src/jobs/prCommentTaskFinalizer.ts,handleJobErrorinsrc/jobs/prCommentJobUtils.ts); review start/complete (src/jobs/prCommentReviewJob.ts,persistReviewScores); Ultrafix start, cycle and end (src/jobs/ultrafixOrchestrationService.ts,src/jobs/ultrafixLoopContinuation.ts,finishUltrafixLoop); CI wait (src/jobs/ultrafixCiWait.ts); check run completion and CI failure follow-up (packages/core/src/webhook/checkRunHandler.ts,ciFailureFollowup.ts); conflicts (packages/core/src/webhook/mergeConflictAutoResolve.ts,mergeConflictDetector.ts,src/jobs/processMergeConflictJob.ts); PR creation (src/jobs/issueJobHelpers.ts,src/jobs/goalCheckpointPublisher.ts,packages/core/src/services/epicPRService.ts,packages/core/src/webhook/epicPRHandler.ts). - Body writers to keep consistent:
src/jobs/issueJobHelpers.ts,src/github/visualPreviewAttachments.ts(publishPullRequestVisualPreviews),src/jobs/goalPullRequestCompletion.ts,src/jobs/goalVisualPreviewPublisher.ts,updateEpicPRBodyinpackages/core/src/webhook/epicPRHandler.ts. - An existing edit-in-place-by-marker helper that skips unchanged bodies:
syncTrackingCommentinpackages/core/src/webhook/epicMergeProgress.ts. pull_requestevents all pass throughhandlePlanPRUpdateinpackages/core/src/webhook/planIssueTracking.ts; there is no sender filter today.- Repository setting surfaces:
packages/core/src/config/configManager.ts,packages/core/src/daemon/configLoader.ts,packages/api/routes/configRepoValidation.ts,packages/api/mcp/toolsManagement.ts,packages/api/mcp/settingsCatalog.ts,packages/cli/src/commands/repoCommands.ts,packages/cli/src/api/repos.ts,propr-ui/src/hooks/useRepositoryManagement.ts,scripts/generate-settings-docs.mjs. Guard tests:packages/api/test/settingsCatalog.test.ts, the OpenAPI route and response tests,mcpObservableSurface,mcpDocs,mcpToolInputBudget.
Prefer one small module that owns computePullRequestStatus, the block renderer and a syncPullRequestStatus(repository, number) entry point the hooks call. Serialize updates per PR so two transitions cannot interleave their read-modify-write of the body.
Activity
propr-dev commentedon Nov 13, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53529/claude-opus-5-5-compute-one-pr-status-and-20261113-0955-6iz3529-epic-pr-status-cuiissue-3529-20261113-0955-claude-opus-5-5-6iz🔍 Track Task Execution
propr-dev commentedon Nov 13, 2026
❌ AI processing failed before producing publishable work.
System Error:
Failed to authenticate. API Error: 403 Attention Required! | Cloudflare
AI Processing Failed
Execution Details:
Summary:
Failed to authenticate. API Error: 403 Attention Required! | Cloudflare
Detailed Logs:
7c7fc38a-ff9e-477b-a58a-4646c0508290Log files stored at:
/usr/src/app/logs/executions/issue-3529-2026-11-13T10-15-26-452Z-conversation.json/usr/src/app/logs/executions/issue-3529-2026-11-13T10-15-26-452Z-output.txtLatest Conversation Messages
This processing report was generated automatically by ProPR for issue #3529.
propr-dev commentedon Nov 13, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53529/claude-opus-5-5-compute-one-pr-status-and-20261113-1020-mgy3529-epic-pr-status-cuiissue-3529-20261113-1020-claude-opus-5-5-mgy🔍 Track Task Execution
I've implemented issue #3529. The affected suites pass (137 files); t…
I've implemented the text changes for items 1–4 and the task-id fix i…
[3673 by Claude Opus 5.5] Bot comments and PR bodies: say what failed…