Skip to content

The rest of the Ready issue rule, and saying why an issue was passed over #283

Closed

Description

@JacobStephens2

Parent

#212

What to build

The remaining parts of the Ready issue rule, and a line on stderr for each ready-for-agent issue a Pickup run passed over, so the cron log explains why nothing started.

An open issue labelled ready-for-agent is also not a Ready issue when:

  • it has a parent issue. A Ticket is reached through its Spec, when the Spec is itself a Ready issue, and is never promoted to it;
  • it is labelled base-fix: the Run that opened it owns it;
  • it has an open blocker, as GitHub's issue dependencies report it;
  • it is not settled: fewer than ten minutes have passed since the latest of ready-for-agent being applied, a sub-issue being added or removed, and a "blocked by" link being added or removed. These are read from the issue's timeline, because adding a sub-issue does not change the issue's update time. The ten minutes is fixed, with no setting.

Each issue passed over, for these reasons or the ones from the Ticket before, gets one line with the first reason that applies, such as #21 is a Ticket of #20, which is not ready or #30 blocked by #29. The lines come before the line that says what the pass did.

Acceptance criteria

  • A ready-for-agent sub-issue is never run on its own, whatever its Spec's labels.
  • A ready-for-agent Ticket whose Spec is not a Ready issue gets a line naming the Spec, and the Spec is not run.
  • A Spec that is itself a Ready issue is taken, and its Tickets get no passed-over lines.
  • An issue labelled base-fix is not taken.
  • An issue with an open blocker is not taken; with that blocker closed, it is.
  • An issue labelled ready-for-agent less than ten minutes ago is not taken; one labelled earlier is.
  • A Spec labelled long ago that had a sub-issue or a "blocked by" link added less than ten minutes ago is not taken.
  • An issue passed over for being unsettled is taken by a later pass once it has settled.
  • Each passed-over issue has exactly one line, naming the issue and the first reason that applies, including an Unready label, an existing Issue branch or pull request.
  • When a later issue is a Ready issue, the earlier ones' lines are printed and the Ready one is taken.
  • The README states the whole Ready issue rule and shows the lines.
  • End-to-end cases cover the above, with the fake gh gaining an issue's parent and its timeline events, whose timestamps a test sets relative to now.

Blocked by

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions