Repository navigation
[3622 by Claude Opus 5.5] Bot comments: empty failed-review shells, repeated failure and CI comments, internal paths in PR bodies, rate-limit notices that contradict themselves - #3654
propr-dev[bot] wants to merge 8 commits into
Conversation
…ean for root `src/`, core and shared. The 7 new test files and about 130 affected existing suites pass. What caused the #3556 sequence (for the PR description) I traced this from the issue's label timeline: 1. 16:57:52 – The weekly-limit message `resets Nov 18, 4pm (UTC)` didn't match the reset parser, which only handled `resets 4pm (UTC)`. It fell back to "next hour + 2 min", which produced "Reset time: 5:02 PM UTC" next to the weekly limit. 2. Seconds later (6–50 s) – To mark the wait, ProPR added `AI-waiting` and removed `AI-processing`. The webhook handles that label event like any unrelated one: it reads the issue's current labels and admits it unless an exclusion label is present. The exclusion list had `-processing`, `-done` and `-cancelled`, but not `-waiting` (the poller does exclude it). So ProPR's own label swap started a new task. Each new task hit the limit again and scheduled one more delayed retry. 3. "approximately 2 hours" then "less than an hour" – The same 6:02 PM reset was rounded with `ceil` in one notice and as "< 1 hour" in the next. 4. 18:02, after `AI-done` and PR #3587 – The three delayed retries woke up. Each was a child of the original dispatch, holding a snapshot of the labels from before `AI-done`. The "a sibling model set AI-done, keep going" exemption let all three start. The later cancel stopped all three, and each posted its own "Execution Cancelled". Changes by point 1. Reviews: A failed or invalid review now states one reason, carries `error="true"`, has no `/fix` block, links the task, and is counted as failed. The summary now reads "Posted 0 reviews, 1 failed". 2. Failure comments: These now give a one-sentence cause ("Provider authentication failed.", "The agent process stopped unexpectedly.") plus a task link. Container paths, HTML titles, `Comment ID: 0` and the `<synthetic>` model line are gone. An identical failure on the same PR and head within an hour updates the first comment with an occurrence count. This applies to merge-conflict, PR follow-up and issue failures. For follow-ups, the repeat's starting comment shrinks to a one-line pointer so its comment-ID receipts survive. 3. PR bodies: The "Detailed Logs" paths and "Latest Conversation Messages" block are replaced by `[View task details and logs](task page)`. The log files are still written. 4. CI failures: - Each head commit gets one comment, and later failures of that commit are added to it. - An aggregate job such as "Run Full Test Suite" is dropped when one of its own shards is listed. This is matched by name. - The "Commit:" link now points to the commit. - When ProPR edits that comment, a follow-up already queued or running is no longer aborted and restarted. 5. Rate limits: - `-waiting` is now in the webhook exclusion list. - Dated resets (`resets Nov 18, 4pm (UTC)`) now parse. - The notice shows one reset time tied to the named limit, an exact time remaining, and "Retry: once, at …". It no longer presents an estimate as the provider's reset time. - The retry is never scheduled before the stated reset. - A second task of the same issue run doesn't schedule another retry or post another notice. - A rate-limit retry skips an issue that already has `AI-done`. - Repeated start and cancel notices for the same event within 30 s are posted once. 6. Labels and ids: PR labels are added only if missing, re-checked on each attempt. The `-undefined-` task ids came from comments with no `updated_at`; those ids now omit that part. What's left - Point 5, "retried once": at most one retry is pending at a time per issue. A retry that hits the limit again schedules one more retry after the new reset; there is no hard cap of one in total. - Point 6, `AI` + `AI-done`: the current completion code already removes `AI` after adding `AI-done`, and I added a test for that. The closed issues showing both labels (e.g. #3531) have the label order of an older code path. I didn't change behaviour here. - Point 4, duplicate follow-up runs: there is no separate queued/running check for CI follow-ups on a different code path. With one comment per head, the comment itself is the guard. - Start notice: two genuine restarts of the same agent, model and branch within 30 s would also share one start comment. Things to know when reviewing - I changed six existing tests on purpose: - Three `reviewCommentFormatter` tests checked metadata using reviewer output that was invalid, which now renders as a failure, so they now use valid output. - `ciFailureFollowup` now counts only the per-check claim keys, because the new per-commit lock adds Redis calls. - `taskSubmissionLifecycle` and `issueUsageLimitRetry` mocks recorded the new comment lookup as a posted comment. - `redactSecrets` checked placeholders in the conversation preview, which is no longer published. - The `commentEventHandler` / `followupAssignmentGate` suites need `GIT_CLONES_BASE_PATH` and `GIT_WORKTREES_BASE_PATH` set here, because `/tmp/git-processor` is read-only in this container. - `goalContinuation` and `processGoalJob` failed after my parallel test runs left a half-migrated `data/propr.test.sqlite`. I moved it to `/tmp/staledb`, and both passed on rerun. - No visual previews: these changes are GitHub comment text, not app UI.
|
/ultrafix goal=8 max=6 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 6) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves failure reporting, review classification, and CI comment consolidation, but needs changes before merge: its new deduplication paths still permit duplicate work or lost updates under concurrent execution. ✅ Invalid reviews become failures — Invalid output receives the error marker, omits ✅ Retry completion guard — Rate-limit retries no longer use the dispatch-sibling exemption to continue past an existing done label. ✅ Cleaner completion reports — Public log paths and conversation previews are replaced with task links while log creation remains intact. This assessment uses static analysis of the supplied diff and context; no commands were run. The authoritative check summary reports no failures and five pending checks. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Retry deduplication is not atomic
F2: 🔴 Comment deduplication races across workers
F3: 🔴 Lock timeout permits concurrent CI publication
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Consolidate failure sentence formatting
ScoreThe reporting improvements are useful, but concurrent deduplication remains incorrect in three changed paths. The current checks show no failures, though five remain pending. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 8c6f508
Summary of ChangesI've fixed F1, F2 and F3. Each check-then-write now runs under a lock that also holds across workers. A caller that can't get the lock throws instead of going ahead without it. Typecheck and lint are clean for root and core. The new regressions fail on the old code and pass now, and the related existing suites pass. Shared lock (new
F1 – rate-limit retry: F2 – failure comments and notices: F3 – CI head lock:
Regression tests
My first concurrent F1 test passed even without the fix, because its fake lookup read the queue after its delay. It now takes the snapshot first, as in the finding. Limits that remain
Nothing in these changes is visible in a UI, so there are no previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 9 files changed, +517/−28 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…der a lock that also holds across workers. A caller that can't get the lock throws instead of going ahead without it. Typecheck and lint are clean for root and core. The new regressions fail on the old code and pass now, and the related existing suites pass. I've fixed F1, F2 and F3. Each check-then-write now runs under a lock that also holds across workers. A caller that can't get the lock throws instead of going ahead without it. Typecheck and lint are clean for root and core. The new regressions fail on the old code and pass now, and the related existing suites pass. **Shared lock (new `src/jobs/issueCommentLock.ts`)** - One process queues its own callers on the same key. Across workers it holds a Redis lock that expires after 30 s and is renewed while the work runs. - Before each GitHub write or queue add, the work confirms it still owns the lock (`assertHeld()`); if it has lost it, it throws. - A waiter gives up after 45 s, longer than the 30 s expiry, so only a holder that is still alive and renewing can make it time out. It then throws. - The worker passes the issue-job Redis connection to the lock at startup (`src/worker.ts`). **F1 – rate-limit retry:** `handleUsageLimitError` now takes the lock for the issue run before it does anything: the pending-retry lookup, the label swap, the notice and the scheduling. A second task of the run waits, then sees the first task's retry and skips. The lock is released when the handler returns or throws. If scheduling fails, no retry is left behind and the next task can claim again. **F2 – failure comments and notices:** `publishFailureComment` and `postNoticeOnce` now run their lookup, count and publication under the lock. The lock is per repository, issue and dedupe key. The occurrence count is read inside the lock. **F3 – CI head lock:** `withHeadLock` no longer publishes without the lock. - If the wait times out, it throws `CiFailureHeadLockTimeoutError`. The caller's existing cleanup then releases the per-check claim, so that failure can be delivered again. - A Redis error while acquiring now throws instead of going ahead unlocked. - The wait is now 40 s, longer than the lock's 30 s expiry. The lock is renewed during the work, and both the update and the new-comment post check it is still held first. Each retry of the post checks again. - A Redis error while renewing only counts as losing the lock once it has expired, as in `pullRequestBodyLock`. **Regression tests** - `test/issueRateLimitRetryGuards.test.ts`: - two tasks hit the limit at once and both reach the lookup before either schedules - a claim held by another worker makes the task wait, then see that worker's retry - a claim held for the whole wait throws - a failed scheduling releases the claim - `test/failureCommentDedupe.test.ts`: - concurrent first publication leaves one comment with count 3 - concurrent repeats add to the count correctly (4) - a cancel notice from three tasks at once is posted once - a lock held by another worker is waited for, or times out without posting - a lock taken over during the lookup stops the post - `test/ciFailureHeadComment.test.ts`: - a lock already held makes a different failing check throw with no extra comment or edit; its claim is released and a redelivery merges into the one comment - a lock lost before writing means nothing is written My first concurrent F1 test passed even without the fix, because its fake lookup read the queue after its delay. It now takes the snapshot first, as in the finding. **Limits that remain** - GitHub writes can't be fenced by Redis. If a lock lapses during a single slow GitHub request, that one write is not protected; this is the same window `pullRequestBodyLock` documents. - GitHub's comment list can briefly lag a POST that just finished; that external race isn't something the lock can close. - On a lock timeout, a failure comment or notice is now not posted (callers log the error) rather than posted twice. - A rate-limit timeout fails the job, the same way the existing "Unable to persist" error does. - Without a Redis connection set, for example in unit tests, the lock only serializes callers in the same process. Nothing in these changes is visible in a UI, so there are no previews. PR: #3654 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves failure reporting and adds meaningful deduplication guards, but needs changes before merge: comment lookup failures can still produce duplicate CI follow-ups, and failure deduplication trusts markers in comments without verifying their author. ✅ Invalid reviews become failures — Invalid output receives an error marker, omits ✅ Retry admission guards — Waiting labels now prevent fresh admission, and delayed rate-limit retries cannot use the sibling exemption to bypass ✅ Task links replace internal logs — Completion reports preserve log creation while removing public filesystem paths and conversation previews. This was a static review of the supplied code; no commands were run. Current checks show 23 passed, none failed, and one pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F4: 🔴 Verify authors before trusting deduplication markers
F5: 🔴 Do not treat failed CI lookup as absence
SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Consolidate lease implementation
S3: 🟢 Exercise queued CI comment updatesAdd an integration test where a second failure edits the CI comment while its original JSON remains in the pending batch. The new edit guard returns without updating that JSON, while the supplied pending consumer reads stored entries. Verify that the eventual agent request receives the latest failure evidence. The supplied excerpts do not establish whether another stage refreshes the comment, so this remains a verification follow-up rather than a proven blocker. ScoreThe implementation has useful focused coverage and passing current checks, but two publication defects undermine its central deduplication behavior. Both admit localized corrections. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
❌ ProPR could not start on The job failed 3 times before processing began: Post the command again once the cause is resolved. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves failure reporting, review accounting, and retry coordination, but needs changes before merge: CI comment aggregation can still create duplicate comments during lookup failures and discard updates to queued work. ✅ Failed-review accounting — Invalid output receives an error marker, omits ✅ Retry admission guards — Waiting issues are excluded from admission, and delayed rate-limit retries cannot bypass an existing done label. ✅ Concurrency coverage — New tests exercise concurrent publication, lock contention, and ownership loss. Current-head checks report 24 passed, none failed or pending. This is a static review of the supplied code; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F6: 🔴 Preserve queued CI comment updates
F7: 🔴 Do not publish after inconclusive lookup
SuggestionsThese are optional follow-ups and are not sent to S4: 🟢 Consolidate lease implementations
ScoreThe reporting improvements and passing checks are valuable, but two CI aggregation failure paths remain merge blockers. Both admit localized corrections. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 292f212
Summary of ChangesI've fixed F4, F5, F6 and F7. Typecheck and zero-warning lint are clean for root F4 – markers only count on ProPR's own comments (
F5 / F7 – a failed lookup is not treated as "no comment" (
F6 – queued CI comments pick up later failures (new
Found separately, not changed: the same early return also applies when the CI comment belongs to a BullMQ job that is still queued and hasn't started. That job keeps the comment body from when it was queued. Updating it would mean changing the job's data, which can race with a worker picking the job up, so I left it. The worker does swap in the current GitHub body when the comment's Review digestRisk-tiered paths
Validation evidence
Diff size: 7 files changed, +416/−38 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…nt are clean for root `src/` and core. About 45 affected suites pass. Each new regression for a failure path fails on the old code and passes now. I've fixed F4, F5, F6 and F7. Typecheck and zero-warning lint are clean for root `src/` and core. About 45 affected suites pass. Each new regression for a failure path fails on the old code and passes now. **F4 – markers only count on ProPR's own comments** (`src/jobs/failureCommentDedupe.ts`) - Comment summaries now keep the author. Both lookups (the failure count and the start/cancel notice) skip comments not written by one of ProPR's bot accounts, compared without case. This uses the same login set as the CI comment scan. - `@propr/core` is imported as a namespace. Eleven root test suites mock that module with a fixed list of exports, and a plain named import stopped them loading. If the function is missing they fall back to `GITHUB_BOT_USERNAME` and `propr-dev[bot]`. - New tests cover three cases: - A person's copy of the failure comment doesn't take the count, and the real bot comment is updated. The test fake now rejects edits to another author's comment, as GitHub does. - A copied marker on its own doesn't stop a new failure comment from being posted. - A copied notice marker doesn't suppress the notice. **F5 / F7 – a failed lookup is not treated as "no comment"** (`packages/core/src/webhook/ciFailureHeadPublication.ts`) - `findHeadComment` now returns `null` only when absence is confirmed: the remembered comment returned 404 or 410, and the full comment scan finished. - If the scan fails, or the remembered comment can't be read and no scan is possible, it throws `CiFailureHeadLookupError`. `publishHeadFailure` no longer catches that error. The existing outer handler releases the per-source claim, so the failure is delivered again, and nothing is posted. - If only the remembered read fails, a completed scan still decides. - New tests: a comment exists, both reads then fail, and no second comment is posted while the claim is released; the redelivery then merges into the one comment. Two more cover a failed remembered read with a working scan, and a failed read with no scan available. **F6 – queued CI comments pick up later failures** (new `packages/core/src/webhook/pendingCommentRefresh.ts`, used from `handleCommentEdited`) - When ProPR edits a CI-failure comment that is waiting in the pending list, the waiting record is updated before the edit is dropped. It gets the new body with the marker and trigger keywords stripped, the admission proof and parent hint, and `updated_at`. - The write only succeeds if the record hasn't changed since it was read, checked in a Redis script, and it retries up to 5 times. - If the batch has already claimed the record, or the list can't be read, the edit is processed normally, so the new failure isn't lost. - An older edit that arrives late doesn't overwrite a newer one. - New tests: a one-check comment edited to two checks is picked up with both, and a stale edit doesn't undo a newer one. A record claimed just before the edit leads to the edit being processed normally rather than dropped. **Found separately, not changed:** the same early return also applies when the CI comment belongs to a BullMQ job that is still queued and hasn't started. That job keeps the comment body from when it was queued. Updating it would mean changing the job's data, which can race with a worker picking the job up, so I left it. The worker does swap in the current GitHub body when the comment's `updated_at` changed after queueing, but only for records that carry `updated_at`. PR: #3654 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
CI failed: Full Test Suite Shard 1/4 Please investigate and fix this CI failure.
Failure evidence
|
Full Test Suite ResultsValidation failed during: Test shard (shard 1).
View shard 1/4 outputDetails truncated; see the uploaded artifacts for complete failure rows and logs. |
|
✅ Applied the requested follow-up changes in commit 23f371e Summary of ChangesI fixed shard 1. The only failing test was a timing race in What failed: Test 12, "a 409 keeps forcing registration through transient failures until one succeeds", expected 5 registrations and saw 4. This branch doesn't change anything under Cause: Near the end, the test fires a fake retry timer, then waits a fixed 100 event-loop turns for that registration to land. That registration includes database work, so on a busy runner it can take longer than 100 turns and the count is checked too early. The same 16 other tests in the file passed. Fix: The test now waits for the registration to finish instead of counting turns. An earlier step in the same test already waits this way. The 5-registration check is unchanged, so the test would still fail if the retry stopped registering again. Verification:
There are no visual previews because this only changes a test. Review digestRisk-tiered paths
Validation evidence
Diff size: 1 file changed, +2/−2 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
CI failed: Run Full Test Suite Please investigate and fix this CI failure.
Failure evidence
|
… `packages/api/test/mcpTunnelMode.test.ts`, and it had nothing to do with this PR's code. I fixed shard 1. The only failing test was a timing race in `packages/api/test/mcpTunnelMode.test.ts`, and it had nothing to do with this PR's code. **What failed:** Test 12, "a 409 keeps forcing registration through transient failures until one succeeds", expected 5 registrations and saw 4. This branch doesn't change anything under `packages/api`. **Cause:** Near the end, the test fires a fake retry timer, then waits a fixed 100 event-loop turns for that registration to land. That registration includes database work, so on a busy runner it can take longer than 100 turns and the count is checked too early. The same 16 other tests in the file passed. **Fix:** The test now waits for the registration to finish instead of counting turns. An earlier step in the same test already waits this way. The 5-registration check is unchanged, so the test would still fail if the retry stopped registering again. **Verification:** - **Old file:** 4 of 8 parallel runs failed on a loaded CPU. - **New file:** 0 of 8 failed under the same conditions. - **Single runs:** five runs of the new test alone all passed. - **Lint:** zero-warning lint on the file is clean. There are no visual previews because this only changes a test. PR: #3654 Comment by: @propr-dev[bot] (ID: 6944358100) Model: Claude Opus 5.5
|
ℹ️ Analyzed the follow-up request by @propr-dev[bot] Analysis SummaryI made no code changes: the failure you reported is already fixed on this branch. What failed: The failing run was on commit Already fixed: The latest commit on the branch, Checked here: I ran the whole test file 4 times, 3 of them at the same time to load the CPU. All 17 tests passed every time, with exit code 0. The next CI run on No visual previews, because this only touches a test. No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves failure reporting and consolidates repeated notifications, but needs changes before merge because queued CI follow-ups can lose newly reported failures. ✅ Failure review accounting — Invalid review output now produces an error-marked diagnostic without ✅ Serialized comment updates — Failure-comment publication uses shared Redis leases, and deduplication verifies bot authorship before updating an earlier comment. ✅ Clearer task reports — Completion reports replace container log paths and conversation excerpts with task links while retaining log generation. The authoritative checks show 24 passed, none failed or pending, and 17 neutral/skipped. This review uses static analysis of the supplied code; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F8: 🔴 Refresh queued CI follow-up bodies
SuggestionsThese are optional follow-ups and are not sent to S5: 🟢 Consolidate lease maintenance
ScoreThe reporting improvements and passing checks provide useful confidence, but the queued-comment revision loss leaves a correctness blocker in the CI consolidation path. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 1414a88
Summary of ChangesI fixed F8. When a check fails after a CI follow-up is queued, the follow-up now runs with every failure listed on the comment, and the queued job is still not aborted or restarted. The new regression fails on the old code at "the run input lists both failures" and passes now. What I changed instead of the proposed fix: the review suggested writing the edited body into the queued job's data from
Regression: the new test in
Checks: root and core typecheck pass, and zero-warning lint is clean on the changed files. I rebuilt core, and 19 related suites pass, including the edit-handler, PR comment job, publication and CI-failure suites. Found separately, not changed:
Review digestRisk-tiered paths
Validation evidence
Diff size: 6 files changed, +139/−10 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ed, the follow-up now runs with every failure listed on the comment, and the queued job is still not aborted or restarted. The new regression fails on the old code at "the run input lists both failures" and passes now. I fixed F8. When a check fails after a CI follow-up is queued, the follow-up now runs with every failure listed on the comment, and the queued job is still not aborted or restarted. The new regression fails on the old code at "the run input lists both failures" and passes now. **What I changed instead of the proposed fix:** the review suggested writing the edited body into the queued job's data from `handleCommentEdited`. I didn't, because that write can race a worker claiming the job. And once the worker has the job, it can write its own stale copy back (`ensurePRProcessingLockToken` calls `job.updateData(job.data)`) and undo the refresh. GitHub already holds the current body before the edit webhook fires. So I made the worker's own read of the PR's comments the place where the update is picked up. That read happens after the worker claims the job and after it takes the PR lock, just before it builds the request. - **Worker** (`src/jobs/prCommentJobHelpers.ts`, `validateAndFilterComments`): if the queued comment is a ProPR CI-failure comment, it takes the comment's current GitHub body, with markers and trigger keywords stripped the same way as when it was queued. This covers a job that is still delayed or waiting, one claimed but not yet at that read, and retries. It only applies when both the queued record and the GitHub comment are by ProPR's bot account, so a copy of the marker under another author changes nothing. The logic lives in the new small file `src/jobs/ciFailureCommentPickup.ts`, which keeps the helpers file under the 400-line lint limit. - **Core:** the new `packages/core/src/webhook/ciFailureCommentRevision.ts` turns a raw CI comment body into the request body. The worker and the existing pending-list refresh in `handleCommentEdited` both use it. The edit handler's early return is otherwise unchanged; only its comment now says where the update is picked up. **Regression:** the new test in `test/commentEventHandler.switch-use.test.ts` follows the scenario from the review: - A follow-up is queued for Lint, then a Lint+Typecheck edit arrives before the worker picks it up. - The job is not removed, aborted or reprocessed, and the worker's input contains both failures with no marker. - An unedited comment gives exactly the queued body. - A comment by another author is ignored. **Checks:** root and core typecheck pass, and zero-warning lint is clean on the changed files. I rebuilt core, and 19 related suites pass, including the edit-handler, PR comment job, publication and CI-failure suites. **Found separately, not changed:** - **Edit while the follow-up is already running:** if the edit lands after the worker has read the comments, the run doesn't get the new failure. Resubmitting it wouldn't help: the "already processed" check matches the comment ID, not its content, so the new failure would be filtered out. Fixing that means changing how processed comments are tracked, which is outside F8. - **Bot-name matching differs:** the webhook matches ProPR's bot account name with exact case. The new worker check, like the existing CI comment scan, ignores case. PR: #3654 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThis PR improves failure reporting and consolidates repeated comments, but needs changes before merge: CI failures arriving during an active follow-up can be lost, and comment deduplication stops after one page. ✅ Clear review failures — Invalid review output becomes an error-marked diagnostic without fix instructions, and the runner counts it as failed. ✅ Safer retry admission — Waiting labels block fresh issue admission, and rate-limit retries no longer bypass an existing done label. ✅ Guarded comment publication — The new locks serialize publication and explicitly reject detected ownership loss before writing. The supplied current-head status shows 23 passed checks, no failures, and one pending check. This review uses static analysis only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F9: 🔴 Preserve CI additions after worker pickup
F10: 🔴 Search all eligible comments for deduplication
SuggestionsThese are optional follow-ups and are not sent to S6: 🟢 Consolidate lease maintenance
ScoreThe implementation has useful regression coverage and passing current checks, but two changed paths still undermine the intended consolidation behavior. Both can be corrected locally. 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit ce0440c
Summary of ChangesThat last notice was only my wait loop ending; the suite results were already in, so the summary above still holds. Review digestRisk-tiered paths
Validation evidence
Diff size: 7 files changed, +342/−37 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…sults were already in, so the summary above still holds. That last notice was only my wait loop ending; the suite results were already in, so the summary above still holds. PR: #3654 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves failure reporting and reduces duplicate comments, but needs changes before merge: CI revision tracking can silently discard unhandled failures. ✅ Invalid reviews become failures — Invalid output receives an error marker, omits fix instructions, and is counted as failed. ✅ Comment ownership is checked — Failure deduplication ignores copied markers in comments from other authors. ✅ Queued CI requests refresh correctly — Pending records use compare-and-set updates, and queued jobs read the current GitHub comment at pickup. This review is a static trace of the supplied code; no commands were run. Current checks show 23 passed, none failed, and one pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F11: 🔴 Retry skips an unfinished CI revision
F12: 🔴 Redis read failure discards new work
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe reporting improvements and targeted tests are useful, and current checks have no failures. However, two recovery paths can silently lose newly reported CI failures and require correction. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 00dfdbc
Summary of ChangesI fixed F11 and F12. The three new regressions fail on the old code and pass now, and the 21 related suites all pass. F11: a retry no longer skips an unfinished CI revision. When a run takes a revision, ProPR now also records which receipts already named that comment at that moment. Those receipts belong to earlier revisions. The revision counts as done only once a receipt not on that list ends it: the completion or failure notice of the run that took it. So a run that stops before posting one leaves the revision to run again. That covers a usage-limit retry, a capacity or workflow deferral (these happen after the record is written), and a lost worker. In your scenario, A's completion receipt no longer hides B on the retry, and B is done once its own run completes or fails. The change is in F12: a failed Redis read now fails validation instead of being ignored. The error goes through the normal job failure path. No starting comment exists yet, so nothing is posted. The queue then retries the job (3 attempts with backoff), the same way a failed write of the record already did. A failed read can no longer let A's receipt discard B. I checked the related pending-batch refresh: it already treats a read failure as "handle the edit normally", so it doesn't have this bug. Changes you'd notice:
Verification:
I found nothing else outside F11 and F12. There are no visual previews, because nothing here changes what a user sees. Review digestRisk-tiered paths
Validation evidence
Diff size: 6 files changed, +233/−39 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…old code and pass now, and the 21 related suites all pass. I fixed F11 and F12. The three new regressions fail on the old code and pass now, and the 21 related suites all pass. **F11: a retry no longer skips an unfinished CI revision.** When a run takes a revision, ProPR now also records which receipts already named that comment at that moment. Those receipts belong to earlier revisions. The revision counts as done only once a receipt not on that list ends it: the completion or failure notice of the run that took it. So a run that stops before posting one leaves the revision to run again. That covers a usage-limit retry, a capacity or workflow deferral (these happen after the record is written), and a lost worker. In your scenario, A's completion receipt no longer hides B on the retry, and B is done once its own run completes or fails. The change is in `src/jobs/ciFailureCommentPickup.ts`, and `validatePRAndComments` now passes the PR's comments in. Nothing new has to be written after the receipt is posted, so a crash after posting can't make it look unfinished. No other code reads this record or makes this "already processed" decision. **F12: a failed Redis read now fails validation instead of being ignored.** The error goes through the normal job failure path. No starting comment exists yet, so nothing is posted. The queue then retries the job (3 attempts with backoff), the same way a failed write of the record already did. A failed read can no longer let A's receipt discard B. I checked the related pending-batch refresh: it already treats a read failure as "handle the edit normally", so it doesn't have this bug. **Changes you'd notice:** - **Record format:** the record is now JSON with the digest and the earlier receipt ids. A record that doesn't match that shape, such as one written by earlier commits on this branch, counts as an unknown revision, so that comment runs once more rather than being skipped. - **Changed F9 tests:** two existing F9 tests in `test/commentEventHandler.switch-use.test.ts` now use the new signatures. One of them asserted that once a run took a revision, an earlier receipt was enough to skip it. That is the F11 bug, so it now expects the revision to run until the taking run's own receipt exists. The other now includes the running follow-up's completion receipt, which is what makes the later revision job skip. - **Comment update:** I updated one comment in `packages/core/src/webhook/commentEventHandler.ts` to match. **Verification:** - **New suite:** `test/ciFailureRevisionRetry.test.ts` runs the same steps as `validatePRAndComments` and has 6 tests. The three for the usage-limit retry, the deferral and the Redis read failure fail on HEAD's `ciFailureCommentPickup.ts` and pass now. The other three check behaviour that must stay the same: a failure notice ends a revision, a comment with no earlier receipts works as before, and an unreadable record runs the comment. - **Checks:** root typecheck is clean and lint has zero warnings for root `src/` and core. In the edited switch-use test file, the test-only typecheck shows no errors in the edited region and fewer in total than HEAD (135 vs 142). - **Suites:** the 68 switch-use tests pass, as do the other 20 related suites, including `prCommentJob.integration`, `taskIntentWithdrawal`, `prPublicationRecoveryJob`, `ciFailureFollowup` and `followupAssignmentGate`. I found nothing else outside F11 and F12. There are no visual previews, because nothing here changes what a user sees. PR: #3654 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
|
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves failure messages, comment deduplication, and CI follow-up handling, but needs changes before merge. Three gaps remain in retry lifecycle management and delivery of accumulated CI failures. ✅ Review failures are explicit — Invalid output now produces an error-marked diagnostic with a task link and is counted as failed. ✅ Concurrent publication is guarded — Comment publication uses renewing leases, and CI publication refuses to treat failed lookups as confirmed absence. ✅ Delayed retries respect completion — Rate-limit retries can no longer use the sibling exemption to continue past This assessment is based on static inspection of the supplied code; no commands were run. The authoritative checks show no failures and four pending checks. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F13: 🔴 Retire superseded rate-limit tasks
F14: 🔴 Preserve revisions after Redis expiry
F15: 🔴 Retain evidence beyond ten checks
SuggestionsThese are optional follow-ups and are not sent to S7: 🟢 Consolidate lease implementations
ScoreThe implementation has substantial targeted coverage and useful safeguards, but task settlement and CI evidence retention still need correction. Pending checks alone do not affect this rating. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryAll 12 conflicted files are resolved and no conflict markers are left in the repository. Root and core typecheck are clean except one error from the unbuilt Tests: 68 suites that import the merged code pass, plus the 3 below.
What the conflicts were aboutThe epic had just merged #3676, a text-only fix for the same bot-comment problems as this PR. Both branches added helpers for the same jobs: a failure-cause sentence, the task link, the follow-up failure comment, the review error comment and the CI comment. So I kept the PR's version where both overlap, and kept the epic's changes where the PR had no equivalent. Per file
Other changes outside the conflict blocks
Two near-duplicates remain, from the epic: 🤖 Resolution Details
System-triggered merge conflict resolution |
…-5-5-bot-comments-empty-failed-20261117-0706-x1n Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - packages/core/src/utils/github/logFiles.ts - packages/core/src/webhook/ciFailureFollowup.ts - packages/core/src/webhook/commentEventHandler.ts - src/jobs/errorHandlers.ts - src/jobs/issueJobHelpers.ts - src/jobs/issueJobPostProcessing.ts - src/jobs/prCommentFailureComment.ts - src/jobs/prCommentJobUtils.ts - src/jobs/prCommentReviewJob.ts - src/jobs/reviewCommentFormatter.ts - test/redactSecrets.test.ts - test/reviewCommentFormatter.test.ts PR: #3654 Model: Claude Opus 5.5
|
❌ Failed to resolve merge conflicts from System-triggered merge conflict resolution |
AI Implementation Summary
Closes #3622
Branch:
3622/claude-opus-5-5-bot-comments-empty-failed-20261117-0706-x1nCommits: ✅ Changes committed (f373c86)
AI Processing Completed
Execution Details:
Summary:
I've implemented all six points from #3622. Typecheck and lint are clean for root
src/, core and shared. The 7 new test files and about 130 affected existing suites pass.What caused the #3556 sequence (for the PR description)
I traced this from the issue's label timeline:
resets Nov 18, 4pm (UTC)didn't match the reset parser, which only handledresets 4pm (UTC). It fell back to "next hour + 2 min", which produced "Reset time: 5:02 PM UTC" next to the weekly limit.AI-waitingand removedAI-processing. The webhook handles that label event like any unrelated one: it reads the issue's current labels and admits it unless an exclusion label is present. The exclusion list had-processing,-doneand-cancelled, but not-waiting(the poller does exclude it). So ProPR's own label swap started a new task. Each new task hit the limit again and scheduled one more delayed retry.ceilin one notice and as "< 1 hour" in the next.AI-doneand PR [3556 by Claude Opus 5.5] Official plugin: Linear (start work from a ticket, keep the ticket in sync) #3587 – The three delayed retries woke up. Each was a child of the original dispatch, holding a snapshot of the labels from beforeAI-done. The "a sibling model set AI-done, keep going" exemption let all three start. The later cancel stopped all three, and each posted its own "Execution Cancelled".Changes by point
error="true", has no/fixblock, links the task, and is counted as failed. The summary now reads "Posted 0 reviews, 1 failed".Comment ID: 0and the<synthetic>model line are gone. An identical failure on the same PR and head within an hour updates the first comment with an occurrence count. This applies to merge-conflict, PR follow-up and issue failures. For follow-ups, the repeat's starting comment shrinks to a one-line pointer so its comment-ID receipts survive.[View task details and logs](task page). The log files are still written.-waitingis now in the webhook exclusion list.resets Nov 18, 4pm (UTC)) now parse.AI-done.-undefined-task ids came from comments with noupdated_at; those ids now omit that part.What's left
AI+AI-done: the current completion code already removesAIafter addingAI-done, and I added a test for that. The closed issues showing both labels (e.g. Show epic progress in the epic PR's title and status block #3531) have the label order of an older code path. I didn't change behaviour here.Things to know when reviewing
reviewCommentFormattertests checked metadata using reviewer output that was invalid, which now renders as a failure, so they now use valid output.ciFailureFollowupnow counts only the per-check claim keys, because the new per-commit lock adds Redis calls.taskSubmissionLifecycleandissueUsageLimitRetrymocks recorded the new comment lookup as a posted comment.redactSecretschecked placeholders in the conversation preview, which is no longer published.commentEventHandler/followupAssignmentGatesuites needGIT_CLONES_BASE_PATHandGIT_WORKTREES_BASE_PATHset here, because/tmp/git-processoris read-only in this container.goalContinuationandprocessGoalJobfailed after my parallel test runs left a half-migrateddata/propr.test.sqlite. I moved it to/tmp/staledb, and both passed on rerun.Review digest
Risk-tiered paths
packages/core/src/claude/claudeHelpers.ts(+4/−3)packages/core/src/daemon/issueDetection.ts(+8/−2)packages/core/src/utils/github/logFiles.ts(+15/−32)packages/core/src/utils/scheduling.ts(+28/−10)packages/core/src/webhook/ciFailureFollowup.ts(+49/−89)packages/core/src/webhook/ciFailureHeadComment.ts(added, +164/−0)packages/core/src/webhook/ciFailureHeadPublication.ts(added, +146/−0)packages/core/src/webhook/commentEventHandler.ts(+23/−2)packages/shared/src/failureCause.ts(added, +50/−0)packages/shared/src/index.ts(+2/−0)packages/shared/src/usageLimitText.ts(added, +22/−0)src/jobs/errorHandlers.ts(+44/−17)src/jobs/failureCommentDedupe.ts(added, +205/−0)src/jobs/issueJob/github.ts(+3/−1)src/jobs/issueJob/worktree.ts(+5/−2)src/jobs/issueJobHelpers.ts(+8/−23)src/jobs/issueJobPostProcessing.ts(+9/−7)src/jobs/prCommentFailureComment.ts(added, +66/−0)src/jobs/prCommentJobUtils.ts(+6/−6)src/jobs/prCommentReviewJob.ts(+3/−4)src/jobs/prReviewRunner.ts(+7/−2)src/jobs/processMergeConflictJob.ts(+8/−7)src/jobs/pullRequestLabels.ts(added, +41/−0)src/jobs/reviewCommentFormatter.ts(+43/−5)src/jobs/reviewFindingNumberAllocator.ts(+2/−1)src/jobs/reviewOutputParser.ts(+12/−0)packages/shared/test/failureCause.test.ts(added, +43/−0)test/ciFailureFollowup.test.ts(+4/−2)test/ciFailureHeadComment.test.ts(added, +154/−0)test/completionReportTaskLink.test.ts(added, +62/−0)test/failureCommentDedupe.test.ts(added, +132/−0)test/issueJobUnpublishableFailure.test.ts(+7/−5)test/issueRateLimitRetryGuards.test.ts(added, +93/−0)test/issueRestartAndLabelGuards.test.ts(added, +76/−0)test/issueUsageLimitRetry.test.ts(+2/−1)test/processMergeConflictJob.test.ts(+1/−0)test/redactSecrets.test.ts(+3/−3)test/reviewCommentFormatter.test.ts(+3/−3)test/reviewFailureComment.test.ts(added, +80/−0)test/taskSubmissionLifecycle.test.ts(+2/−0)Validation evidence
Diff size: 40 files changed, +1,635/−227 lines
Detailed Logs:
20ecd582-6459-4cc4-93ab-a1471adc994dLog files stored at:
/usr/src/app/logs/executions/issue-3622-2026-11-17T07-55-19-633Z-conversation.json/usr/src/app/logs/executions/issue-3622-2026-11-17T07-55-19-633Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3622.
💡 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!