fix(opencode): provide Observability beneath all route service graphs (#35171)

This commit is contained in:
Kit Langton 2026-07-03 10:00:30 -04:00 committed by GitHub
commit 9aab24e95e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -292,8 +292,6 @@ export function createRoutes(
HttpServer.layerServices,
]),
Layer.provide(Layer.succeed(CorsConfig)(corsOptions)),
Layer.provideMerge(Observability.layer),
Layer.provide(sessionLocationLayer),
Layer.provide(locationLayer),
Layer.provide(PtyEnvironment.layer),
@ -306,6 +304,11 @@ export function createRoutes(
Layer.provide(locationServiceMapV2),
Layer.provide(AppNodeBuilderV1.build(app)),
// Must stay last: layers provided later in this pipe build beneath earlier ones,
// so Observability must come after every service graph. Otherwise eagerly forked
// fibers (e.g. the ModelsDev background refresh) capture Effect's default stdout
// logger and corrupt the TUI (#34730).
Layer.provideMerge(Observability.layer),
)
}