Documentation
¶
Overview ¶
Package findings reads a review's findings file in the shape steps/review.md fixes: a `key: value` header, a categories list, and a block per finding with the verdict and reason resolve appends.
Index ¶
Constants ¶
const LastRound = 2
LastRound is the highest round a task gets: round two exists so fixes get read, and a third reviewer would only repeat it.
Variables ¶
var ErrNoHeader = errors.New("findings: no header")
ErrNoHeader is a file without the header's task and round.
Functions ¶
Types ¶
type Decline ¶ added in v0.49.0
type Decline string
Decline is why no next round is allowed.
const ( // Unsettled is round one holding findings resolve has not answered: a // round two then could only say `still open`. Unsettled Decline = "unsettled" // Exhausted is the last round already written. Exhausted Decline = "exhausted" // Merged is a branch whose content main already holds. Merged Decline = "merged" )
type File ¶
type File struct {
Task string
Round string
Reviewed string // the sha, plus ` dirty` when the tree differed
PR string // the PR reviewed (`#204`), `none`, or empty in a file older than the line
Reviewer string // `local`, a remote identity, or both: `local, claude[bot]`
Verdict string // clean or findings
Categories map[string]int
Findings []Finding
}
File is one findings file.
type Finding ¶
type Finding struct {
ID string
Title string
Category string
Prior bool
Status string // prior round only: fixed, still open, ...
Source string // local or remote, in a file both halves wrote; empty: the header's reviewer
Verdict string // as written, attachments included: `skip +reply`
Reason string
}
Finding is one block. Prior-round blocks carry their round-one id and the status the second review gave them.
type Open ¶ added in v0.49.0
Open is a finding a decline names, with why it is still open: `no verdict`, `ask`, or the prior status that reopened it.
type Status ¶ added in v0.49.0
type Status struct {
Dir string `json:"dir"`
Latest string `json:"latest,omitempty"` // the highest round's file; empty with none
Round int `json:"round,omitempty"` // the next round; 0 on a decline
Path string `json:"path,omitempty"` // the next round's file
Decline Decline `json:"decline,omitempty"`
Open []Open `json:"open,omitempty"` // the findings behind the decline
// PR is the branch's open PR for the next round's `pr:` line, `none`
// without one; empty when the branch is not checked out here.
PR string `json:"pr,omitempty"`
// Archived is where a finished series moved before this round.
Archived string `json:"archived,omitempty"`
}
Status is a findings directory read for the next review: the latest round and the next one, or the decline that stops it.