| ... | ... | @@ -132,7 +132,9 @@ const layerService = (input: { |
| 132 | 132 | Layer.provideMerge(ProviderHostLive.layer), |
| 133 | 133 | Layer.provideMerge(Layer.mock(BackgroundPolicy.BackgroundPolicy)({})), |
| 134 | 134 | Layer.provideMerge(Layer.mock(ServerSecretStore.ServerSecretStore)({})), |
| 135 | | Layer.provideMerge(ServerConfig.layerTest(process.cwd(), { prefix: input.prefix })), |
| 135 | Layer.provideMerge( |
| 136 | ServerConfig.layerTest(process.cwd(), NodePath.join(input.home, input.prefix)), |
| 137 | ), |
| 136 | 138 | Layer.provideMerge(NodeServices.layer), |
| 137 | 139 | Layer.provideMerge(Layer.succeed(HostProcess.Platform, input.platform ?? "linux")), |
| 138 | 140 | Layer.provideMerge(ServerSettings.layerTest(input.settings)), |
| ... | ... | @@ -1203,8 +1205,7 @@ describe("UsageService", () => { |
| 1203 | 1205 | return text; |
| 1204 | 1206 | }); |
| 1205 | 1207 | |
| 1206 | | const restarted = yield* UsageService.make; |
| 1207 | | const summary = yield* restarted.readSummary(WINDOW); |
| 1208 | const summary = yield* (yield* UsageService.make).readSummary(WINDOW); |
| 1208 | 1209 | // The live rollout re-parses at the ultrafast rate (10 x 6); the |
| 1209 | 1210 | // deleted one keeps its saved v4 usage at the standard rate (20 x 1). |
| 1210 | 1211 | assert.strictEqual(totalOutputTokens(summary), 30); |
| ... | ... | @@ -1217,9 +1218,6 @@ describe("UsageService", () => { |
| 1217 | 1218 | yield* Effect.promise(() => NodeFSP.readFile(legacyPath, "utf8")), |
| 1218 | 1219 | legacy, |
| 1219 | 1220 | ); |
| 1220 | | // The migrated cache is written in the background; let it land before |
| 1221 | | // the layer removes the state directory under it. |
| 1222 | | yield* restarted.awaitPersisted; |
| 1223 | 1221 | }).pipe( |
| 1224 | 1222 | Effect.provide( |
| 1225 | 1223 | layerService({ |