Chapter 14 · agent-neuron · Lab
Quorum
Two reviewers choose on their desks, a threshold-two tally hears them together, the lead’s gate is a real git merge, and an ungranted answer is refused at the desk itself.
Two patches, one merge
Two agent branches wait on real branches of a scratch git repo, one patch each. Ada and Lin, the reviewers, choose on their desk pages; the tally joins their answers at a threshold of two; and the lead’s gate is what drives the merge: a real git commit in the run’s log, an effect, so nothing newer can cut it once it is going.
The other surface the run proves is who may answer. The run is given its grants as a file (which human neurons each person may answer), so when Lin tries to answer the lead’s merge question from her own page, the desk refuses her at its POST, and the item keeps waiting. --tie runs the other take: the reviewers split this time, the tie goes to the lead, Sam says No, and nothing merges.
The git is real in both takes: the terminal prints the scratch repo’s branch graph first (main and two agent branches) and its git log after, the merge commit in it, or nothing where the lead refused.
The rule it proves
The quorum is a plain threshold (SPEC 5.2): distinct senders on one ask, in arrival order, no weights. The reviewers and the lead are human neurons on the desk (3.4, decision 0008), and the merge is declared an effect (11): the commit is recorded, and staleness never cuts a started one.
Who may answer what is the run’s grant list (decision 0010): the desk checks every answer at its POST, refuses what is not granted, and keeps each accepted answer with who and why on the record; the names live on the desk and in no protocol body. The gate is one item among the others, and the refusal is the surface working as a referee.
Run it
npm run demo quorum -- --headless --pace 3 # the reviewers and the lead answer on their desks, watchably
npm run demo quorum -- --open # the same, with a desk page open per person
npm run demo quorum -- --headless --tie # the tie: the lead refuses, and nothing mergesWhat it is not
Not a review app: the people, the patches and the scratch repo are invented and rebuilt on each run, the desk’s record dies with the run (holding asks across a restart is still the build order’s open item, issue #30), and the grants are a local file, not accounts.
