Documentation
¶
Overview ¶
Package decide is ynf's decider (ADR-006): a pure function from (lane, item, facts, event) to (next item, actions). No I/O, no clock (time comes from the event), no model calls. Given the same inputs it returns the same decision, which is what makes `ynf replay` possible.
Index ¶
Constants ¶
View Source
const ( Run = "run" // start the lane's runner on a fresh worktree OpenPR = "open_pr" // diff gate, commit with trailers, push, open or update the pull request PushCommit = "push_commit" // adopted items: diff gate, commit, push to the pull request's branch, never forced Escalate = "escalate" // tell a human, on the ticket Quarantine = "quarantine" // tell a human the item was taken out of rotation Comment = "comment" Close = "close" // Label is the lane's labels for a state the item enters; the engine writes them as the item // moves, so they follow the decision without being one. Label = "label" )
Action kinds the engine carries out. Each is idempotent per step (ADR-005).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
Kind string `json:"kind"`
Feedback string `json:"feedback,omitempty"` // for run: what the runner is told
Reason string `json:"reason,omitempty"` // for escalate, quarantine, comment
}
Action is one thing for the engine to do.
type Decision ¶
type Decision struct {
Item item.Item `json:"item"`
Actions []Action `json:"actions,omitempty"`
Reason string `json:"reason"`
}
Decision is the decider's output.
Click to show internal directories.
Click to hide internal directories.