GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): preserve queued model settings when steering · pingdotgg/t3code@88d3f83

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/orchestration-v2
    • Orchestrator.ts
    • SteeringCompletion.integration.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/Orchestrator.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8302,7 +8302,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
83028302
events,
83038303
effects,
83048304
projection,
8305-
modelSelection: projection.thread.modelSelection,
8305+
modelSelection: queuedRun.modelSelection,
83068306
targetRunId: command.targetRunId,
83078307
messageId: queuedMessage.id,
83088308
text: queuedMessage.text,
Collapse file

‎apps/server/src/orchestration-v2/SteeringCompletion.integration.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/SteeringCompletion.integration.test.ts
+52Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,58 @@ it.effect(
759759
),
760760
);
761761

762+
it.effect("preserves a queued message's model options when promoting it to a steer", () =>
763+
Effect.scoped(
764+
Effect.gen(function* () {
765+
const { started, steered, layer, startFirstTurn } = yield* nextTurnSelectionHarness(
766+
"steering-queued-selection",
767+
true,
768+
);
769+
yield* Effect.gen(function* () {
770+
const orchestrator = yield* Orchestrator.OrchestratorV2;
771+
const worker = yield* EffectWorker.OrchestrationEffectWorkerV2;
772+
const threadId = yield* startFirstTurn;
773+
const queuedSelection = {
774+
...runSelection,
775+
options: [{ id: "effort", value: "medium" }],
776+
};
777+
yield* orchestrator.dispatch({
778+
type: "message.dispatch",
779+
commandId: CommandId.make("queued"),
780+
threadId,
781+
messageId: MessageId.make("message:queued"),
782+
text: "queued with medium effort",
783+
attachments: [],
784+
modelSelection: queuedSelection,
785+
dispatchMode: { type: "queue_after_active" },
786+
createdBy: "user",
787+
creationSource: "web",
788+
});
789+
const before = yield* orchestrator.getThreadProjection(threadId);
790+
const queued = before.runs.find((run) => run.status === "queued")!;
791+
assert.deepEqual(queued.modelSelection, queuedSelection);
792+
assert.deepEqual(before.thread.modelSelection, runSelection);
793+
794+
yield* orchestrator.dispatch({
795+
type: "queued-message.promote-to-steer",
796+
commandId: CommandId.make("promote"),
797+
threadId,
798+
queuedRunId: queued.id,
799+
targetRunId: started[0]!.runId,
800+
});
801+
yield* worker.drain();
802+
803+
const after = yield* orchestrator.getThreadProjection(threadId);
804+
assert.deepEqual(steered, ["queued with medium effort"]);
805+
assert.lengthOf(started, 1);
806+
assert.deepEqual(after.thread.modelSelection, queuedSelection);
807+
assert.deepEqual(after.runs[0]?.modelSelection, runSelection);
808+
assert.equal(after.runs.find((run) => run.id === queued.id)?.status, "cancelled");
809+
}).pipe(Effect.provide(layer));
810+
}),
811+
),
812+
);
813+
762814
it.effect("starts a steer that missed the turn on the saved next-turn selection", () =>
763815
Effect.scoped(
764816
Effect.gen(function* () {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.