A diff, then one word
batch-review
Review the feature diff. Then choose a path from one word: Clean, Findings, or Escalate.
This routine has no Ganda command. A parent routine runs it.
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.
return Routine.Named(RoutineId)
.Oracle<TaskWork.Continue>("batch-review", schema: "Continue.ClosedEnum", pack: Pack.Diff, budget: Budget.ByDiff)
.Compute("verdict", verdict)
.Switch<Verdict>(sw => sw
.When(Verdict.Clean, then => then
.Compute("accept", accept))
.When(Verdict.Findings, then => then
.Compute("brief-fixes", briefFixes))
.When(Verdict.Escalate, then => then
.Gate("human-review")))
.Build();The file is source/timewarp-taratibu/routines/batch-review/batch-review.cs. Taratibu master 53de8c4.
Why this shape
A review that says the work is mostly fine must not pass. The verdict node reads the heading ## Verdict. It accepts exactly one of three words. Any other text is Escalate. Other text can be no word, two words, or a paragraph. A bad review does not pass in silence.
What you get
- The pack name is Pack.Diff. The budget name is Budget.ByDiff. The host uses the diff size, and any TCB touch, to set the effort and the roster. The graph does not guess.
- Findings become fix rows at the top of the ranked list. The node brief-fixes writes those rows. Only that node, or a person, can change the list.
- Escalate is a gate. The campaign stops until a person looks at the diff.
Rules
- You can run this routine on a parent kitchen with no campaign. The campaign checkpoint is the connection that runs it on a schedule.
- If the review oracle is Blocked, the host stops the run.
- Clean ends at accept. That result is there so each name in the switch has a node.
The drawing follows the D2 file in the repo. Node ids do not change. Ganda connects the commands. Ganda does not change the graph.