Skip to content

[3589 by Claude Opus 5.5] Epic PR status: show "needs you" when a sub-PR is stuck or waits to be merged, instead of "#N starts next" - #3610

Merged
integry merged 1 commit into
3589-epic-0-9-y3wfrom
3589/claude-opus-5-5-epic-pr-status-show-needs-20261117-0116-9vt
Nov 17, 2026
Merged

integry merged 1 commit into
3589-epic-0-9-y3wfrom
3589/claude-opus-5-5-epic-pr-status-show-needs-20261117-0116-9vt

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3589

Branch: 3589/claude-opus-5-5-epic-pr-status-show-needs-20261117-0116-9vt
Commits: ✅ Changes committed (7d59897)


AI Processing Completed

Execution Details:

Summary:
Epic PRs now show ⚠️ when nothing is running and a sub-PR needs a person or waits to be merged. "#X starts next" appears only when the queue can start #X right now. The new tests and the related suites pass (335 tests, 0 failures), and lint and typecheck are clean.

Root cause. The old check in pullRequestStatusEpicFacts.ts read the queue's cursor column. That column is legacy: new queues are created with it at 0, and the queue's real progress lives in the per-issue rows. So the old code treated the first issue, already merged, as the queue head. It then reported "starts next" whenever any later issue was pending, in every queue mode. Parallel queues had their own version of the bug: any pending issue counted. That is the #3563 picture.

Fix (status computation only; how the queue dispatches is unchanged):

  • pullRequestStatusEpicFacts.ts now reads the queue through getEpicExecutionQueue and asks the queue's own scheduler which issue starts now. An issue counts only if the dispatcher has already claimed it, or its prerequisites are satisfied and a slot is free. A sub-PR that isn't merged holds its slot and keeps the issues that depend on it waiting.
  • An issue that is already merged in the plan, before the queue has moved past it, counts as done. Under the "terminal" advance setting, closed counts too.
  • The facts now record which issue starts next (nextIssue), and the "starts next" line names that issue rather than just the first pending one.
  • pullRequestStatus.ts keeps its documented order of checks. With the queue check corrected, the sub-PR "needs you" and "waits to be merged" checks now apply. The title slot uses the same state, so it shows ⚠️.
  • In docs/docs/features/pr-status.md I reworded the vague "about to start its next issue" in the working row to say what that means.

Tests (packages/core/test/pullRequestStatusEpicSync.test.ts). The test queue table was simpler than the real one, so I gave it per-issue rows and set cursor to 0, as real queues are created. New tests cover:

  • the two ⚠️ 20/20 [Epic] Plugin system: manifest, handlers, commands and official plugins #3563 situations (sub-PR at ⚠️, and sub-PR ready and waiting for merge, each with a pending issue behind it) in sequential and graph queues.
  • the same in a parallel queue, where the pending issue can't be dispatched.
  • a graph issue whose prerequisite is merged still starting next, until the parallel limit is 1.
  • a parallel issue starting next whether or not the dispatcher has claimed it.
  • a chain starting the next issue after a merged head the queue hasn't moved past yet.

With the original source swapped back in, 16 tests in this file fail: all the new ones except the two "starts next" positive checks, plus existing ones that now use the realistic cursor of 0. With the fix, all of them pass.

One behaviour to know about: in parallel and graph queues, an issue the dispatcher has claimed but that hasn't started running still shows as "starts next". The sequential queue already behaved this way.

No previews were made: the change is only to the status text and title on PRs, with no UI.

Acceptance criteria

  • AC1: met — pullRequestStatusEpicFacts.ts (nextQueuedIssue); tests "sequential/graph: a sub-PR that needs a person…" and "parallel: a sub-PR that needs a person shows ⚠️…" in packages/core/test/pullRequestStatusEpicSync.test.ts
  • AC2: met — pullRequestStatusEpicFacts.ts; tests "sequential/graph: a ready sub-PR waiting for a human merge…", the parallel test's ready step, and "a ready sub-PR waiting to be merged shows ⚠️…" in pullRequestStatusEpicSync.test.ts
  • AC3: met — nextQueuedIssue uses epicQueueSchedule (prerequisites, slot limit, claims); tests "a graph issue whose prerequisites are merged and that has a free slot starts next…", "a parallel issue that is pending and unclaimed starts next…", "a chain starts the issue after a head that merged…"
  • AC4: met — the new tests check that the title settles to ⚠️ 1/3 [Epic] Scheduler primitives (settledTitle in pullRequestStatusEpicSync.test.ts)
  • AC5: met — the ⚠️ 20/20 [Epic] Plugin system: manifest, handlers, commands and official plugins #3563 regression tests in pullRequestStatusEpicSync.test.ts fail when run against the original pullRequestStatus.ts and pullRequestStatusEpicFacts.ts and pass with the fix

Review digest

Acceptance criteria (5 of 5 met, as stated by the agent)

  • ✅ AC1 (met): With no running work and an open sub-PR in `needs_attention`, the epic is `needs_attention` naming that sub-PR, for sequential, parallel and graph queues. — `pullRequestStatusEpicFacts.ts` (`nextQueuedIssue`); tests "sequential/graph: a sub-PR that needs a person…" and "parallel: a sub-PR that needs a person shows ⚠️…" in `packages/core/test/pullRequestStatusEpicSync.test.ts`
  • ✅ AC2 (met): With no running work and an open sub-PR that is `ready`, the epic is `needs_attention` with the "waits to be merged" reason. — `pullRequestStatusEpicFacts.ts`; tests "sequential/graph: a ready sub-PR waiting for a human merge…", the parallel test's ready step, and "a ready sub-PR waiting to be merged shows ⚠️…" in `pullRequestStatusEpicSync.test.ts`
  • ✅ AC3 (met): A pending issue makes the epic `working` ("starts next") only when the queue can dispatch it now: its prerequisites are merged, the queue is not waiting for an unmerged sub-PR and has a free slot. — `nextQueuedIssue` uses `epicQueueSchedule` (prerequisites, slot limit, claims); tests "a graph issue whose prerequisites are merged and that has a free slot starts next…", "a parallel issue that is pending and unclaimed starts next…", "a chain starts the issue after a head that merged…"
  • ✅ AC4 (met): The epic title slot follows the same state (`⚠️` in the cases above). — the new tests check that the title settles to `⚠️ 1/3 [Epic] Scheduler primitives` (`settledTitle` in `pullRequestStatusEpicSync.test.ts`)
  • ✅ AC5 (met): Regression tests reproduce the #3563 situations (sub-PR at ⚠️ with pending issues behind it; sub-PR at ✅ waiting for merge) and fail on the current code. — the #3563 regression tests in `pullRequestStatusEpicSync.test.ts` fail when run against the original `pullRequestStatus.ts` and `pullRequestStatusEpicFacts.ts` and pass with the fix

Risk-tiered paths

  • High risk: none
  • Normal risk (2 files)
    • packages/core/src/services/pullRequestStatus/pullRequestStatus.ts (+10/−2)
    • packages/core/src/services/pullRequestStatus/pullRequestStatusEpicFacts.ts (+29/−27)
  • Low risk (2 files)
    • docs/docs/features/pr-status.md (+1/−1)
    • packages/core/test/pullRequestStatusEpicSync.test.ts (+111/−9)

Validation evidence

  • No repository validation commands ran.

Diff size: 4 files changed, +151/−39 lines

Detailed Logs:

  • Conversation: 81 messages
  • Session: 12b2bbeb-0224-4fff-aa13-4f0cfd4beb08

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3589-2026-11-17T01-28-09-172Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3589-2026-11-17T01-28-09-172Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Epic PRs now show `⚠️` when nothing is running and a sub-PR needs a person or waits to be merged. "#X starts next" appears only when the queue can start #X right now. The new tests and the related sui...


This PR was created automatically by ProPR after processing issue #3589.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…erson or waits to be merged. "#X starts next" appears only when the queue can start #X right now. The new tests and the related suites pass (335 tests, 0 failures), and lint and typecheck are clean.

Root cause. The old check in `pullRequestStatusEpicFacts.ts` read the queue's `cursor` column. That column is legacy: new queues are created with it at 0, and the queue's real progress lives in the per-issue rows. So the old code treated the first issue, already merged, as the queue head. It then reported "starts next" whenever any later issue was pending, in every queue mode. Parallel queues had their own version of the bug: any pending issue counted. That is the #3563 picture.

Fix (status computation only; how the queue dispatches is unchanged):
- `pullRequestStatusEpicFacts.ts` now reads the queue through `getEpicExecutionQueue` and asks the queue's own scheduler which issue starts now. An issue counts only if the dispatcher has already claimed it, or its prerequisites are satisfied and a slot is free. A sub-PR that isn't merged holds its slot and keeps the issues that depend on it waiting.
- An issue that is already merged in the plan, before the queue has moved past it, counts as done. Under the "terminal" advance setting, closed counts too.
- The facts now record which issue starts next (`nextIssue`), and the "starts next" line names that issue rather than just the first pending one.
- `pullRequestStatus.ts` keeps its documented order of checks. With the queue check corrected, the sub-PR "needs you" and "waits to be merged" checks now apply. The title slot uses the same state, so it shows `⚠️`.
- In `docs/docs/features/pr-status.md` I reworded the vague "about to start its next issue" in the `working` row to say what that means.

Tests (`packages/core/test/pullRequestStatusEpicSync.test.ts`). The test queue table was simpler than the real one, so I gave it per-issue rows and set `cursor` to 0, as real queues are created. New tests cover:
- the two #3563 situations (sub-PR at `⚠️`, and sub-PR ready and waiting for merge, each with a pending issue behind it) in sequential and graph queues.
- the same in a parallel queue, where the pending issue can't be dispatched.
- a graph issue whose prerequisite is merged still starting next, until the parallel limit is 1.
- a parallel issue starting next whether or not the dispatcher has claimed it.
- a chain starting the next issue after a merged head the queue hasn't moved past yet.

With the original source swapped back in, 16 tests in this file fail: all the new ones except the two "starts next" positive checks, plus existing ones that now use the realistic `cursor` of 0. With the fix, all of them pass.

One behaviour to know about: in parallel and graph queues, an issue the dispatcher has claimed but that hasn't started running still shows as "starts next". The sequential queue already behaved this way.

No previews were made: the change is only to the status text and title on PRs, with no UI.

Acceptance criteria
- AC1: met — `pullRequestStatusEpicFacts.ts` (`nextQueuedIssue`); tests "sequential/graph: a sub-PR that needs a person…" and "parallel: a sub-PR that needs a person shows ⚠️…" in `packages/core/test/pullRequestStatusEpicSync.test.ts`
- AC2: met — `pullRequestStatusEpicFacts.ts`; tests "sequential/graph: a ready sub-PR waiting for a human merge…", the parallel test's ready step, and "a ready sub-PR waiting to be merged shows ⚠️…" in `pullRequestStatusEpicSync.test.ts`
- AC3: met — `nextQueuedIssue` uses `epicQueueSchedule` (prerequisites, slot limit, claims); tests "a graph issue whose prerequisites are merged and that has a free slot starts next…", "a parallel issue that is pending and unclaimed starts next…", "a chain starts the issue after a head that merged…"
- AC4: met — the new tests check that the title settles to `⚠️ 1/3 [Epic] Scheduler primitives` (`settledTitle` in `pullRequestStatusEpicSync.test.ts`)
- AC5: met — the #3563 regression tests in `pullRequestStatusEpicSync.test.ts` fail when run against the original `pullRequestStatus.ts` and `pullRequestStatusEpicFacts.ts` and pass with the fix
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=6
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 6)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-dev[bot]

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR replaces legacy cursor-based status inference with per-issue queue state and scheduler eligibility. The change is focused and appears merge-ready within scope, conditional on the four pending test shards completing successfully.

✅ Scheduler reuse — Eligibility now accounts for dependencies, occupied slots, execution mode, and existing dispatch claims through the queue’s shared scheduler and adapter.

✅ Correct issue focus — The status computation selects the eligible issue by number instead of always naming the first pending issue.

✅ Regression coverage — Added tests exercise waiting sub-PRs across all three execution modes, graph slot limits, dispatch claims, and advancement past a merged head.

This assessment is based on static review of the supplied diff and surrounding context; no commands or tests were run.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Test selection beyond the first pending issue

Add a graph case where the first pending issue has an unmet prerequisite but a later pending issue is eligible. Assert that the body names the later issue. The new nextIssue lookup handles this explicitly, but the added positive cases have only one pending plan issue. This would strengthen coverage of the focus-selection change without blocking merge.

S2: 🟢 Cover terminal-policy advancement

Consider testing a closed predecessor under both advanceOn: 'terminal' and advanceOn: 'merged'. The new normalization explicitly distinguishes these policies, while the added advancement regression covers a merged predecessor. This is optional coverage for an otherwise straightforward branch.

Score

The implementation is localized, reuses existing scheduling rules, and includes substantial regression coverage. No verified merge blockers were found; the supplied current-head status reports no failures, with four test shards still pending.

Score: 9/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 32s
  • Tokens: 46,814 (46,337 in / 477 out)
  • Cost: $0.38

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 17, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3589 by Claude Opus 5.5] Epic PR status: show "needs you" when a sub-PR is stuck or waits to be merged, instead of "#N starts next" ✅⑨ [3589 by Claude Opus 5.5] Epic PR status: show "needs you" when a sub-PR is stuck or waits to be merged, instead of "#N starts next" Nov 17, 2026
@integry
integry merged commit 9057142 into 3589-epic-0-9-y3w Nov 17, 2026
57 checks passed
@propr-dev propr-dev Bot changed the title ✅⑨ [3589 by Claude Opus 5.5] Epic PR status: show "needs you" when a sub-PR is stuck or waits to be merged, instead of "#N starts next" [3589 by Claude Opus 5.5] Epic PR status: show "needs you" when a sub-PR is stuck or waits to be merged, instead of "#N starts next" Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant