Commit d884a8c
* ci(triage): gate the agent on a usable report and pin it to Sonnet 5
The triage agent is the largest consumer of the shared ANTHROPIC_API_KEY, and
on 2026-07-31 it paid its maximum price to triage a daily that produced ZERO
test results. From the action's own log (run 30624377765):
"model": "claude-opus-5[1m]"
"num_turns": 28,
"total_cost_usd": 1.6609247499999995
28 of the 30 allowed turns, on the 1M-context Opus, for $1.66 -- reasoning over
an input that did not exist. The triggering daily had all four shards fail
without producing a blob, so the merge job died on "No report files found in
.../all-blobs" and never uploaded results.json. The propose job printed
"no results.json -- history-only" as a warning and started the agent anyway,
which then reconstructed the run from scratch through Bash. That is what filled
the transcript and consumed the turn budget.
Two independent changes.
1. Gate the agent on a usable input. A run that recorded zero test results has
no failures to group and no clusters to dedup, so the decision is cheap and
deterministic and belongs before the agent. It reuses analyze() from
scripts/check-run-integrity.mjs -- the daily's own runguard logic (#1012) --
rather than re-implementing report parsing, so the two cannot drift apart,
and so the case that makes a naive test-count check wrong is handled: a
PARTIAL run, where some shards aborted in globalSetup while others executed
(#1058, measured at 205 recorded while ~184 never ran), still RUNS the agent.
Absent report or zero tests skip; present-but-unparseable fails the step
rather than reading as "nothing to triage" (#1035). The skip path is loud --
::warning:: plus a run-summary line -- so an abort day is distinguishable
from a quiet healthy one. It deliberately does not comment on the umbrella:
on an abort there may be none (07-31 opened none), and creating one is the
agent's job behind the propose-confirm gate.
`execute` is NOT gated -- a human "pode abrir" means a plan already exists,
so it needs no report.
2. Pin --model claude-sonnet-5 on both claude_args. The action's default is
claude-opus-5[1m] and nothing here needs Opus-tier reasoning at Opus-tier
price. Sonnet 5 keeps the 1M context window this job depends on (it reads CI
logs) at 3/5 of the per-token price: across the three measured runs
(07-29 $2.06 / 07-30 $0.99 / 07-31 $1.66), $4.71 -> ~$2.80. NOT haiku -- its
window is 200K and the most expensive runs are the ones with the largest
input, so it would overflow exactly where it matters; worth an A/B once this
change bounds the input, with #1171 standing as the reminder that a cheaper
model gets validated, not assumed.
Covered by npm run test:scripts: every report state including the partial/zero
lookalikes, the unparseable hard error, the single-line GITHUB_OUTPUT contract,
and a structural guard that the agent step is still gated and both jobs still
pin the model (both halves force-failed locally).
Not fixed here, and more urgent than cost: the daily itself is aborting --
07-31 recorded zero tests, 07-28 recorded 0/0/0/0, today's history push failed
so there is no 07-31 row, and no umbrella was opened. That is lost coverage and
needs its own issue.
Refs #1178
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* ci(triage): let workflow_dispatch bypass the report gate
Caught while classifying the diff: a workflow_dispatch downloads no artifact at
all (there is no triggering run id), so the gate as first written refused the
one path that exists for re-proposing on demand — including the per-model A/B
#1171 needs. The gate now binds the automatic workflow_run path only, matching
the reasoning that leaves `execute` ungated: a human asking for this triage with
an explicit --issue has already decided there is something to triage.
Asserted in the structural guard and force-failed locally.
Refs #1178
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Rafael <rafael@oriontech.me>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7e0facc commit d884a8c
3 files changed
Lines changed: 468 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
76 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
77 | 105 | | |
78 | 106 | | |
79 | 107 | | |
80 | 108 | | |
81 | 109 | | |
82 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
83 | 120 | | |
84 | 121 | | |
85 | 122 | | |
| |||
109 | 146 | | |
110 | 147 | | |
111 | 148 | | |
112 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
113 | 153 | | |
114 | 154 | | |
115 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
0 commit comments