Cato and Claude Opus 5
4c3237c3d1
fix(feedback): give every surface one answer about the builder ( #773 )
...
c1165182 made the inbox row honest when a builder goes offline. It did not
reach the three other surfaces that read the same run, and they were already
answering the question three different ways:
- /api/terminal/run kept its own copy of the hydration, and that copy still
fell back to "any builder will do" when the channel was unknown — the exact
bug c1165182 fixed in the inbox, reporting a local run healthy whenever the
cloud box happened to be up.
- /api/feedback/[id]/watch hydrated nothing. A bare snapshot carries no
presence, so Watch could never see an offline builder: the row said "Needs
you — Open Fleet Runner" and the panel opened from that row said "Starting".
- /api/feedback/[id]/dispatch hydrated nothing either, and that one is not
cosmetic. It is Implement's duplicate-guard, and it decides whether to REFUSE
a retry. A run queued on a Fleet Runner that is switched off read as QUEUED,
so pressing Implement answered "Already on this" and blocked the very retry
the row was asking for.
Extract the hydration into src/lib/feedback/run-context.ts and give all four
call sites the same function. The run row carries its own projectId, so
hydrateFeedbackSnapshot resolves the project's stored routing decision itself
rather than making each caller know how builder routing works — which is how
the three of them drifted apart in the first place.
run-context.ts is deliberately free of data access: attach-work.ts does the
querying and calls in. That is what makes the invariant testable at all —
attach-work cannot be imported without a DATABASE_URL, which is why none of
this was covered before.
scripts/test/feedback-run-context.ts pins the four cases that bit: local
builder down with cloud up is OFFLINE, a healthy builder is not stuck, an open
pending row outranks the project default, and a hosted dispatch on the payload
survives a non-hosted pending row.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com >
2026-09-17 08:40:10 -07:00
..
2026-08-16 09:41:51 +00:00
2026-09-05 17:04:53 +00:00
2026-08-31 09:23:30 +00:00
2026-09-17 04:01:06 -07:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-05 10:49:10 +00:00
2026-08-13 17:37:04 +02:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-17 02:55:52 -07:00
2026-09-14 22:40:09 -07:00
2026-09-14 20:57:30 -07:00
2026-09-02 08:47:20 +00:00
2026-09-15 03:08:59 -07:00
2026-08-26 21:31:22 +00:00
2026-08-14 14:47:36 +00:00
2026-09-15 05:14:18 -07:00
2026-08-31 09:23:30 +00:00
2026-07-01 04:20:42 +02:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-08-04 15:40:26 +02:00
2026-09-13 16:13:10 -07:00
2026-08-03 09:56:37 +02:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-11 12:58:34 -07:00
2026-09-10 13:14:10 -07:00
2026-09-10 16:57:14 -07:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-09-16 22:21:59 -07:00
2026-09-16 23:38:48 -07:00
2026-09-13 16:13:10 -07:00
2026-08-27 19:18:54 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-09-14 23:18:42 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-11 02:41:20 -07:00
2026-09-04 13:50:19 +00:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-24 15:43:36 +00:00
2026-08-31 09:23:30 +00:00
2026-09-02 09:27:19 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-08-02 14:23:18 +02:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-12 10:39:22 -07:00
2026-09-04 00:11:06 +00:00
2026-09-13 16:13:10 -07:00
2026-09-11 02:41:20 -07:00
2026-08-31 09:23:30 +00:00
2026-09-12 03:00:37 -07:00
2026-09-16 22:21:59 -07:00
2026-09-12 03:00:37 -07:00
2026-09-17 08:40:10 -07:00
2026-09-16 16:43:12 -07:00
2026-09-13 16:13:10 -07:00
2026-09-17 06:47:06 -07:00
2026-09-16 12:33:22 -07:00
2026-09-13 16:13:10 -07:00
2026-09-15 01:57:54 -07:00
2026-09-13 18:49:24 -07:00
2026-09-15 12:17:25 -07:00
2026-09-13 16:13:10 -07:00
2026-09-17 02:16:05 -07:00
2026-09-11 00:23:03 -07:00
2026-08-31 09:23:30 +00:00
2026-09-11 06:43:21 -07:00
2026-09-15 03:08:59 -07:00
2026-08-31 09:23:30 +00:00
2026-09-16 12:59:51 -07:00
2026-08-03 08:28:45 +02:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-02 08:47:20 +00:00
2026-09-14 22:43:29 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-15 08:41:15 -07:00
2026-09-12 02:28:36 -07:00
2026-09-17 08:32:35 -07:00
2026-09-13 18:58:54 -07:00
2026-09-13 16:13:10 -07:00
2026-09-15 12:17:25 -07:00
2026-09-13 06:39:39 -07:00
2026-09-12 02:28:36 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 18:49:24 -07:00
2026-09-15 08:41:15 -07:00
2026-07-01 02:52:21 +02:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-15 05:14:18 -07:00
2026-08-31 09:23:30 +00:00
2026-09-17 06:35:17 -07:00
2026-09-05 17:04:53 +00:00
2026-09-13 16:13:10 -07:00
2026-09-17 08:32:35 -07:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-09-11 00:35:32 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-15 02:37:31 -07:00
2026-09-13 16:13:10 -07:00
2026-09-14 04:38:53 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-14 04:20:31 -07:00
2026-09-15 08:41:15 -07:00
2026-09-15 08:41:15 -07:00
2026-09-15 08:41:15 -07:00
2026-09-13 16:13:10 -07:00
2026-09-15 08:41:15 -07:00
2026-09-15 12:17:25 -07:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-03 12:44:39 +00:00
2026-09-11 00:16:48 -07:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-17 00:59:08 -07:00
2026-09-13 16:13:10 -07:00
2026-09-04 11:16:58 +00:00
2026-09-17 07:51:39 -07:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-15 05:14:18 -07:00
2026-09-11 08:19:45 -07:00
2026-09-15 01:08:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-17 08:32:35 -07:00
2026-09-12 10:53:41 -07:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-16 11:54:30 -07:00
2026-09-13 16:13:10 -07:00
2026-09-16 12:49:21 -07:00
2026-09-13 16:13:10 -07:00
2026-09-13 16:13:10 -07:00
2026-09-15 01:08:42 -07:00
2026-09-15 08:41:15 -07:00
2026-08-31 09:23:30 +00:00
2026-09-17 02:16:05 -07:00
2026-09-17 02:16:05 -07:00
2026-09-05 17:04:53 +00:00
2026-09-17 04:01:06 -07:00
2026-09-10 12:51:11 -07:00
2026-08-31 09:23:30 +00:00
2026-09-15 12:17:25 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-09-14 22:48:39 -07:00
2026-09-13 16:13:10 -07:00
2026-09-17 00:59:08 -07:00
2026-09-13 16:13:10 -07:00
2026-09-15 05:14:18 -07:00
2026-09-13 16:13:10 -07:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-09-05 17:04:53 +00:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00
2026-09-03 10:25:24 +00:00
2026-09-13 16:13:10 -07:00
2026-09-05 09:17:29 -07:00
2026-09-15 14:43:01 -07:00
2026-09-10 23:53:44 -07:00
2026-09-03 17:20:06 -07:00
2026-08-31 09:23:30 +00:00
2026-09-13 16:13:10 -07:00