Skip to content

Commit bec819f

Browse files
fix(server): preserve agent project settings through accepted retries
1 parent 5209f86 commit bec819f

12 files changed

Lines changed: 999 additions & 285 deletions

‎apps/server/src/device/DeviceService.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const fixture = Effect.fn("fixture")(function* (
158158
ServerSettings.ServerSettingsService,
159159
ServerSettings.ServerSettingsService.of({
160160
updateProviderInstance: () => Effect.die("Unexpected provider mutation"),
161-
updateProjectSettingsOverride: () => Effect.die("Unexpected project settings update"),
161+
syncProjectSettings: Effect.die("Unexpected project settings update"),
162162
withSettingsSnapshot: (use) => Effect.flatMap(Ref.get(settings), use),
163163
start: Effect.void,
164164
ready: Effect.void,

‎apps/server/src/orchestration-v2/ThreadSettlementService.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ const makeHarness = Effect.fn("makeThreadSettlementHarness")(function* (options:
660660
getSettings: Ref.get(settings),
661661
updateSettings,
662662
updateProviderInstance: () => Effect.die("Unexpected provider mutation"),
663-
updateProjectSettingsOverride: () => Effect.die("Unexpected project settings update"),
663+
syncProjectSettings: Effect.die("Unexpected project settings update"),
664664
withSettingsSnapshot: (use) => Ref.get(settings).pipe(Effect.flatMap(use)),
665665
streamChanges: Stream.fromPubSub(settingsChanges),
666666
subscribeChanges: PubSub.subscribe(settingsChanges).pipe(

‎apps/server/src/orchestration-v2/runtimeLayer.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export const layerProjectService = ProjectService.layer.pipe(
9494
Layer.mergeAll(
9595
ProjectStore.layer,
9696
ProjectionStore.layer,
97+
layerCommandReceiptStoreProvided,
9798
layerEventSinkProvided,
9899
IdAllocator.layer,
99100
layerLegacyV1ThreadImporterProvided,

‎apps/server/src/project/ProjectService.deletion.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import * as SqlClient from "effect/sql/SqlClient";
1919
import * as ServerConfig from "../config.ts";
2020
import { OrchestrationEffectRequestV2 } from "../orchestration-v2/EffectOutbox.ts";
2121
import * as EventSink from "../orchestration-v2/EventSink.ts";
22+
import * as CommandReceiptStore from "../orchestration-v2/CommandReceiptStore.ts";
2223
import * as EventStore from "../orchestration-v2/EventStore.ts";
2324
import * as IdAllocator from "@t3tools/provider-core/server/IdAllocator";
2425
import * as LegacyV1ThreadImporter from "../orchestration-v2/legacy/LegacyV1ThreadImporter.ts";
@@ -42,6 +43,7 @@ const layerServices = Layer.mergeAll(
4243
LegacyV1ThreadImporter.layer.pipe(Layer.provideMerge(layerEventPersistence)),
4344
ProjectionMaintenance.layer.pipe(Layer.provide(layerEventPersistence)),
4445
ProjectStore.layer,
46+
CommandReceiptStore.layer,
4547
IdAllocator.layer,
4648
ThreadCommandExecutor.layer,
4749
Layer.succeed(WorkspacePaths.WorkspacePaths, {

0 commit comments

Comments
 (0)