T4 epic · devops / release engineering — time is a first-class citizen. The train holds withnika:wait until:(an absolute timestamp — not a sleep), the gates’ duration is computed withnika:date op: diff, a human signs the departure, and the record lands in the journal whether the ship succeeded or not.
The job
Release day choreography: tests, lint and audit run as one parallel wave; an assert refuses departure on any red; the conductor signs with full information (« gates GREEN in 12 min — ship 1.4.0 in the 09:00Z window? »); the train holds until the window; ships; re-polls prod until it reports the new version; andon_finally files the departure
record either way.
The shape
The file
t4-release-train.nika.yaml
How it works
until: is a hold, not a sleep
nika:wait with until: 2026-07-28T09:00:00Z parks the train at
an ABSOLUTE time (capped by timeout: 48h). A relative duration:
would drift with however long the gates took.The human signs with full information
nika:date op: diff computes the gates’ wall time, and the
nika:prompt message carries it — the conductor decides knowing
how fresh the green is. The assert after makes « no » terminal.Constructs you just used
Make it yours
- Generate the notes on the same train: insert Release notes between
approvedandhold. - Canary first: duplicate
ship/verifyagainst staging, gate prod behind a second assert. - The window var makes this a scheduled artifact — your cron passes next Tuesday 09:00Z, the train handles the rest.
Back to all examples
The full gallery — 20 workflows, four tiers, every construct taught
by a real job.