| 1 | package wire |
| 2 | |
| 3 | import "time" |
| 4 | |
| 5 | // Needs-you triage (spec 2026-11-11-equipo-needs-you-triage.md): Needs you |
| 6 | // holds only decisions only the person can make. A step that stopped for |
| 7 | // a passing reason is retried once on its own, a candidate that conflicts |
| 8 | // with the default branch is rebased again, and checks that could not run |
| 9 | // before hosted CI existed run again there. Everything else stays in |
| 10 | // Needs you, with Equipo's recommendation. Person API only: no runner |
| 11 | // frame changes. |
| 12 | |
| 13 | // What Equipo is doing about a task (TaskTriage.Kind). |
| 14 | const ( |
| 15 | TriageRetrying = "retrying" |
| 16 | TriageRebasing = "rebasing" |
| 17 | TriageRechecking = "rechecking" |
| 18 | // TriageAsking: the task needs its person; Recommend is what Equipo |
| 19 | // would do, Said and Failed what Review and hosted CI said last. |
| 20 | TriageAsking = "asking" |
| 21 | ) |
| 22 | |
| 23 | // Why Equipo did not act on a task that needs its person |
| 24 | // (TaskTriage.Why): it already tried this on its own, or today's budget |
| 25 | // for automatic work is used. |
| 26 | const ( |
| 27 | TriageWhyTried = "tried" |
| 28 | TriageWhyBudget = "budget" |
| 29 | ) |
| 30 | |
| 31 | // What Equipo recommends (TaskTriage.Recommend): another Engineering |
| 32 | // round, a retry of the stopped step, or another rebase on the default |
| 33 | // branch. |
| 34 | const ( |
| 35 | RecommendRound = "round" |
| 36 | RecommendRetry = "retry" |
| 37 | RecommendRebase = "rebase" |
| 38 | ) |
| 39 | |
| 40 | // TaskTriage is what Equipo is doing about a task instead of asking its |
| 41 | // person, or, when it asks, what it recommends and why it did not act. |
| 42 | // Reason is the stopped step's reason (retrying); Since when Equipo |
| 43 | // acted; Said is Review's newest finding or summary in one line; Failed |
| 44 | // are hosted CI's failing units. |
| 45 | type TaskTriage struct { |
| 46 | Kind string `json:"kind"` |
| 47 | Reason string `json:"reason,omitempty"` |
| 48 | Since *time.Time `json:"since,omitempty"` |
| 49 | Said string `json:"said,omitempty"` |
| 50 | Failed []string `json:"failed,omitempty"` |
| 51 | Recommend string `json:"recommend,omitempty"` |
| 52 | Why string `json:"why,omitempty"` |
| 53 | } |
| 54 | |
| 55 | // MaxTriageSaid bounds TaskTriage.Said. |
| 56 | const MaxTriageSaid = 300 |
| 57 | |
| 58 | // TriageWaiting: the task waits on the platform, not on its person or |
| 59 | // Equipo: Reason says what it waits for (merge_unborn_default: the hub |
| 60 | // cannot make the first merge into an empty repository yet). Equipo |
| 61 | // does nothing on its own; the person's Merge goes again once it can. |
| 62 | const TriageWaiting = "waiting" |
| 63 | |