Documentation
¶
Overview ¶
Package cireceipt is the run receipt the ci-ok job of .github/workflows/ci.yml writes at the end of every run: one ev:github row of the workflow_run shape, sender "runner", appended through internal/ghevent. The signed webhook receiver sits behind a tailscale funnel kept off by design, so the runner is the event source: our runners are self-hosted on the tailnet and run as the bench seat, and the run reports itself from inside, with no GitHub call.
The row's reader is ghevent.Reader (internal/ghevent), which blocks on ev:github for the pull requests it names and reads repo, number, kind, action, head, sender and at. The fields are exactly the ones `nova-sprint ci github --from-runner` wrote, so that reader is unchanged. The ci:<repo>:<sha>:gh fold and the pr:<repo>:<n> claim that verb also wrote are not written here: their only readers were nova-sprint's own (land pr, read brief --pr, its Lua).
A refused receipt names every refused field and what each wants in one error; a failed write is an error the verb turns into a red ci-ok, because a receipt that silently did not happen must never read as one that did. Repeat receipts from retries or reruns are acceptable wake hints for stream consumers.
Index ¶
Constants ¶
const Sender = "runner"
Sender is the ev:github sender of a row the runner appended.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Receipt ¶
type Receipt struct {
Repo string // owner/name
SHA string // the head the run tested: the PR head, else github.sha
RunID string // decimal github.run_id
PR string // the pull request number, "" when the event names none
Workflow string // github.workflow; runs of blanks become one dash
Conclusion string // job.status of ci-ok: success, failure or cancelled
At string // RFC3339; "" means Now()
// Now is the clock an empty At is stamped from; nil means time.Now.
Now func() time.Time
}
Receipt is one run's result as the runner reports it.