beady-eye v0.31.0
Waiting on the dairy: in beady-eye 0.31, a gate opens when the bead it awaits closes, in any project
This post is more than a year old. It describes beady-eye v0.31.0; the latest release notes say what has changed since.
With bdi, a bead never needed a gate to wait on another
project’s bead. A plain dependency edge does it, and bdi draws
the other bead beneath the one waiting on it. If you would rather
use a gate, beady-eye 0.31.0 now settles it too: bdi gates
closes a bead gate as soon as it sees the awaited bead closed, in the
same tracker or in another project the config names. Nobody has to go
and run bd gate resolve.
brew upgrade codeforbreakfast/tap/bdi
# or
cargo install beady-eye
bdi gates closes the caff’s gate.
Read the demo as text
▾ spoon ✓ 2s ago 0/6 2 agents
├── ○ spoon-1 The caff serves oat milk 0/4
│ ├── ◐ .2 Steam oat milk without scalding it ◍ wK:p2 · working
│ └── ○ .1 Put the oat flat white on the board 0/2
│ └┄┄ ○ spoon-zv9 Gate: bead dairy-7
└── ○ spoon-2 The tea timer forgets the second sugar 0/2
└── ◐ .1 Count sugars per cup, not per order ◍ wK:p3 · working
reading spoon, where bdi was started --all-projects reads every project
───────────────────────────────────────────────────────────────────────────────────────────────────────
no pane · select a bead to see what is on it
a all ? keys / find q quit
spoon $ bdi gates &
[1] 2671107
spoon $ bdi gates: settling the gh:pr, gh:issue, gh:release, gh:run, timer and bead gates of 2 projects, for every owner's repositories, every 2s
bd -C ../dairy close dairy-7 --reason 'First crate dropped off'
✓ Closed dairy-7 — Deliver oat milk to the caff on Fridays: First crate dropped off
spoon $ Bead dairy-7 in dairy closed: spoon closed gate spoon-zv9
▾ spoon ✓ 7s ago 1/6 2 agents
├── ○ spoon-1 The caff serves oat milk 1/4
│ ├── ◐ .2 Steam oat milk without scalding it ◍ wK:p2 · working
│ └── ○ .1 Put the oat flat white on the board 1/2
│ └┄┄ ✓ spoon-zv9 Gate: bead dairy-7
└── ○ spoon-2 The tea timer forgets the second sugar 0/2
└── ◐ .1 Count sugars per cup, not per order ◍ wK:p3 · working
reading spoon, where bdi was started --all-projects reads every project
───────────────────────────────────────────────────────────────────────────────────────────────────────
no pane · nobody is working this bead
a all ? keys / find q quit
Waiting on the supplier
The simplest wait is an edge, written in the waiting bead’s own
tracker with the other bead’s bare id. bdi draws
dairy-7 beneath the oat flat white, and
bdi --beads counts it as a blocker where
bd ready cannot:
bd dep add spoon-1.1 dairy-7
If you prefer a gate, record it on the other bead’s id, and
bdi gates closes it when that bead closes:
bd gate create --type=bead --blocks spoon-1.1 --await-id=dairy-7
Either way, bdi finds a bead in another project by its prefix, so
give that project its prefix in the config. Without one,
bdi gates reports the gate on every look as one it cannot
settle, and says why.
[[projects]]
name = "dairy"
path = "/srv/dairy"
prefix = "dairy"
Where a producer reports changes to the dairy’s tracker, the
gate does not wait for the next poll either. The report wakes
bdi gates at once, so the gate closes moments after the
bead does.
A quieter pass after a merge
A merge sets off a burst of GitHub check deliveries. Each one now
reads only the trackers that changed, and settles its pull request
against the gates bdi gates already holds. Once
producers cover every tracker, that burst starts no bd
at all. There is nothing to change to get it.
Milk’s in. Order up.