Skip to content

Keep an Unattended Worker From Replying Before Its Review Finishes - #2648

Merged
ptr727 merged 5 commits into
developfrom
feature/worker-early-return
Oct 9, 2026
Merged

ptr727 merged 5 commits into
developfrom
feature/worker-early-return

Conversation

@ptr727

@ptr727 ptr727 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the worker early-return defect in unattended-handoff that #1837 records. In two unattended runs, a worker handed its local-strict-review pass to a background subagent and replied STOP naming the unfinished pass. That ended the whole run on a per-issue condition with backlog still pickable, and left the handoff neither closed nor parked. In the later run the worker then woke on the pass's completion and finished the lane after the run had already acted on its line.

  • Worker step 4 names the local-strict-review pass as a wait like any other. The worker replies only after its reviewer has reported, either because the reviewer ran in the foreground or because the harness woke the worker on its completion before any reply went out. A worker with neither returns STOP, since every later worker in the run would meet the same harness. The reason step 4 gave before ("a subagent receives no completion notification, so a wait handed to a monitor or a background task never wakes it") is replaced, because the recurrence showed a worker being woken. The real failure is that the orchestrator acts on the line the moment it arrives.
  • Worker step 8 makes the reply the worker's last act: only once nothing it started is still running.
  • Return Lines rules STOP out for a cause particular to the worker's own issue, one a later round on another issue would not meet. Such a cause is the maintainer's choice of how that issue proceeds, which is step 5's parking case, so the worker parks and replies PARKED.

This is rule text, and #1837 left its wording for the maintainer to settle in review.

Local strict review

Four recorded passes. The first raised 2 findings plus 3 sentence-length violations, and the second raised 2 findings that the first round's wording introduced. Both edit rounds fixed everything raised. The third pass was clean, and the fourth confirmed a whitespace-only reflow. No introduced finding remains open.

Part of #1837. The closing keyword goes on the promotion PR.

🤖 Generated with Claude Code

ptr727 and others added 4 commits October 9, 2026 07:23
Worker step 4 now names the local strict review pass as a wait the
worker holds its turn for, and states the reason as the orchestrator
acting on the reply line at once, which the recurrence on a later run
showed to be the real failure: the worker did wake, after the run had
already ended on its line. Step 8 makes the reply the worker's last act,
and "Return Lines" rules out STOP for anything about the worker's own
issue, which parks instead.

Refs #1837

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The park rule now covers only a cause particular to the worker's own
issue, so a quota or label state still stops the run once rather than
parking every later lane. Step 4 requires the review dispatch in the
foreground and sends a background-only harness to STOP.

Refs #1837

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… Step 5

A background reviewer satisfies step 4 where the harness wakes the
worker on its completion before any reply goes out, so only a harness
with neither that wake nor a foreground dispatch stops the run. A cause
particular to one issue is now stated as the maintainer's choice of how
that issue proceeds, which is step 5's own parking case.

Refs #1837

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 9, 2026 14:30
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d47e7a09-9f41-49d0-8d3c-6fe6ca1c2634

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The worker may still reply while its background review is running.

1 open finding
What changed in this PR

Updates unattended worker rules to prevent replies before review completion and regenerates distributed skill copies.

Changes:

  • Clarifies STOP, PARKED, and review-wait behavior.
  • Requires spawned work to finish before replying.
  • Regenerates skill distributions and source digest.
File Changes
.github/​skills/​unattended-handoff/​SKILL.md Generated GitHub skill copy
.claude-plugin/​fleet-skills/​skills/​unattended-handoff/​SKILL.md Generated plugin skill copy
.claude-plugin/​fleet-skills/​.source-digests/​unattended-handoff Updated source digest
.agents/​skills/​unattended-handoff/​SKILL.md Canonical worker rule changes

🧠 Review effort: Lite


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.34%. Comparing base (6427783) to head (f2c3ee8).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2648   +/-   ##
========================================
  Coverage    59.34%   59.34%           
========================================
  Files           16       16           
  Lines         8282     8282           
========================================
  Hits          4915     4915           
  Misses        3367     3367           
Flag Coverage Δ
python-3.13 59.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…nning

A worker that can neither dispatch the reviewer in the foreground nor
be woken by its completion now returns STOP before dispatching it, so
no reviewer is still running when the line reaches the orchestrator.

Refs #1837

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Reflow the flagged paragraph in the canonical source and regenerate the distributed copies.

1 open finding
1 resolved since last review

🧠 Review effort: Lite

@ptr727
ptr727 merged commit 370d921 into develop Oct 9, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/worker-early-return branch October 9, 2026 14:43
ptr727 added a commit that referenced this pull request Oct 9, 2026
Promotes the one change develop holds over main: `unattended-handoff`
keeps a worker from replying before its local strict review reports.
Worker step 4 decides how to run the review before dispatching it,
either in the foreground or in the background only where the harness
wakes the worker on completion, and returns `STOP` before dispatching
where neither route exists. Step 8 makes the reply the worker's last
act. "Return Lines" rules out `STOP` for a cause particular to one
issue, which parks instead (#2648).

Fixes #1837

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants