GeezerVison is showing github.com — test(upstream-fixes): fork ingestor tests provide upstream's GitVcsDr… · RSI-Software/t3code-hyprws@bb196b3
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/ProviderSessionManager.fork.test.ts +13-7Lines changed: 13 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,8 +43,10 @@ import * as ServerEnvironment from "../environment/ServerEnvironment.ts"; | 43 | 43 | import * as McpProviderSessions from "@t3tools/provider-core/server/McpProviderSessions"; | 44 | 44 | import * as McpSessionRegistry from "../mcp/McpSessionRegistry.ts"; | 45 | 45 | import * as SqlitePersistence from "../persistence/Sqlite.ts"; | | 46 | +import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; | 46 | 47 | import * as ServerSettings from "../serverSettings.ts"; | 47 | 48 | import { CodexProviderCapabilitiesV2 } from "./Adapters/CodexAdapterV2.ts"; | | 49 | +import * as CommandOutputHub from "./CommandOutputHub.ts"; | 48 | 50 | import * as EventSink from "./EventSink.ts"; | 49 | 51 | import * as EventStore from "./EventStore.ts"; | 50 | 52 | import * as IdAllocator from "@t3tools/provider-core/server/IdAllocator"; | @@ -115,7 +117,7 @@ const layerFlakyProjectionReads = (flaky: FlakyProjectionReads) => | 115 | 117 | Effect.gen(function* () { | 116 | 118 | if (yield* Ref.getAndSet(flaky.armed, false)) { | 117 | 119 | yield* Queue.offer(flaky.failures, undefined); | 118 | | - return yield* Effect.fail(new ProjectionStore.ProjectionStoreReadError({ threadId })); | | 120 | + return yield* new ProjectionStore.ProjectionStoreReadError({ threadId }); | 119 | 121 | } | 120 | 122 | return yield* delegate.getThreadRecords(threadId, fields, filter); | 121 | 123 | }); | @@ -211,12 +213,10 @@ const layerTest = (input: { | 211 | 213 | startTurn: () => Effect.die("unused"), | 212 | 214 | steerTurn: () => Effect.void, | 213 | 215 | interruptTurn: ({ providerTurnId }) => | 214 | | - Effect.gen(function* () { | 215 | | - yield* Ref.update(input.state, (current) => ({ | 216 | | - ...current, | 217 | | - interruptedTurnIds: [...current.interruptedTurnIds, providerTurnId], | 218 | | - })); | 219 | | - }), | | 216 | + Ref.update(input.state, (current) => ({ | | 217 | + ...current, | | 218 | + interruptedTurnIds: [...current.interruptedTurnIds, providerTurnId], | | 219 | + })), | 220 | 220 | unloadThread: ({ providerThread }) => | 221 | 221 | Effect.gen(function* () { | 222 | 222 | yield* Ref.update(input.state, (current) => ({ | @@ -253,6 +253,9 @@ const layerTest = (input: { | 253 | 253 | IdAllocator.layer, | 254 | 254 | layerTestStores, | 255 | 255 | ThreadCommandExecutor.layer, | | 256 | + Layer.mock(GitVcsDriver.GitVcsDriver)({ | | 257 | + resolveBranchName: () => Effect.succeed(null), | | 258 | + }), | 256 | 259 | ), | 257 | 260 | ), | 258 | 261 | ); | @@ -268,6 +271,9 @@ const layerTest = (input: { | 268 | 271 | ProviderAdapterRegistry.layerFromAdapters([adapter]).pipe( | 269 | 272 | Layer.provideMerge(McpProviderSessions.layer), | 270 | 273 | ), | | 274 | + CommandOutputHub.layer.pipe( | | 275 | + Layer.provide(Layer.merge(layerConfiguredEventSink, layerTestStores)), | | 276 | + ), | 271 | 277 | layerConfiguredEventSink, | 272 | 278 | IdAllocator.layer, | 273 | 279 | layerProviderEventIngestorTest, | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/RunExecutionService.ownerFence.fork.test.ts +7-1Lines changed: 7 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -32,7 +32,9 @@ import * as Ref from "effect/Ref"; | 32 | 32 | import * as Stream from "effect/Stream"; | 33 | 33 |
| 34 | 34 | import * as SqlitePersistence from "../persistence/Sqlite.ts"; | | 35 | +import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; | 35 | 36 | import * as McpAppModelContext from "../mcpApps/McpAppModelContext.ts"; | | 37 | +import * as PreviewAgentActivity from "../preview/PreviewAgentActivity.ts"; | 36 | 38 | import * as ServerSettings from "../serverSettings.ts"; | 37 | 39 | import * as CheckpointService from "./CheckpointService.ts"; | 38 | 40 | import * as EventSink from "./EventSink.ts"; | @@ -348,6 +350,9 @@ function fixture(gate: "snapshot" | "cascade" | "nested" | "model") { | 348 | 350 | ingestionProjections, | 349 | 351 | IdAllocator.layer, | 350 | 352 | ThreadCommandExecutor.layer, | | 353 | + Layer.mock(GitVcsDriver.GitVcsDriver)({ | | 354 | + resolveBranchName: () => Effect.succeed(null), | | 355 | + }), | 351 | 356 | ), | 352 | 357 | ), | 353 | 358 | ); | @@ -358,6 +363,7 @@ function fixture(gate: "snapshot" | "cascade" | "nested" | "model") { | 358 | 363 | ingestion, | 359 | 364 | IdAllocator.layer, | 360 | 365 | McpAppModelContext.layerEmpty, | | 366 | + PreviewAgentActivity.layer, | 361 | 367 | ServerSettings.layerTest(), | 362 | 368 | Layer.mock(TurnItemPositionStore.TurnItemPositionStoreV2)({ | 363 | 369 | allocate: () => Effect.succeed(1), | @@ -474,7 +480,7 @@ function fixture(gate: "snapshot" | "cascade" | "nested" | "model") { | 474 | 480 | const send = (event: ProviderAdapterV2Event) => | 475 | 481 | publish(event).pipe( | 476 | 482 | Effect.flatMap((acks) => | 477 | | - Effect.all([...acks.values()].map(Deferred.await), { concurrency: "unbounded" }), | | 483 | + Effect.forEach([...acks.values()], Deferred.await, { concurrency: "unbounded" }), | 478 | 484 | ), | 479 | 485 | ); | 480 | 486 | return { start, publish, send, projections, history, sink, entered, release, closures, closed }; | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/RunExecutionService.transfer.fork.test.ts +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -42,6 +42,7 @@ import type { | 42 | 42 | } from "@t3tools/provider-core/server/ProviderAdapter"; | 43 | 43 | import * as ProjectionStore from "./ProjectionStore.ts"; | 44 | 44 | import * as ProviderEventIngestor from "./ProviderEventIngestor.ts"; | | 45 | +import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; | 45 | 46 | import * as RunExecutionService from "./RunExecutionService.ts"; | 46 | 47 | import * as TurnItemPositionStore from "./TurnItemPositionStore.ts"; | 47 | 48 | import * as ThreadCommandExecutor from "./ThreadCommandExecutor.ts"; | @@ -285,6 +286,9 @@ function twoSubscriptions( | 285 | 286 | Effect.succeed({ nodes: [], turnItems: [], runtimeRequests: [] }), | 286 | 287 | }), | 287 | 288 | Layer.mock(ThreadCommandExecutor.ThreadCommandExecutor)({}), | | 289 | + Layer.mock(GitVcsDriver.GitVcsDriver)({ | | 290 | + resolveBranchName: () => Effect.succeed(null), | | 291 | + }), | 288 | 292 | ), | 289 | 293 | ), | 290 | 294 | ); | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/zmux/CheckoutSessionStateLease.fork.test.ts +7-1Lines changed: 7 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,6 +26,7 @@ import * as ProjectStore from "../orchestration-v2/ProjectStore.ts"; | 26 | 26 | import * as ProviderEventIngestor from "../orchestration-v2/ProviderEventIngestor.ts"; | 27 | 27 | import * as ThreadCommandExecutor from "../orchestration-v2/ThreadCommandExecutor.ts"; | 28 | 28 | import * as SqlitePersistence from "../persistence/Sqlite.ts"; | | 29 | +import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; | 29 | 30 | import * as ProjectEnrichment from "../project/ProjectEnrichmentService.ts"; | 30 | 31 | import * as ProjectService from "../project/ProjectService.ts"; | 31 | 32 | import * as ServerSettings from "../serverSettings.ts"; | @@ -62,7 +63,12 @@ const dependencies = Layer.merge(core, LegacyImporter.layer.pipe(Layer.provide(c | 62 | 63 | const testLayer = Layer.mergeAll( | 63 | 64 | dependencies, | 64 | 65 | ProjectService.layer.pipe(Layer.provide(dependencies)), | 65 | | - ProviderEventIngestor.layer.pipe(Layer.provide(dependencies)), | | 66 | + ProviderEventIngestor.layer.pipe( | | 67 | + Layer.provide(dependencies), | | 68 | + Layer.provide( | | 69 | + Layer.mock(GitVcsDriver.GitVcsDriver)({ resolveBranchName: () => Effect.succeed(null) }), | | 70 | + ), | | 71 | + ), | 66 | 72 | ); | 67 | 73 |
| 68 | 74 | it.effect("ordinary mutations remain concurrent; pending cleanup excludes later mutations", () => | |
|