Documentation
¶
Index ¶
Constants ¶
View Source
const StatusOrphan = "orphan"
StatusOrphan marks a worktree on disk that no run state claims. It is the only status here that does not come from runstate: everything else is the run's own word for itself.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
type Item struct {
Owner string `json:"owner"`
State string `json:"state"`
Action string `json:"action"`
Count int `json:"count"`
Bytes int64 `json:"bytes"`
OldestAgeSeconds int64 `json:"oldest_age_seconds"`
NewestAgeSeconds int64 `json:"newest_age_seconds"`
// BytesTruncated says the byte count above is a floor, not a total. A
// report that stops early and stays silent about it is worse than no
// report: it reads as an answer.
BytesTruncated bool `json:"bytes_truncated,omitempty"`
// contains filtered or unexported fields
}
type OpenRun ¶
type OpenRun struct {
RunID string `json:"run_id"`
ProjectID string `json:"project_id"`
Repo string `json:"repo,omitempty"`
RepoName string `json:"repo_name,omitempty"`
Status string `json:"status"`
Objective string `json:"objective,omitempty"`
Branch string `json:"branch,omitempty"`
Worktree string `json:"worktree"`
CreatedAt time.Time `json:"created_at,omitempty"`
AgeSeconds int64 `json:"age_seconds"`
Bytes int64 `json:"bytes"`
BytesTruncated bool `json:"bytes_truncated"`
}
OpenRun is one worktree that still exists on disk, with whatever the run state says about it. Disk presence is the entry condition, not run status — an `applied` run whose worktree survived is an anomaly, and hiding it is how gigabytes go unnoticed.
type Report ¶
type Report struct {
Items []Item `json:"items"`
Actions []Action `json:"actions"`
Skipped []string `json:"skipped"`
DryRun bool `json:"dry_run"`
Applied bool `json:"applied"`
Failed []string `json:"failed"`
}
func InspectWithOptions ¶
type StatusOptions ¶
type StatusReport ¶
type StatusReport struct {
Runs []OpenRun `json:"runs"`
TotalRuns int `json:"total_runs"`
TotalBytes int64 `json:"total_bytes"`
Truncated bool `json:"truncated"`
Failed []string `json:"failed"`
}
func Status ¶
func Status(options StatusOptions) StatusReport
Status walks every project's worktree directory and reports what is still on disk. It is deliberately global: a run parked in one repository is invisible from another, and invisible parked work is the failure this command exists to prevent.
Click to show internal directories.
Click to hide internal directories.