Repository navigation
fix(worker): tell the pull request when a command failed before it started - #3425
Conversation
…arted Worktree admission wraps the whole job processor, so a PR comment job that is refused under disk pressure fails all its attempts without ever creating its task or posting anything: the /fix or /review looks ignored on GitHub, and only the worker log knows. The exhausted-failure finalizer now notices a job whose task state never existed and posts a comment on the pull request naming the cause. Disk pressure gets a plain explanation (free space, then post the command again); any other pre-start failure quotes the sanitized error. The comment carries the usual processed markers so polling does not re-queue the spent command on its own. The storage lifecycle throws a typed WorktreeDiskPressureError, recognised by name or by its unchanged message after a queue round-trip. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationReady to merge within scope. The change addresses silent pre-start failures with a focused reporting path. The supplied current-head checks show 21 passed and none failed or pending. This review used static analysis only; no commands were run. ✅ Compatible error recognition — The typed disk-pressure error preserves the existing message and supports recognition after queue serialization. ✅ Polling-compatible failure receipts — Failure comments include real request IDs, checkmarks, and failed work-evidence markers matching the supplied consumers. ✅ Contained reporting failures — GitHub posting errors are caught and logged without escaping the failure reporter. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Restore the mock implementation correctlyIn ScoreThe implementation satisfies the scoped objective, with compatible failure markers and coverage of the principal reporting paths. No production blocker was verified, and current-head checks are green. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
Why
A
/fix allon #3423 looked ignored. The worker had picked it up within a second and tried three times, but every attempt failed withWorktree disk pressure: admission reserve unavailable; data retained. Worktree admission wraps the whole job processor (createWorkerinpackages/core/src/queue/taskQueue.ts), so a refused job never creates its task state or its starting comment, and the processor's own failure handling (handleJobError) never runs. Nothing reached GitHub or the UI; only the worker log knew. The same happened to areview_pull_requestrequest on integry/mcptest#523 and 80 other attempts since yesterday evening.What
attachPRCommentTaskStateFinalizersalready finalizes exhausted PR comment jobs. When that finalization finds no task state, the job never started, so it now posts a comment on the pull request via the newpostUnstartedPRCommentFailure(src/jobs/prCommentUnstartedFailure.ts)./fix,/review, …) and the requesters, and carries the usualComment ID: n✓andpropr:work-evidence phase=failedmarkers, so polling does not re-queue the spent command on its own.WorktreeDiskPressureError;isWorktreeDiskPressureErrorrecognises it by name or by its unchanged message after a queue round-trip. Both are exported from@propr/core.Issue jobs are left alone: the processing label is applied inside the processor, so a refused issue keeps its trigger label and polling retries it on a later poll.
Tests
test/prCommentUnstartedFailure.test.ts: body for disk pressure and for a generic error, synthetic ultrafix comments filtered, follow-up without known comments, the GitHub request, a failing post is logged and not thrown, error recognition.test/prCommentTaskStateFinalizers.test.ts: the exhausted attempt with missing task state is reported once; a job whose own handling ran is not.🤖 Generated with Claude Code