Commit 74b28b6
authored
chore(ci): dispatch ClaudeBox to the v2 webhook (retire abandoned v1 SSH-tunnel path) (#23600)
## Why
The merge-train auto-fix (and every other ClaudeBox CI kickoff) goes
through `.github/workflows/claudebox.yml`, which SSH-tunneled to the
**abandoned v1 ClaudeBox server** on the private build instance
(`http://localhost:4001/run` via `ci.aztec-labs.com`). That v1 server is
dead — symptom seen in #team-alpha: `create_pr` failing with *"No GitHub
access configured"* and the analysis link pointing at a non-resolving v1
URL.
ClaudeBox v2 runs as a public service at `https://claudebox.work` (this
is the same bot you get when you `@ClaudeBox` in Slack). It exposes the
same `/run` API, Bearer-authed with `CLAUDEBOX_API_SECRET`. The fix is
to point CI at the v2 webhook and drop the v1 tunnel.
## What changed
- **`.github/workflows/claudebox.yml`** — both jobs now `POST` to
`${CLAUDEBOX_URL:-https://claudebox.work}/run` instead of tunneling to
the v1 server. Removed the `Setup SSH tunnel` steps and the 120-minute
synchronous poll loop. Dispatch is now **fire-and-forget**: v2 reports
progress to the bound Slack thread and to the GitHub comment IDs we pass
through (`comment_id` / `run_comment_id`), so the `/claudebox`
PR-comment UX is preserved.
- **`ci3/slack_notify_with_claudebox_kickoff`** — forwards the Slack
channel ID + thread ts it just posted to (`-f slack_channel`, `-f
slack_thread_ts`). v2 threads its status reply under that kickoff
message, restoring the Slack feedback loop for merge-train / nightly /
healthcheck kickoffs. This one script backs ~12 kickoff workflows, so
they need no individual change.
- **`backport.yml` / `deploy-network.yml`** — the two direct `gh
workflow run claudebox.yml` callers now also forward `slack_channel` /
`slack_thread_ts`.
- `target_ref` (which v1 checked out server-side) is folded into the
prompt — v2's `/run` has no `target_ref` field, so the agent
fetches/bases its branch on the ref per the prompt (matches v2's
prompt-driven model).
`claudebox.yml` keeps `CLAUDEBOX_API_SECRET` in one place, so no
per-workflow secret plumbing was needed.
## Operator prerequisites (action required)
1. **Secret**: the `CLAUDEBOX_API_SECRET` GitHub Actions secret in this
repo must equal the deployed v2 server's `api_secret`. (`POST /run` is
verified live — it returns 401 without a matching bearer.)
2. **Slack membership**: the v2 ClaudeBox bot must be a member of the
kickoff channels (`#alerts-next-scenario`, `#backports`, `#honk-team`,
`#team-bonobos`, `#team-fairies`, `#alpha-team`, the per-team
merge-train channels, and the `#alerts-<network>` deploy channels) for
threaded status. If it isn't, the session still runs — it just won't
post back into that thread.
3. Optional: set repo variable `CLAUDEBOX_URL` to override the default
endpoint.
## Notes
- The `claude-review` job is migrated too. v2 *also* handles
`claude-review` labels natively via the GitHub App
`workflow_run`/`pull_request` webhook, so that job can be retired in a
follow-up once the App is confirmed wired for this repo.
- No ClaudeBox (`AztecProtocol/claudebox`) code change is required —
v2's `/run` already accepts this payload (`prompt`, `user`, `repo`,
`run_url`, `link`, numeric `comment_id`/`run_comment_id`,
`slack_channel`, `slack_thread_ts`).
## Testing
- `bash -n` on the kickoff script and on every `run:` body in
`claudebox.yml` (7 steps) — pass.
- `jq` payload construction validated for both the issue-comment case
(numeric `comment_id`/`run_comment_id` added) and the workflow_dispatch
case (omitted) — produces valid JSON matching the v2 `RunRequest`.
- All three workflow YAMLs parse.
- `POST https://claudebox.work/run` confirmed reachable and
auth-protected (401 without bearer). End-to-end with the real secret
could not be exercised from this session (the deployed secret is not
exposed here).
---
*Created by
[claudebox](https://claudebox.work/v2/sessions/4b53f2dd8370a83a) ·
group: `slackbot`*4 files changed
Lines changed: 79 additions & 120 deletions
File tree
- .github/workflows
- ci3
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
23 | 40 | | |
24 | 41 | | |
25 | 42 | | |
| |||
49 | 66 | | |
50 | 67 | | |
51 | 68 | | |
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 | 69 | | |
82 | 70 | | |
83 | 71 | | |
84 | 72 | | |
85 | 73 | | |
86 | 74 | | |
| 75 | + | |
87 | 76 | | |
88 | 77 | | |
89 | 78 | | |
| |||
93 | 82 | | |
94 | 83 | | |
95 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
| |||
120 | 117 | | |
121 | 118 | | |
122 | 119 | | |
123 | | - | |
124 | | - | |
| 120 | + | |
125 | 121 | | |
126 | | - | |
127 | 122 | | |
128 | 123 | | |
129 | 124 | | |
130 | | - | |
131 | 125 | | |
132 | 126 | | |
133 | 127 | | |
134 | 128 | | |
135 | 129 | | |
| 130 | + | |
| 131 | + | |
136 | 132 | | |
137 | | - | |
138 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
| |||
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
147 | | - | |
148 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
149 | 151 | | |
150 | | - | |
151 | | - | |
| 152 | + | |
152 | 153 | | |
153 | | - | |
| 154 | + | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
160 | | - | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
182 | 169 | | |
183 | 170 | | |
184 | 171 | | |
| |||
189 | 176 | | |
190 | 177 | | |
191 | 178 | | |
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 | | - | |
217 | | - | |
218 | | - | |
219 | 179 | | |
220 | 180 | | |
221 | 181 | | |
| |||
232 | 192 | | |
233 | 193 | | |
234 | 194 | | |
235 | | - | |
236 | | - | |
| 195 | + | |
237 | 196 | | |
238 | | - | |
239 | 197 | | |
240 | 198 | | |
241 | 199 | | |
| |||
246 | 204 | | |
247 | 205 | | |
248 | 206 | | |
249 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
250 | 211 | | |
251 | 212 | | |
252 | 213 | | |
| |||
265 | 226 | | |
266 | 227 | | |
267 | 228 | | |
268 | | - | |
269 | | - | |
| 229 | + | |
| 230 | + | |
270 | 231 | | |
271 | 232 | | |
272 | | - | |
| 233 | + | |
| 234 | + | |
273 | 235 | | |
274 | 236 | | |
275 | 237 | | |
276 | 238 | | |
277 | 239 | | |
278 | 240 | | |
279 | | - | |
280 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
281 | 244 | | |
282 | 245 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 246 | + | |
| 247 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
59 | | - | |
| 67 | + | |
60 | 68 | | |
0 commit comments