Skip to content

[3530 by Claude Opus 5.5] Show the PR state as one leading emoji in the PR title - #3539

Merged
integry merged 2 commits into
3529-epic-pr-status-cuifrom
3530/claude-opus-5-5-show-the-pr-state-as-one--20261113-2040-5cl
Nov 13, 2026
Merged

integry merged 2 commits into
3529-epic-pr-status-cuifrom
3530/claude-opus-5-5-show-the-pr-state-as-one--20261113-2040-5cl

Conversation

@propr-dev

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

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3530

Branch: 3530/claude-opus-5-5-show-the-pr-state-as-one--20261113-2040-5cl
Commits: ✅ Changes committed (827d4a2)


AI Processing Completed

Execution Details:

Summary:
Two of my background wait commands were stopped by their time limits; neither needs restarting. They never fired because the process check in each one matched its own command line, so it always looked like the tests were still running.

They were only waiting on test runs I had already re-run and read directly, and those all passed. Nothing in my earlier report changes.

Detailed Logs:

  • Conversation: 312 messages
  • Session: 23259e5a-f6da-4dd4-a1eb-ce2fa80be26e

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3530-2026-11-13T21-19-50-362Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3530-2026-11-13T21-19-50-362Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Two of my background wait commands were stopped by their time limits; neither needs restarting. They never fired because the process check in each one matched its own command line, so it always looked...


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


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

… neither needs restarting. They never fired because the process check in each one matched its own command line, so it always looked like the tests were still running.

They were only waiting on test runs I had already re-run and read directly, and those all passed. Nothing in my earlier report changes.
@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 adds a shared title-slot format and integrates it with status synchronization, creation, merging, and UI parsing. It needs a localized correctness fix before merge.

✅ Shared parsing — Creation, task titles, UI consumers, and merge helpers use the same strict leading-slot pattern.

✅ Controlled updates — State settling, unchanged-title checks, and combined body/title writes reduce unnecessary renames.

✅ Lifecycle coverage — Tests cover status transitions, manual removal, closure, configuration failures, and webhook suppression.

The supplied current-head status reports no failures and five pending checks. This review is a static analysis; no commands were run.

Merge blockers

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

F1: 🔴 Failed writes suppress future title updates

  • Required behavior: Failed status updates must remain recoverable. A rejected title write must not be treated as evidence that a person removed a successfully written slot.

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

    static trace:

    1. An existing ProPR PR has no title slot, and its computed status is ready. Synchronization waits for settling, then decides to add ✅.
    2. Before awaiting the GitHub PATCH, synchronization records ✅ in both local provenance and Redis.
    3. GitHub rejects the PATCH without applying it. The title remains unslotted, but the recorded slot remains ✅.
    4. On the next synchronization, currentSlot === null and recordedSlot(...) === desiredSlot. The manual-removal branch returns UNCHANGED, suppressing the retry.

    The PR can remain without its status slot until the desired slot changes or the record expires after 30 days. The same failure affects an immediate working insertion into an unslotted title. The body lock serializes these operations but does not distinguish an intended write from an applied write. Scheduled retries encounter the same suppression branch. The supplied fake GitHub implementation always accepts PATCH requests, so existing tests do not exercise this recovery path.

  • Minimum fix: Distinguish pending title-write provenance from confirmed title state. Preserve early webhook recognition, but do not use a rejected or unconfirmed write to suppress insertion as a manual removal. Add a regression covering a rejected insertion followed by successful synchronization with the same desired slot.

Suggestions

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

S1: 🟢 Exercise successful creation configuration

The new creation test verifies disabled maintenance and configuration-read failure, but never successfully reads an enabled or disabled repository setting. Add coverage asserting that enabled configuration produces the initial hammer slot and disabled configuration preserves the title. This is optional additional coverage; the supplied creation logic itself does not establish another blocker.

Score

The implementation is cohesive and has useful transition coverage, but failed-write bookkeeping can prevent recovery of the feature’s primary output. A localized fix and regression test are needed; current checks have no reported failures but remain incomplete.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 53s
  • Tokens: 72,497 (71,302 in / 1,195 out)
  • Cost: $0.64

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 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 5a64035

Addressed 1 AI review comment (IDs: 6865299371)

Addressed finding F1

Summary of Changes

I fixed F1: when GitHub rejects a title update, ProPR no longer treats that as a person removing the status emoji, so the emoji is written again on the next update.

What was wrong: ProPR saved the emoji it was about to write before sending the update, so the webhook GitHub sends back is recognised as ProPR's own edit however fast it arrives. If GitHub rejected the update, that saved emoji stayed. On the next update the title had no emoji but the saved one matched what was wanted, so ProPR read it as "a person removed it" and skipped the retry. That lasted until the status changed or the saved record expired after 30 days.

The fix:

  • pullRequestStatusTitle.ts:
    • The saved emoji now has a pending flag. A new recordPendingPullRequestTitleSlot saves it as pending before the update. The existing recordPullRequestTitleSlot saves it as confirmed.
    • Only a confirmed emoji counts as one a person removed. A pending one is written again.
    • Webhook recognition still accepts pending records, so a webhook that arrives before GitHub answers is still treated as ProPR's own.
    • When the title already shows the wanted emoji and the saved one is still pending, it is now marked confirmed.
    • Records saved before this change have no flag and are treated as confirmed, which is what they meant before.
  • pullRequestStatusSync.ts: saves the emoji as pending before the update and confirms it only after GitHub accepts. If the update fails, the record stays pending and the next sync retries.

If the update actually went through but its response was lost, the next sync sees the emoji in the title and confirms it. If a person removed it in that short gap, it comes back once. That's the trade-off I chose for "unconfirmed".

Same problem elsewhere: I checked the status block in the description, which uses the same save-before-update pattern. It isn't affected: that saved record is only used to recognise webhooks, and the sync always compares the description itself with what it should be, so a rejected update is retried.

Tests: in packages/core/test/pullRequestStatusTitle.test.ts, the fake GitHub can now reject an update, and there are two new tests:

  • A rejected ✅ followed by a successful sync wanting the same ✅. It also checks that the webhook arriving mid-update is still treated as ProPR's own, that a fresh process reading only from Redis retries too, and that removing the emoji by hand is respected again once GitHub has accepted it.
  • A rejected 🔨 followed by a retry that adds it.

Both new tests fail on the previous code and pass with the fix. The four status suites pass (125 tests), core typechecks, and lint passes on the changed source files. There's no visible change, so I made no preview.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 7m 8s
  • Tokens: 1,079,368 (1,068,018 in / 11,350 out)
  • Cost: $0.78

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

…nger treats that as a person removing the status emoji, so the emoji is written again on the next update.

I fixed F1: when GitHub rejects a title update, ProPR no longer treats that as a person removing the status emoji, so the emoji is written again on the next update.

**What was wrong:** ProPR saved the emoji it was about to write before sending the update, so the webhook GitHub sends back is recognised as ProPR's own edit however fast it arrives. If GitHub rejected the update, that saved emoji stayed. On the next update the title had no emoji but the saved one matched what was wanted, so ProPR read it as "a person removed it" and skipped the retry. That lasted until the status changed or the saved record expired after 30 days.

**The fix:**
- **`pullRequestStatusTitle.ts`:**
  - The saved emoji now has a pending flag. A new `recordPendingPullRequestTitleSlot` saves it as pending before the update. The existing `recordPullRequestTitleSlot` saves it as confirmed.
  - Only a confirmed emoji counts as one a person removed. A pending one is written again.
  - Webhook recognition still accepts pending records, so a webhook that arrives before GitHub answers is still treated as ProPR's own.
  - When the title already shows the wanted emoji and the saved one is still pending, it is now marked confirmed.
  - Records saved before this change have no flag and are treated as confirmed, which is what they meant before.
- **`pullRequestStatusSync.ts`:** saves the emoji as pending before the update and confirms it only after GitHub accepts. If the update fails, the record stays pending and the next sync retries.

If the update actually went through but its response was lost, the next sync sees the emoji in the title and confirms it. If a person removed it in that short gap, it comes back once. That's the trade-off I chose for "unconfirmed".

**Same problem elsewhere:** I checked the status block in the description, which uses the same save-before-update pattern. It isn't affected: that saved record is only used to recognise webhooks, and the sync always compares the description itself with what it should be, so a rejected update is retried.

**Tests:** in `packages/core/test/pullRequestStatusTitle.test.ts`, the fake GitHub can now reject an update, and there are two new tests:
- A rejected `✅` followed by a successful sync wanting the same `✅`. It also checks that the webhook arriving mid-update is still treated as ProPR's own, that a fresh process reading only from Redis retries too, and that removing the emoji by hand is respected again once GitHub has accepted it.
- A rejected `🔨` followed by a retry that adds it.

Both new tests fail on the previous code and pass with the fix. The four status suites pass (125 tests), core typechecks, and lint passes on the changed source files. There's no visible change, so I made no preview.

PR: #3539
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 adds a shared title-status format, integrates it into status synchronization, and updates title consumers and merge paths. It is merge-ready within the supplied scope, conditional on the two pending checks completing successfully.

✅ Consistent slot parsing — Shared helpers recognize only a leading status slot, preserve the remaining title, and handle both warning-emoji variants.

✅ Controlled updates — Title and body changes share the existing lock and PATCH request. Pending versus confirmed title records distinguish rejected writes from subsequent manual removal.

✅ Relevant regression coverage — Added tests cover lifecycle transitions, rejected renames, webhook suppression, title limits, Epic detection, and merge-title sanitization.

This assessment is based on static review of the supplied code; no commands or tests were run. The authoritative check summary reports zero failures, 21 passes, and two pending checks.

Merge blockers

No merge blockers.

Suggestions

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

S2: 🟢 Exercise successful creation decoration

The new creation test in packages/core/test/pullRequestStatusTitle.test.ts covers disabled maintenance and unavailable configuration, but never verifies successful decoration with maintenance enabled and the setting readable. Add assertions for enabled and explicitly disabled repository settings. This is optional coverage for behavior whose implementation is otherwise straightforward.

S3: 🟢 Test scheduled settling across processes

The title tests manually call synchronization twice, while production settling also depends on finishScheduled and process-local pendingSettles. A follow-up test exercising automatic scheduling, including transitions observed by separate API and worker processes, would strengthen confidence in the debounce behavior. The supplied context enables synchronization in both processes; existing tests primarily exercise one process’s state.

Score

The implementation is cohesive and has substantial targeted coverage, with no verified merge blocker in the supplied changes. Remaining uncertainty concerns scheduler integration coverage and the two pending checks.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 13s
  • Tokens: 76,869 (75,215 in / 1,654 out)
  • Cost: $0.73

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 S2 S3

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 13, 2026
@integry
integry merged commit f22a67c into 3529-epic-pr-status-cui Nov 13, 2026
44 checks passed
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