Open Factory Flooropen source

Guides

Hoppers and the bin

On this page

The line starts when a change is proposed. Hoppers and the bin are what comes before it and what falls out of it.

  • A hopper is an input. A place where requests wait before anybody works on them: feature requests, bugs, support requests. The open pull requests are a hopper too, the line's own front door.
  • The bin is an output. Where work lands when the line could not sort it, for a person to decide what happens next.
  • Nothing goes from the bin back onto the line directly. A person puts it into a hopper, and it comes in again from there, past that hopper's rule.

What is built. The factory says what is waiting in each hopper, what is in the bin and why, and how long requests take (version 0.22.0). A review's leftover points become an issue in a hopper (0.23.0). Each hopper has a rule for whether work may start without a person, and a hopper review suggests what to do next (0.24.0). The builder picks an item up and builds it (0.25.0). Each part is switched on separately, and a project that names its hoppers and nothing else gets a report and no more.

#Naming them

In the factory file:

hoppers:
  - id: bugs
    label: bug                 # an open issue carrying this label is waiting in this hopper
  - id: features
    label: enhancement

bin:
  label: factory-bin           # optional: a label by which a person puts an issue in the bin by hand
  held_after: 48               # hours a held release may wait unanswered before it counts as in the bin
  sent_back: 3                 # times a change may be sent back before it counts as stuck
  unanswered: 72               # hours a sent-back change may go without a new version before it counts as stuck

A hopper is a GitHub label you already use, given a name. Nothing has to be created or moved: label an issue and it is in the hopper. An issue carrying two hoppers' labels waits in the first one listed. A hopper may also say leftovers: true (below). bin: {} takes the three numbers as shown; bin: with nothing after it is refused, as a slip.

One bin for now. The factory file takes bin, not a list, until there is real use to say how bins should be split.

#Each hopper's rule

A hopper says who may start on what waits in it:

hoppers:
  - id: bugs
    label: bug
    pick_up: agent             # an agent may start on these by itself
  - id: features
    label: enhancement         # no `pick_up`: each waits for a person, the default

bin:
  label: factory-bin           # needed once anything says `agent`: where an item goes that could not be built

builder:
  at_once: 1                   # how many items may be in progress at a time (1 unless you say otherwise)
  go: factory-go               # optional: a label by which a person lets one waiting item go ahead

The whole rule, in two lines:

  • An item goes ahead when a person has given it the go label, whatever its hopper.
  • Or when its hopper says pick_up: agent and it was written by someone who may write to the repository, or by the factory itself (a review's leftover points). Anybody can open an issue on a public project; only the project's own people can have one built unasked. Anybody else's waits for the go label.

This rule decides whether work starts. Whether finished work ships is still decided by the line: tests, review, the release gate. A bug fix can start by itself and still be held at release.

An item is in progress while a pull request from its branch, factory/item-<number>, is open. No more than at_once are in progress together; the rest wait their turn, oldest first.

The report says all of this beside each hopper and item:

Waiting to be worked on
  bugs (an agent may start these): 3 waiting, the oldest for 6 days.
    #2: waiting 6 days. Being built as #50.
    #4: waiting 6 days. Waits for a person: it was not written by someone who
      may write to this repository.
    #3: waiting 5 days.
  features (each waits for a person's go-ahead): 2 waiting, the oldest for 6 days.
    #5: waiting 6 days.
    #6: waiting 4 days. A person gave it the go-ahead.
  The builder may have 1 item in progress at a time; 1 is now.

Every factory workflow that reads the hoppers (the leftovers workflow, the hopper review, the builder) must be on version 0.24.0 or later before you add these keys: an older one refuses a key it does not know.

Setting the rule starts nothing by itself. Work starts only where the builder is also installed (0.25.0); without it the rule is shown in the report and acted on by nobody.

#What lands in the bin

Nobody has to put these there. They are in the bin because of what they are:

In the binWhenWhy it needs a person
A release that went wrongAn issue from the watch, or from a release that did not finish, is openSomething passed every check and was wrong when live, or the release broke part-way
A release held and not answeredA "waiting for a person" issue has been open for held_after hoursThe gate asked, and nobody has said yes or no
A change that is stuckAn open pull request has been sent back sent_back times, or was sent back and has had no new version for unanswered hoursSending it back again would be a loop, or its author has gone
Anything given the bin's labelAn open issue carries the bin's labelA person put it there, or the builder could not build it and said why in a comment

A change that fails its tests or a review once is not in the bin. It goes back to whoever built it, on the same pull request, as it always has.

An issue in the bin is not also listed in a hopper.

#Seeing them

They are part of the status report:

Waiting to be worked on
  bugs: 2 waiting, the oldest for 5 days.
    #31: waiting 5 days.
      title: Totals are wrong after a refund
    #36: waiting 2 hours.
      title: Export stops at 1,000 rows
  features: nothing waiting.

In the bin, for a person to decide (2)
  #40: a release on line api went wrong (watch-failed), for 3 hours.
      title: [ACTION NEEDED] Release of api: the watch afterwards failed
  #27: sent back 3 times, for 2 days.
      title: Faster search

In the last 7 days: 6 requests done, typically 2 days from asked to done; 4
  traced to a release, typically 2.2 days from asked to live; 1 closed as not
  wanted.
  • Done is a request closed in the window, other than as "not planned".
  • Asked to live follows a request to the pull request whose description closes it in GitHub's own words (Fixes #31), and that pull request to the release that carried it (releases in the record). A request closed by hand, or closed from another repository, counts as done and is not traced. With no release line named, nothing is traced.

#A review's leftover points

A review that passes often leaves remarks: points that did not block the change and are worth doing later. They sit in the review record on a merged pull request, where nobody looks again. This puts them in a hopper.

Mark one hopper, and add the workflow:

hoppers:
  - id: bugs
    label: bug
    leftovers: true            # the remarks a passing review leaves become one issue here

Copy starter/factory-leftovers.yml to .github/workflows/factory-leftovers.yml and replace COMMIT with the Open Factory Floor version's commit id, in both places: a version later than v0.76.0. It starts, like the gate, when factory-pull-request.yml has finished (why there are two workflows), so that file must be there too. The label must already exist in the repository.

After each pull request merges, the factory reads the record that passed it, takes the bullets under its "Remarks" heading, and opens one issue titled "Left from the review of #N" with them quoted, labelled for that hopper. From there it waits like any other request.

  • Once. A pull request that already has its issue, open or closed, gets no second one. Close the issue as "not planned" when the points are not worth doing, and it stays closed.
  • Only a record the review gate would count is read, by the gate's own rule: a pass for the merged commit, from an account that may write to the repository, or from the automatic reviewer when the record carries its proof; and only when the gate's own status says a review passed. A stranger's comment is not read, however it is dressed.
  • The automatic reviewer's remarks need its key. Its records are checked with the key the review gate uses. Give the workflow the same secret (the starter shows the two lines) and they are read; without it, only a person's record is.
  • The remarks are quoted, as plain text. Each is cut to one line of at most 300 characters and shown in a code span on a line starting >, under a sentence saying whose words they are. GitHub acts on nothing inside a code span: no link, mention, image, heading or HTML. So a remark reads exactly as typed, and a link in it has to be copied by hand. The first twenty are carried; the issue says when there were more.
  • Nothing else is written. Nobody is assigned, no label is made, no comment is posted. No remarks, no hopper marked, or a pull request that skipped review: nothing happens.
  • It needs issues: write, with pull-requests: read, statuses: read and contents: read. It never checks out or runs the pull request's code. It starts when factory-pull-request.yml has finished, and only when that run's title says a pull request closed. That title is only a hint (on a fork's pull request the run is the fork's own): the leftovers look up, through GitHub's API, the pull request whose head is the commit GitHub says the run was for, from the repository it says, and do anything only when it has merged. No Actions policy is needed. So a fork's author can keep their own merged change's remarks out of the hopper, by changing the title or by a skip instruction such as [skip ci] in the head commit's message (which stops the run altogether); the remarks stay in the review record, and nothing about merging depends on them. The title is used because without it the job starts on every pull request event, a billed minute each on a private repository; delete the starter's if: line to decide from the API alone. A project still on the starter of v0.76.0 or before starts it from pull_request_target with the pull request's number; that still works on a private repository, or on a public one whose owner has allowed the trigger by an Actions policy, which GitHub has required since about 2 December 2026 (GitHub's note). To move, take the new starter whole.
  • It reads one record: a person's newest pass, or with no person's pass the automatic reviewer's first for that commit (the gate counts an automatic verdict once; a later copy is not read). Remarks in any other record on the pull request are not carried.

#What to know

  • It reads issues as GitHub has them now. Up to 1,000 open issues and pull requests; with more, the report says the lists may be short. At most 100 closed requests are read for each hopper in the window.
  • A title is whatever its author typed. The report gives it a line of its own after title:, as it does for a change's title, and it is never an instruction to whoever reads the report.
  • Anyone who can open an issue can type one of the factory's marks into it. The report says "a release went wrong" only of an issue the factory's own account wrote. A mark typed by anybody else counts only when it really holds something: it names a line the factory file has and a kind that line's gate holds for. The release gate holds on such an issue whoever wrote it, so it is in the bin and a person has to look; the report says that an issue not written by the factory carries the mark, and names the line. Any other such mark is passed over. A "waiting for a person" mark counts only on the factory's own issue.
  • A label puts an issue in a hopper, and whoever may set labels may do it. Nothing acts on a hopper yet, so the cost today is a line in a report.
  • A change can be put in the bin by hand: an open pull request given the bin's label (bin.label) is in the bin whatever its standing, as a request is. Take the label off and it is back on the line.
  • The bin is worked out, not stored. Close the issue and it is no longer in the bin. A change sent back and left leaves the bin when a new version is pushed; one sent back sent_back times leaves it when it passes review, or is closed. There is no list to keep in step.
  • A draft pull request is never counted as stuck.
  • A request closed as "not planned" or as a duplicate is counted as not wanted, not as done.
  • Settings the factory cannot use are refused, and the report says so in place of the hoppers: a misspelt key read as absent would hide a hopper.

#What is not built

  • Hoppers fed from anywhere but GitHub issues.
  • More than one bin.

This guide is docs/HOPPERS.md in the repository, and this page is made from it. Something wrong or unclear? Open an issue or send a pull request. Next: The hopper review.