Expand description
Host-driven flows, the shared engine of the CLI, the MCP server and the
TUI: create the issue, make the branch on the host, find what the host or a
bot made for an issue, wait for it. Everything here is a function over a
HostingClient, so a fake transport tests it and the three frontends
cannot drift apart. The loops (sleeping, cancelling, drawing a spinner) are
the frontend’s: it asks find_for_issue again after backoff.
Structs§
- Found
- What the host (or a bot) made for an issue, as far as it could be told.
- Host
Made - What
host-creates-branchmade.
Functions§
- backoff
- How long to wait before asking the host again after
attempttries (0-based): 1 s, 2 s, 3 s, 5 s, 8 s, then every 10 s. Bounded so a bot that takes minutes costs a few dozen cheap calls, never a hammered host.GITPOULPI_FLOW_POLL_MSfixes the pause (tests and benches). - create_
issue - Creates the issue of
draftonproject. - find_
for_ issue - Asks the host what exists for issue
number: its own links, the branches matching the workflow’sbranch_from_issueand the requests whose source branch does. A source that fails is noted, not fatal; when every source fails the error of the first is returned. - host_
creates_ branch - Creates
namefromfromon the host for the issue and, whenopen_request, a draft merge request intotargetthat closes the issue. - issue_
branch_ name - The name the host-made branch of issue
numbergets: the workflow’sbranch_from_issuewith the type, the issue number and the title’s slug.