An approved list
campaign
Run the ranked rows of a parent kitchen, one slice at a time, on a feature branch. Then stop. A person merges the pull request to master.
ganda task campaign <parent>
Select a node, or run the path that the host uses.
How you write it
You write the routine in C#. Each call adds one node. Build makes the intermediate representation.
public static RoutineDefinition Build()
{
return Routine.Named(RoutineId)
.Compute("load-charter", LoadCharter)
.Compute("walk-campaign", WalkCampaignAsync)
.Compute("campaign-outcome", Decide)
.Switch<CampaignOutcome>(sw => sw
.When(CampaignOutcome.Failed, then => then
.Compute("stop", Stop))
.When(CampaignOutcome.Stopped, "stop")
.When(CampaignOutcome.Succeeded, then => then
.Compute("audit", TaskWork.Audit)
.Compute("open-master-pr", OpenMasterPr)
.Gate("human-merge")))
.Build();
}The file is source/timewarp-taratibu/routines/campaign/campaign.cs. Taratibu master 53de8c4.
Why this shape
The old cockpit did this work with a model. The model wrote a brief, did the task, merged, and added a next task. Campaign is that work as a routine. The ranked list is the only source of slices. The cockpit runs the routine and answers the gates. The cockpit does not move along the graph by hand.
What you get
- load-charter stops the campaign when the decision file is absent. It also stops the campaign when the feature branch is empty, master, or main.
- The slice budget is a hard limit. If rows remain when the host reaches the limit, the result is Stopped. That result is not a success.
- The first failure stops the campaign. There is no flag to continue after an error.
- Master is a gate. merge-feature goes only to the feature branch.
Rules
- The normal branch name is feature/campaign-<parent>. If you pass --into, the name must not be master.
- The normal slice budget is 5. --checkpoint-every sets how often batch-review runs.
- A child gate or a Blocked node stops walk-campaign. A later run uses the child journals again. The host finds them by nest path.
- Only brief-fixes, or a person, can change the list. brief-fixes puts fix rows at the top.
This routine starts
The drawing follows the D2 file in the repo. Node ids do not change. Ganda connects the commands. Ganda does not change the graph.