Build the router on the default scheduler, so contexts captured at build don't carry runSyncExit's
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- Review of 1007: `Effect.runSyncExit` runs its fiber on a `MixedScheduler("sync")`, which yields through microtasks, and that scheduler sits in the fiber's context. A layer that captures its context while built (`authenticated` verifies every credential in the one it captured; `Effect.provideContext` merges it) moved each request's fiber onto that scheduler, so the commit's "request fibers keep the default scheduler" held only for the built context itself. `buildHandler` now provides `Scheduler.Scheduler`'s default value to the build; `runSyncExit` still drains the build's own fiber before it returns, and a layer that awaits a promise is still refused. - Documented a limit in `router-build.ts`: only the build's own fiber is run to its end, so a fiber the build forks that outlasts its turn and yields is refused as if it had awaited (seen with a 10,000-step `Effect.forEach` merged beside a route, with either scheduler). Both real compositions are built in `test/router-build.test.ts`, so such a build fails `verify`, never a deploy. - Test added: `apps/platform/test/router-build.test.ts` "leaves a request that runs in a context captured at build on the default scheduler" (red by assertion before the fix: `sync`, not `async`).
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+67 added−3 removed
- tests:+38 added−1 removed
- other:+29 added−2 removed