Skip to content

Non-Docker runtimes: PR follow-ups never start (Docker-only collision check), and PR locks leak #3908

Done

Description

@integry

On the Fly dashboard instance (Sprites runtime, 2 warm Sprites, worker concurrency 2), two PR follow-up jobs deadlocked on their own PR locks.

  • integry/propr-demo-leftovers#5: a follow-up comment, with the model switched by the llm-claude-sonnet55 label.
  • integry/propr-demo-leftovers#4: /ultrafix.

Both jobs kept rescheduling with reason: pr_locked_by_other_job ("PR is currently being processed by another execution"), with the backoff doubling: 20 s, 40 s, 80 s. In Redis, lock:pr:integry:propr-demo-leftovers:4 held 7757634c-…:e16c0f5f-… with about 57 minutes TTL left. The first part is the stuck job's own correlationId, and the second part is an earlier execution ID. PR #5 looked the same (d0dcb073-…).

So an earlier attempt of the same job took the lock, gave up or rescheduled without releasing it, and every retry since then is refused by the leftover lock. The log buffer didn't reach back to the first attempt, so why it rescheduled is still unknown. I deleted both keys by hand to unblock the demo.

Expected:

  • release the PR lock on every reschedule or exit path;
  • let a retry of the same job (same correlationId) take over a lock left by its own earlier execution;
  • add a test where a batch follow-up job reschedules after acquiring the lock.

Root cause (found after clearing the locks)

After I cleared the locks, both jobs rescheduled for a different reason, and they keep doing so every 60 s:

"collisionTaskId":"10","liveness":"unavailable","inspectionSource":"exact-label",
"Agent execution for this task may already be running. Rescheduling without starting another attempt."
reason: agent_container_already_running
  • inspectPRCommentContainerCollision (src/jobs/prCommentCollisionRecovery.ts) calls inspectTaskContainerLivenessForTask (packages/core/src/claude/docker/dockerExecutor.ts:133). That function only runs docker ps --filter label=propr.task.id=….
  • On the Sprites runtime, and on Fly Machines, there is no Docker daemon. The call fails, liveness comes back unavailable, and the fail-closed check treats that as "may already be running".
  • As a result, PR comment follow-ups, /ultrafix and other PR-comment jobs never start on non-Docker runtimes. The Fly dashboard instance shows 2 warm Sprites and 0 running throughout.
  • The leftover PR lock described above is probably a side effect of this same path.

Fix

  • Make the pre-execution collision check runtime-aware. Ask the active agent runtime whether this task's execution is live: on Sprites, an active exec or session for the task; on Fly Machines, a Machine for the task. When the runtime is not Docker, skip the Docker probe (including inspectLegacyDockerContainerLivenessForTask) rather than returning unavailable.
  • Keep the fail-closed behaviour when the active runtime cannot answer.
  • Release the PR lock on every reschedule path, and let a retry with the same correlationId take over its own lock.
  • Tests:
    • a PR comment job on the Sprites runtime with no Docker binary starts the agent;
    • a live Sprite execution for the task still blocks;
    • the Docker runtime behaviour is unchanged.

This is the top priority for the Fly demo, because follow-ups and ultrafix are part of it.

Activity

  1. propr-dev commented on Nov 30, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-6.2-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-6.2-sol
    • Branch: 3908/gpt-6.2-sol-pr-follow-up-jobs-deadloc-20261130-0204-eko
    • Base Branch: 3758-epic-runtime-abstraction-sc0
    • Worktree: issue-3908-20261130-0204-gpt-6.2-sol-eko

    🔍 Track Task Execution

  2. changed the title [-]PR follow-up jobs deadlock on a PR lock left by their own earlier attempt[/-] [+]Non-Docker runtimes: PR follow-ups never start (Docker-only collision check), and PR locks leak[/+] on Nov 30, 2026
  3. integry commented on Dec 1, 2026

    @integry
    OwnerAuthor

    Done in #3911, which merged into the runtime epic; the epic merged into main with #3774 and ships in 0.9.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions