Skip to content

# Issue jobs refused for disk pressure are dropped silently; implement_plan returns 500 with no log #3860

Done

Description

@propr-dev

Issue jobs refused for disk pressure are dropped silently; implement_plan returns 500 with no log

Two dispatch bugs, both seen on the hosted instance (gitfix.dev) on 2026-11-27 and confirmed from the server's container logs.

1. Issue jobs refused for worktree disk pressure vanish without a trace

What happened. implement_plan for integry/propr #3844 (plan 273ec862…, epic 3841-epic-extension-library-r77) was accepted at 19:01:26 UTC. gitfix-worker-1 then logged, for jobId issue-integry-propr-3844 (processGitHubIssue):

19:01:32.295 ERROR Job failed  errMessage: "Worktree disk pressure: admission reserve unavailable; data retained"  attemptsMade: 1
19:01:34.535 ERROR Job failed  (same)  attemptsMade: 2
19:01:38.863 ERROR Job failed  (same)  attemptsMade: 3

WorktreeDiskPressureError comes from StorageLifecycle.admit (packages/core/src/storage/lifecycle.ts), via the repositoryStorageLifecycle.use(...) admission in packages/core/src/queue/taskQueue.ts: a 2 GiB reserve plus 1 GiB per running task. At 19:00:07 the same worker logged "Ultrafix step refused for disk pressure: waiting for free disk space", so the root disk really was briefly low.

All retries were used up within ~6 s, and then nothing happened:

  • no comment on the issue;
  • no task row;
  • the plan kept reporting the issue as processing / dispatched, with task_id: null.

At 19:01:32.6 gitfix-daemon-1 detected the eligible issue again and enqueued a job under the same jobId. Nothing ran, presumably because the failed job with that ID was still retained. The issue sat idle for 3 hours until its AI label was removed and re-added by hand at 22:00.

The WorktreeDiskPressureError doc comment says callers "that owe someone an answer (a PR comment job, for instance) recognise it by name". PR comment jobs do (src/jobs/prCommentUnstartedFailure.ts), and Ultrafix steps wait for free space (src/jobs/ultrafixExhaustedStep.ts). Issue jobs do neither.

Required:

  • Retry with backoff: treat WorktreeDiskPressureError on issue jobs as retryable, waiting for free disk like the Ultrafix path, with backoff measured in minutes, not seconds. It must not consume the normal attempt budget in a burst. Bound the total wait, e.g. by WORKTREE_* settings, and log each deferral.
  • Report the final refusal: if the wait runs out, post an issue comment that says disk pressure stopped the run and how to retry, and mark the plan issue failed or blocked (not processing), so get_plan and the Studio show it.
  • No silent dedupe: a later enqueue for the same issue must not be swallowed by a retained failed job with the same jobId. Either remove or replace the failed job on re-enqueue, or use a fresh jobId per dispatch attempt.
  • Tests:
    • an issue job whose admission throws WorktreeDiskPressureError is deferred, not failed;
    • one that exhausts the wait reports on the issue and updates the plan issue state;
    • re-enqueuing after a failed attempt runs the job.

2. implement_plan returns 500 with nothing in the logs when the epic queue is busy

At 18:02:58 and 18:03:16 UTC, implement_plan for issue 3844 on the same plan returned:

{"code":"OUTCOME_UNKNOWN","stage":"internal","retryable":false,"status":500,"cause":{"code":"INTERNAL_ERROR"}}

The plan had an active epic execution queue (issues 3841–3843, with 3842 in flight). At those timestamps the API logged only "loaded monitored repositories / agents configuration / ultrafix rating goal", and then nothing: no error or stack in gitfix-api-1, gitfix-daemon-1 or gitfix-worker-1. Once that queue finished, at 19:01:26, the same call succeeded.

Required:

  • Log the error: log the underlying error, with its stack and the operation ID, when an MCP or plan operation fails internally.
  • Support or clearly refuse: decide whether adding an issue to a plan with an active epic queue is supported.
    • If it is, append the issue to the running queue (graph mode respects dependsOn).
    • If not, return a clear 409-style error ("this plan's epic execution is still running issues …; retry when it finishes") instead of OUTCOME_UNKNOWN/500.
  • Test: implement_plan with a new issue while the plan's epic queue is active gives either a queued issue or the explicit refusal, never a 500.

Notes

  • ProPR runs on SQLite only: do not add code or tests for other databases.
  • Keep the disk-pressure admission itself as is. It protects the host; the bug is only in how refused issue jobs are handled and reported.

Submitted by @integry through ProPR.

Addition: disk-pressure refusals must report the actual numbers

The refusal at 19:00–19:01 UTC can't be diagnosed after the fact. The server has 40–55 GB free in normal operation, and with WORKER_CONCURRENCY=5 the admission threshold is about 2 GiB reserve + ≤5 GiB in claims. So either the disk really fell below ~7 GiB for those two minutes, or readers/ claims leaked. Every claim belongs to the long-lived worker (pid 19), so "owner gone" reclamation can never release a leaked one. Today's message, "Worktree disk pressure: admission reserve unavailable; data retained", can't tell these apart.

Required:

  • WorktreeDiskPressureError carries, and every log line or user-facing report of it shows:
    • the measured filesystem path;
    • freeBytes (bavail * bsize);
    • reserveBytes;
    • the summed reservedBytes of other claims;
    • the claim count;
    • the requesting job's taskBytes.
      Use human-readable units (e.g. "free 6.2 GiB < required 7.0 GiB = reserve 2.0 GiB + 5 claims × 1.0 GiB").
  • The same numbers go into the deferral log, the "waiting for free disk space" Ultrafix log, and the issue or PR comment posted when the wait runs out.
  • Log one warning per refusal that lists the claim files counted, with owner host/pid and age, so leaked claims are visible.
  • Test: the error message and report include these values.

Activity

  1. propr-dev commented on Nov 27, 2026

    @propr-dev
    ContributorAuthor

    🤖 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:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3860/claude-opus-5-5-issue-jobs-refused-for-di-20261127-2208-xrs
    • Base Branch: main
    • Worktree: issue-3860-20261127-2208-claude-opus-5-5-xrs

    🔍 Track Task Execution

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions