Files
PaperClipAI/server
DottaandClaude Opus 5.5 e6562755e1 fix(issues): cover a blocked issue whose own run is queued after its blockers finish (#21770)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - A parent task is blocked on its subtasks. When the last subtask is
done, Paperclip queues a run for the parent to continue.
> - The board marks a blocked task "needs attention" when no live work
covers it. The check looks at the blockers, then at each blocker's runs.
> - When every blocker is done, the check returned "needs attention" at
once. It did not look at the parent's own queued or running run.
> - In a release-swap test, a parent showed "needs attention" for about
12 minutes while its own continuation run waited in the queue. Nobody
had to do anything. The state cleared by itself.
> - This pull request makes the check return "covered" when the blocked
task has its own queued or running run.
> - The benefit is that people see no false "needs attention" while
Paperclip already continues the work.

## Linked Issues or Issue Description

Refs #21731

**What happened?**
In a zero-downtime release-swap test, a blocked parent task had two
subtasks. Both subtasks were done. Paperclip queued the parent's
"children completed" run, which waited about 12 minutes for a free agent
slot. During that time, `blockerAttention` was `needs_attention` /
`attention_required`, with 0 unresolved blockers and the parent itself
as the terminal blocker. The board showed the parent in the blocked
inbox. Then the run started, finished, and the parent became done.

**Expected behavior**
A blocked task whose own run is queued or running is covered by live
work. It must not ask a person for attention.

**Steps to reproduce**
1. Create a blocked parent task with one or more subtasks that block it.
2. Mark every subtask done.
3. Keep the parent's own run queued (for example, when the agent has no
free slot).
4. Read the parent from the issue list. `blockerAttention.state` is
`needs_attention`.

## What Changed

- `server/src/services/issues.ts`: in `readIssueBlockerAttentionBatch`,
when a blocked root has no unresolved blockers, the function now checks
the active-issue set that it already built. If the root has its own
queued or running run (or an active wake), it returns `covered` with
`blockingTreeLive: true`. Otherwise it returns `needs_attention` as
before.
- The change adds no query. The active-issue set already includes the
roots, through their `executionRunId` and their wake requests.
- `server/src/__tests__/issue-blocker-attention.test.ts`: two tests.
- "classifies a blocked parent whose children are all done as covered
while its own children-completed run is queued"
- "keeps a blocked issue with no unresolved blockers and no active run
as needs_attention"

## Verification

- `cd server && npx vitest run
src/__tests__/issue-blocker-attention.test.ts`: 29 passed.
- Red on master: the first new test fails with `"state":
"needs_attention"`. Green with the change.
- The second new test passes on master and with the change (negative
case).

## Risks

- Low risk. The change only affects a blocked task with zero unresolved
blockers. That task now reads as covered while its own run is queued or
running. When the run ends without a status change, the task reads as
`needs_attention` again.
- The covered result has no reason (`reason: null`), because no blocker
covers it. The UI label is then "Blocked", not "waiting on 0 sub-tasks".

## Model Used

- Anthropic Claude Opus 5.5 (`claude-opus-5-5`), used in Claude Code
with tool use (shell, file edit) and extended thinking.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:51:38 -06:00
..