Landing through sluice
flume lands nothing itself. Once a landing kind’s last stage delivers, flume submits the place to the merge queue, reads the outcome at the settles that follow, and tidies the place once the work lands. The merge queue flume works with is sluice, which tests each submission merged with everything queued ahead of it and lands it only when that passes.
Binding sluice
Section titled “Binding sluice”A repository names its merge queue in .config/flume.toml:
[profiles]merge_queue = "sluice"A launch of a kind that lands is refused in a repository that binds no
merge queue. flume never assumes one because sluice is installed or the
repository holds a .config/sluice.toml.
Once bound, flume reads where the base lives from the repository’s
sluice policy, .config/sluice.toml, at the base’s current revision,
and has sluice make each place ready and release it:
In .config/sluice.toml |
What happens in a place |
|---|---|
[branches."<base>"] remote |
flume cuts each place’s branch from that remote’s copy of the base, after one fetch, and judges a branch’s commits against it at the tidy |
[tests] toolchain, [tests] runner |
flume runs sluice equip <base> --at <revision> --json in each new place, at the revision its launch read, and sluice equips it as it equips its own runs’ working copies: the toolchain, then the runner’s install of what the place pins, its version check and its setup (making a place ready) |
| always | flume runs sluice release in the place before removing it |
flume reads no [tests] key itself. Which steps a place’s readiness
runs, and what they install, is sluice’s to read from the policy and
the place. The sluice that runs them is the one the host user’s login
PATH finds, 0.67.0 or later, the first release with sluice equip.
The submission
Section titled “The submission”Once the last stage has delivered and its agent has ended, a settle runs, in the place:
sluice submit <base> --drive <drive> --no-wait --json<drive> is the place’s drive, the one status gives it, local among
them, so sluice keeps the submission in its store of that drive. flume
strips every terminal multiplexer’s session from that command’s
environment: herdr’s HERDR_*, tmux’s and zellij’s. So sluice records
the place’s worktree as the submitter and pushes no outcome into a
pane. flume never passes --check, never waits on the verdict, and
never submits through any other tool. What sluice does with the
submission, testing it on the host or opening a pull request where the
base takes them, is sluice’s policy.
The agents never submit. flume’s Claude Code plugin refuses
sluice submit, git push, and worktrunk’s wt submit and wt merge
in an agent flume started, and tells it to commit and leave the rest to
flume.
--hold-submission at the launch, or flume hold <place> --submission "<words>" before the last stage delivers, holds the submission until
flume retry <place> --submission.
Reading the outcome
Section titled “Reading the outcome”Each settle after the submission:
- runs
sluice inbox --jsonin the place, which gives each outcome sluice owes the place’s worktree, and acts on each; - once the place’s state holds what an outcome decided, confirms it
with
sluice confirm <key>, so no later inbox gives it again.
An outcome a settle could not act on stays unconfirmed, and the next settle is given it again. An outcome of an earlier submission of the place, given again after the place was submitted anew, decides nothing: flume confirms it and sends nothing back for it.
sluice’s queue moves on its own once submitted, whichever way runs it:
sluice’s own host process, which the submit starts, a daemon on this
machine or another, or a forge’s jobs. flume runs no round of it. Each
settle only reads the outcome, and that read starts sluice’s host
process again where work waits and none runs. So flume needs sluice
0.114.0 or later, the first release that takes a submission’s drive,
whose own process moves its queues as every release from 0.97.0 does.
flume reads sluice’s version, sluice --version, before each submit.
From an older sluice, or one whose version names no release, as a build
of sluice’s main does, it submits nothing: the place waits for you, with
words naming what sluice said and the release flume needs. Once sluice
is updated, flume retry <place> --submission submits it.
sluice can decide a submission as it takes it in, as it can on a base
that takes pull requests when the work conflicts with the base. Its
answer to the submit is then the entry’s record. flume reads that
outcome from the answer in the same settle, as it reads one from the
inbox, and once it has acted on it confirms it with sluice confirm by
the key the answer gives, so no later inbox gives it. A
conflict there starts the fix round as any other does, never a wait as
if sluice refused the submission.
A submitted place has no agent left in it, so no agent’s quiet runs
those settles. A caller keeping watch over the host runs them: flume settle --every <time>, run on that bound from a timer of the host’s or
whatever else keeps time there, settles the places where something is
pending, an agent in them or none, a place whose submission is in flight
among them. So every submitted place has its outcome read within the
bound
(keeping watch over the host).
A place that waits only on its caller is not read by the watch: a
branch landed by hand while its place held its submission is read at
flume settle naming no place and stating no bound, or at your next
command on that place. While no caller keeps watch, flume runs
attended: every command of flume’s that acts settles the places where
something is pending first, so a submitted place moves at your next
such command. Status says which of the two holds, under the host’s
part.
A base that takes pull requests
Section titled “A base that takes pull requests”Where the base takes its work as pull requests, sluice pushes the place’s branch and opens its pull request, or updates the one open. Until sluice takes the request in as an entry, its answer names the pull request and no entry. The request may wait for a review the base asks for, or for the host that takes the base’s requests in. The submission is then open and waiting, never refused, and the place waits on nobody. Status names the pull request and says it is not yet taken in, and sluice takes the request in wherever its queue runs.
Once sluice takes the request in, flume follows the entry it made,
which sluice records as submitted from pull/<n> and from the place’s
branch. sluice delivers that entry’s outcome to the pull request
rather than to the place, so flume reads the landing, the failure or
the conflict from sluice’s record of the entry. An outcome the inbox
still holds for the place counts too, and flume acts on whichever
comes first, once. After a fix round flume submits again, sluice
updates the same pull request, and the entry that failed counts for
nothing while the update waits to be taken in.
Whose outcome counts
Section titled “Whose outcome counts”flume reads landed, failed and conflicting outcomes from sluice’s record, never from an agent and never from the base’s history. A submission sluice already held for the branch from before the launch counts for nothing, so a place reusing an earlier place’s name never reads that place’s outcome.
What each outcome does
Section titled “What each outcome does”- Landed. The work is over. flume records the landing commit,
delivers
submission landed <commit>to each recipient, and tidies the place: the worktree goes, and the branch with it, since the base now holds its commits. - Failed. flume starts the kind’s fix round: the stage the kind’s
last stage names for a failure,
codefor the built-in kinds, with sluice’s words, naming the failed check, in its prompt. The stages after it run again in order, and the place is submitted again once the last delivers. - Conflict. The same fix round, with words naming the contested files, the entries ahead it conflicts with where sluice names them, and the base revision sluice tested against. Where sluice found the conflict before any test, that revision is the base’s current one. The built-in prompts tell the agent to merge that revision into the place’s branch, resolve each file and commit, never to rebase or rewrite a commit already on the branch.
- Withdrawn or refused. A pull request closed without landing
counts as refused. flume records the outcome and delivers
it, and the place waits for you:
flume retry <place> --submissionsubmits it again, andflume drop <place>gives it up.
Each fix round counts toward the kind’s bound, three goings-back unless
the last stage sets max_send_backs, together with found work from
the last stage where its on_fail names a stage before it. Found work
from a last stage that is its own fix round, as fix’s and chore’s
code is, sends nothing back and counts nothing: the place waits on an
answer. Past the bound the place waits on you with the last words, and
a retry starts it again.
Branches that land on branches
Section titled “Branches that land on branches”Work can land on a branch that itself lands: several changes gathered
on one branch, tested there one by one as each lands, and landed on
main together once the last is in. In flume that branch is a place’s,
a base place: a place whose kind lands and has no stages. It runs no
agent and has no worktree. It is its branch, which sluice makes and
removes at flume’s asking, and the state flume holds of it. The same
holds at every depth: a base place’s branch can itself be the base of
another base place.
A kind with no stages
Section titled “A kind with no stages”flume carries no such kind. A repository declares one, as here, or a source on the host or a launch’s file does (a kind with no stages):
[profiles]merge_queue = "sluice"
[kinds.train]branch = "train"lands = truestages = []flume tells a base place by its kind’s shape alone, a kind that lands
with stages = [], never by the kind’s name, its branch’s prefix or
how deep it sits. Its branch is one sluice lands work on, so the
repository’s sluice policy names a table for it beside the base’s:
[branches."train/*"]
[branches.main]Launching one, and the places on its branch
Section titled “Launching one, and the places on its branch”flume launch --kind train --name spring --base mainflume writes the place’s state, then has sluice make the branch,
sluice branch create train/spring --from main --json, run in the
repository. Nothing else is made: no worktree, no readiness, no agent,
and the place takes none of the host’s room. Where sluice refuses the
branch, the launch is refused with sluice’s words and leaves nothing.
The place is named as any other, train--spring, by the location its
repository’s places take, and nothing stands at that location.
Places launched with --base train/spring are cut from that branch,
where sluice says it lives, and land on it through sluice, as places
on main land on main. A fix, a chore or a change runs through as
it would anywhere. A launch on a branch flume holds is refused, naming
the place that holds it, in three cases:
- the branch is a place’s that is no base place, since its worktree checks the branch out and a landing would move it under the place’s agent;
- the base place’s submission is open, since work landing on its branch then would land after the revision sluice is testing;
- the base place’s work is over.
A branch no place of flume’s holds, your own or one a tool made, takes launches as any base does.
Its submission
Section titled “Its submission”A base place has no last stage, so nothing submits it on its own. While
a place on its branch is live, the base place waits on them, never
stalled, and status says so. Once every one has landed or been dropped,
it waits on you, and stalls as any wait on its caller does unless a
hold’s words keep it: flume hold train--spring --submission "<words>".
You submit it when the branch holds what it should:
flume retry train--spring --submissionThe retry is refused, naming them, while a place on its branch is live. Otherwise flume runs, in the repository,
sluice submit main --head train/spring --drive local --no-wait --jsonsince the place has no worktree to submit from. That needs sluice
0.71.0 or later, the first release that takes a branch named as its
head from no worktree. sluice tests the branch merged with what is
queued ahead of it on main, as it tests any submission.
Where its outcome is read
Section titled “Where its outcome is read”No inbox gives a base place’s outcome, since sluice delivers an inbox
to a worktree. flume reads it from sluice’s record of the branch, the
entry sluice status main --all --json gives for train/spring, at
the settles after the submission, and acts on it once. The outcome
reaches the place’s recipients as any end does. A caller keeping watch
moves it as it moves every submitted place.
Its fixes
Section titled “Its fixes”A kind with no stages may name its landing fix, the kind its fixes run
as, by landing_fix, and how many fixes it runs before its place waits
on you, by max_landing_fixes:
[kinds.train]branch = "train"lands = truestages = []landing_fix = "flume/fix@1"max_landing_fixes = 2landing_fix is the fix kind’s whole identity, its source and its
version, here flume’s own fix@1; a kind the repository declares is
named as repo/<name>@<version>. flume resolves it when the base place
launches, and refuses the launch where it names no kind it can run as a
fix. Left out, max_landing_fixes is three (a kind with no
stages). For a base place
whose kind names a landing fix, flume watches its branch against its
base while it waits on you. At each settle, while no place on its branch
is live and its submission isn’t open, flume asks sluice for a
forecast, run in the repository:
sluice submit main --check --head train/spring --jsonsluice forms the merge it would test, behind everything queued on
main, and submits nothing. Status gives the newest forecast.
A forecast in conflict with main itself, or a failed or conflicting
submission, launches the fix on the branch at that settle, with no word
of yours. The fix is a place of the kind named, cut from train/spring
and landing on it. It’s named for the base place and the fix’s number,
spring-1, and runs in the base place’s stream, at its priority,
delivering to its recipients. Its brief is one line saying what it’s for
over sluice’s words. For a conflict, that line asks it to merge the
revision of main sluice names into the branch first, resolving the
files contested; for a failure, to make the branch pass the checks that
failed. A forecast that conflicts only with work queued ahead launches
nothing, and the next settle forecasts again.
flume runs one fix at a time and acts on each forecast and each
submission once. Every fix counts toward the kind’s bound, a launch
flume could not make among them. Past the bound, or once you drop a
fix, the base place waits on you with sluice’s words: launch a fix of
your own with --base train/spring, or drop the base place. Once a fix
lands, the next forecast decides. Where it’s clear, the base place
waits on you to retry its submission, which stays yours.
A base place whose kind names no fix waits on you after a failed or
conflicting submission, with sluice’s words: the failed check, or the
contested files and the revision of main sluice tested against. To
fix it, launch a fix with --base train/spring and those words as its
brief. A conflict’s fix merges that revision of main into its branch
first, as any conflict’s fix does. Once the fix lands on
train/spring, retry the base place’s submission.
Taking its base in
Section titled “Taking its base in”A base place falls behind its base as work lands there. You bring that work onto its branch through sluice, with no agent:
flume take train--springflume submits main, by name at the revision where sluice says it
lives, to train/spring, running in the repository
sluice submit train/spring --head main --drive local --no-wait --jsonsluice forms the merge of main onto the branch, runs the branch’s
checks and lands it, as it lands any submission. flume waits on none of
it: the answer names the take, its number, the revision of main it
took and that it’s open. Each settle after it reads the take from
sluice’s record of train/spring, never an inbox, and acts on it once:
- A take that lands brings the work of
mainonto the branch, and the base place goes on as before. - A take in conflict, or one that fails, launches the base place’s fix
as a conflicting or failed submission does. Its brief asks it to merge
maininto the branch first, resolving the files contested, or to make the branch pass the checks that failed. Where the kind names no fix, the base place waits on you with sluice’s words. - A take sluice refuses or withdraws leaves the base place as it was.
A take that doesn’t land reaches the place’s recipients as an end of
its own, keyed take/<n>. While a take is open, flume forecasts
nothing of the branch, a retry of the base place’s submission is
refused naming the take, and the base place waits on the merge queue
rather than on you. Asking again while one is open answers that take.
The ask is refused for a place that is no base place, while the base
place’s submission is open or its fix is live, and once its work is
over. flume never takes a base in on its own: a settle asks no take,
however far behind the branch falls.
Dropping it, and its tidy
Section titled “Dropping it, and its tidy”flume drop train--spring is refused, naming them, while a place on
its branch is live: drop those first. A landed or dropped base place
is tidied with no worktree to remove and no teardown to run. flume has
sluice remove the branch, sluice branch delete train/spring --into main --json, and never deletes it itself. Where sluice keeps the
branch, holding a submission or work main lacks, the answer to the
act that removed the place names it once with sluice’s words. While
it stands, a launch that would make the branch again is refused.
What sluice never does to a place
Section titled “What sluice never does to a place”sluice removes nothing of a place: its worktree and its branch are flume’s to remove, at the tidy, by flume’s own judgement of which commits the base lacks. sluice never moves the place’s branch, and flume moves only that branch, at the launch and at the tidy.