Skip to content

Commit 1a12535

Browse files
Xanacasclaude
andcommitted
fix(server): provide the attachment proxy where route fibers resolve it
Route handlers resolve services at serve time, so providing the proxy to makeRoutesLayer never reached the request fiber and every proxied image answered 404. Caught in an integrated web pass; unit tests could not see it. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 1da4829 commit 1a12535

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/server/src/server.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,6 @@ export const makeRoutesLayer = Layer.mergeAll(
480480
// Both transports consume the same service instance, so caches single-flight across clients
481481
// and mutations observed on WebSocket invalidate patches subsequently read over HTTP.
482482
Layer.provide(PullRequestServiceLive),
483-
Layer.provide(GitHubAttachmentProxyLive),
484483
Layer.provide(PreviewAutomationBroker.layer),
485484
Layer.provide(ServerSelfUpdate.layer),
486485
Layer.provide(commandReadinessLayer),
@@ -691,6 +690,9 @@ export const makeServerLayer = Layer.unwrap(
691690

692691
return serverApplicationLayer.pipe(
693692
Layer.provideMerge(runtimeServicesLive),
693+
// Route handlers resolve services at serve time, so the proxy must sit in the runtime
694+
// context here — providing it to makeRoutesLayer never reaches the request fiber.
695+
Layer.provide(GitHubAttachmentProxyLive),
694696
Layer.provide(activationLayer),
695697
Layer.provideMerge(serverRelayBrokerTracingLayer),
696698
Layer.provideMerge(HttpServerLive),

0 commit comments

Comments
 (0)