Skip to content

fix(flow-next): check depends_on_epics in cmd_ready#95

Open
possibilities wants to merge 1 commit intogmickel:mainfrom
possibilities:fix/ready-check-epic-deps
Open

fix(flow-next): check depends_on_epics in cmd_ready#95
possibilities wants to merge 1 commit intogmickel:mainfrom
possibilities:fix/ready-check-epic-deps

Conversation

@possibilities
Copy link
Copy Markdown

@possibilities possibilities commented Mar 18, 2026

Hello, really enjoying this project, thanks for making it and making it public (also huge compliments on your website!). If you're interested I made this patch for an issue I ran into.

I use flowctl's CLI commands directly rather than through Ralph/flow-next-work. The ready command doesn't check depends_on_epics, so blocked epics report their tasks as ready. next already has this check — this patch adds the same gate to ready.

With epics fn-1 → fn-2 (depends_on_epics), fn-1 not done:

  • Before: flowctl ready --epic fn-2 returns root tasks as ready
  • After: returns empty with epic_blocked_by: [fn-1]

Anyway, thanks for everything. This is what the robots are saying about it:

cmd_ready only checked task-level depends_on when determining which tasks are ready. It ignored the epic's own depends_on_epics field, so tasks in blocked epics were reported as ready to work on.

cmd_next already handles this correctly (lines 4425-4441) by filtering out epics whose depends_on_epics aren't all done. This adds the same gate to cmd_ready: if the epic is blocked by unfinished prerequisite epics, return empty ready/in_progress/blocked lists with a new epic_blocked_by field in JSON output.

The bug is latent in flow-next's default workflow because Ralph uses next exclusively and flow-next-work only calls ready on pre-validated epics. External consumers that call ready per-epic independently hit it immediately.

cmd_ready only checked task-level depends_on when determining which
tasks are ready. It ignored the epic's own depends_on_epics field,
so tasks in blocked epics were reported as ready to work on.

cmd_next already handles this correctly (lines 4425-4441) by filtering
out epics whose depends_on_epics aren't all done. This adds the same
gate to cmd_ready: if the epic is blocked by unfinished prerequisite
epics, return empty ready/in_progress/blocked lists with a new
epic_blocked_by field in JSON output.

The bug is latent in flow-next's default workflow because Ralph uses
next exclusively and flow-next-work only calls ready on pre-validated
epics. External consumers that call ready per-epic independently hit
it immediately.
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.

1 participant