Repository navigation
[3908 by GPT-6.2 Sol] PR follow-up jobs deadlock on a PR lock left by their own earlier attempt - #3911
Conversation
Implemented #3908. PR follow-up jobs now release their Redis lock when they reschedule, exit early, or fail. A retry with the same correlation ID can atomically reclaim a stale lock with a fresh token. Active leases remain protected, and the previous attempt can no longer renew or release the reclaimed lock. Added regression coverage for a batch follow-up that reschedules after acquiring the lock, including when queueing the replacement fails. All 344 targeted tests passed, including the Redis integration tests. Type checking and linting passed. ProPR-Agent: codex/gpt-6.2-sol
|
Thanks, the lock-release part looks right. It doesn't fix the main cause yet, though; I added it to #3908 after this run started:
Please also:
|
|
✅ Applied the requested follow-up changes in commit 2da4dab Summary of ChangesPR comment follow-ups and Fly task matching applies to Machines launched with the new metadata. All 261 targeted tests passed, including a PR comment job that starts a Sprite agent in an environment without Docker. Type checking, linting, and the core build passed. Review digestRisk-tiered paths
Diff size: 18 files changed, +270/−23 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
Pointer: |
PR comment follow-ups and `/ultrafix` now check the selected agent runtime for an existing execution before starting. Sprites checks for a task’s exec session, including detached sessions. Fly Machines checks task metadata. Both skip Docker entirely and reschedule if their runtime cannot verify liveness. Docker still uses its exact-label and legacy-name probes. [Sprites session API](https://github.com/superfly/sprites-go/blob/main/session.go) · [Fly Machines API](https://docs.fly.io/api/machines/openapi.json) Fly task matching applies to Machines launched with the new metadata. All 261 targeted tests passed, including a PR comment job that starts a Sprite agent in an environment without Docker. Type checking, linting, and the core build passed. PR: #3911 Comment by: @integry (ID: 7266878011) Model: GPT-6.2 Sol ProPR-Agent: codex/gpt-6.2-sol
|
✅ Applied the requested follow-up changes in commit 5335054 Summary of ChangesPR-comment follow-ups and All 195 targeted tests passed, including the Sprites regression. Type checking and linting passed. Review digestRisk-tiered paths
Diff size: 2 files changed, +15/−13 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
PR-comment follow-ups and `/ultrafix` now proceed when the selected Sprites or Fly Machines runtime can’t verify liveness. Those runtimes bypass `docker ps` and defer only when they find a live execution. Docker still defers when its probe is unavailable. All 195 targeted tests passed, including the Sprites regression. Type checking and linting passed. PR: #3911 Comment by: @integry (ID: 7266881254) Model: GPT-6.2 Sol ProPR-Agent: codex/gpt-6.2-sol
|
Live test of 2da4dab, merged onto the epic and deployed to the Fly dashboard instance (Sprites runtime, no Docker): both stuck jobs started within about a minute of the deploy. The PR #5 comment follow-up (label switch to Sonnet 5.5) is implementing, PR #4's ultrafix is reviewing, and both Sprites are running. Before the fix, both rescheduled every 60 s with |
|
ℹ️ Analyzed the follow-up request by @integry Analysis SummaryPR #3911 already includes All 97 targeted tests passed locally across PR-comment collision recovery, follow-up execution on Sprites, and the Fly Machines runtime. No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
CI failed: Validate Changes Please investigate and fix this CI failure.
Failure evidence
|
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
|
✅ Applied the requested follow-up changes in commit 44095a2 Summary of ChangesFixed the three ESLint warnings that failed Validate Changes on PR #3911. I reduced complexity in Fly launch validation and Machine liveness checks, and consolidated two Sprites exports to meet the file-length limit. Failed CI run The workflow’s Run Checks step passed locally with the same Node and npm versions as CI. All 196 targeted tests passed. Review digestRisk-tiered paths
Diff size: 3 files changed, +20/−20 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Fixed the three ESLint warnings that failed **Validate Changes** on PR #3911. I reduced complexity in Fly launch validation and Machine liveness checks, and consolidated two Sprites exports to meet the file-length limit. [Failed CI run](https://github.com/integry/propr/actions/runs/46341904814/job/141597438943) The workflow’s **Run Checks** step passed locally with the same Node and npm versions as CI. All 196 targeted tests passed. PR: #3911 Comment by: @propr-dev[bot] (ID: 7267294848) Model: GPT-6.2 Sol ProPR-Agent: codex/gpt-6.2-sol
|
ℹ️ Analyzed the follow-up request by @github-actions[bot] Analysis SummaryPR #3911’s current head ( The Core Package build and all 204 targeted tests passed locally. No additional edits were needed. The GitHub Actions result for the current head remains unverified. No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
One correction; my pointer comment was ambiguous. 5335054 made the remote probe fail-open: Please make it bounded fail-closed instead:
The live test on the Fly dashboard instance with 2da4dab showed the Sprites probe answers normally, so the stuck follow-up and ultrafix both started. Fail-closed is safe when the API is up. |
|
✅ Applied the requested follow-up changes in commit f2c3105 Summary of ChangesPR #3911 now defers PR follow-ups and A running execution always defers, including when an earlier probe in the same check was unavailable. Stopped or missing executions and runtimes without a liveness probe allow processing to continue. Docker keeps its existing behavior, and remote runtimes bypass Docker probes. The targeted tests, type checking, and linting passed. Two Redis integration cases skipped because Redis was unavailable. Review digestRisk-tiered paths
Diff size: 4 files changed, +136/−24 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
PR #3911 now defers PR follow-ups and `/ultrafix` for 60 seconds on each of the first three consecutive unavailable remote liveness checks. The job carries the count across retries. If the fourth check is still unavailable, the worker logs a warning and proceeds. A running execution always defers, including when an earlier probe in the same check was unavailable. Stopped or missing executions and runtimes without a liveness probe allow processing to continue. Docker keeps its existing behavior, and remote runtimes bypass Docker probes. The targeted tests, type checking, and linting passed. Two Redis integration cases skipped because Redis was unavailable. PR: #3911 Comment by: @integry (ID: 7267876880) Model: GPT-6.2 Sol ProPR-Agent: codex/gpt-6.2-sol
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR is merge-ready within the reviewed scope. It addresses lock release and runtime-aware collision recovery with focused regression coverage. Review was static, based on the supplied diff and context; no commands were run. Current-head checks report 17 passed and no failures. ✅ Reliable lease cleanup — The outer ✅ Bounded remote deferral — Remote probe failures defer three times, then permit progress with a warning. A running ancestor takes precedence over unavailable evidence and resets the counter. ✅ Attempt fencing — Fresh tokens and atomic stale-lock reclamation prevent an earlier attempt from renewing or releasing its replacement’s lease. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Audit predecessor runtime inspectionThe separate predecessor recovery dependency in ScoreThe implementation meets the visible requirements, includes meaningful recovery and fencing tests, and has passing current-head checks. No merge-blocking defect was verified in the supplied code. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
Live-tested on propr-dev-3868 (Sprites runtime, combined build of #3911, #3910, #3905 and #3909 on the epic): fixture issue #147 → PR integry/propr-fly-fixture#148, the PR's View task link opens the task ( |
AI Implementation Summary
Closes #3908
Branch:
3908/gpt-6.2-sol-pr-follow-up-jobs-deadloc-20261130-0204-ekoCommits: ✅ Changes committed (334827f)
AI Processing Completed
Execution Details:
Summary:
Implemented #3908. PR follow-up jobs now release their Redis lock when they reschedule, exit early, or fail. A retry with the same correlation ID can atomically reclaim a stale lock with a fresh token. Active leases remain protected, and the previous attempt can no longer renew or release the reclaimed lock.
Added regression coverage for a batch follow-up that reschedules after acquiring the lock, including when queueing the replacement fails. All 344 targeted tests passed, including the Redis integration tests. Type checking and linting passed.
Review digest
Risk-tiered paths
packages/core/src/queue/taskQueue.types.ts(+1/−1)src/jobs/followupHandoffRecovery.ts(+2/−3)src/jobs/prCommentCollisionRecovery.ts(+12/−38)src/jobs/prCommentHandoffIntegration.ts(+17/−9)src/jobs/prCommentJobUtils.ts(+4/−4)src/jobs/prProcessingLock.ts(+41/−16)src/jobs/processPullRequestCommentJob.ts(+57/−22)test/prCommentAutomaticRetry.test.ts(+1/−1)test/prCommentCleanupOrder.test.ts(+1/−1)test/prCommentCollisionRecovery.test.ts(+2/−24)test/prCommentUsageLimitResume.test.ts(+1/−1)test/prProcessingLockToken.test.ts(+55/−20)test/prPublicationJob.test.ts(+39/−7)test/prPublicationRecoveryJob.test.ts(+5/−2)test/prRecoveryRedisLua.integration.test.ts(+17/−8)Diff size: 15 files changed, +255/−157 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3908.
💡 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!