Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: Isolate thread reactor workers to prevent head-of-line blocking #1945

Closedashvinnihalani(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/1945/headopened View on GitHub

Showing 2 changed files with 147 additions and 23 deletions.

x
0 of 2 viewed, 2 left
125 additions and 20 deletionsapps/server/src/orchestration/Layers/ProviderCommandReactor.test.tsModified
View file
@@ -66,6 +66,16 @@
​
describe("ProviderCommandReactor", () => {
+ type HarnessOptions = {
+ readonly baseDir?: string;
+ readonly threadModelSelection?: ModelSelection;
+ readonly sessionModelSwitch?: "unsupported" | "in-session";
+ readonly startSessionImplementation?: (
+ input: unknown,
+ session: ProviderSession,
+ ) => Effect.Effect<ProviderSession>;
+ };
+​
let runtime: ManagedRuntime.ManagedRuntime<
OrchestrationEngineService | ProviderCommandReactor,
unknown
@@ -93,11 +103,7 @@
createdBaseDirs.clear();
});
​
- async function createHarness(input?: {
- readonly baseDir?: string;
- readonly threadModelSelection?: ModelSelection;
- readonly sessionModelSwitch?: "unsupported" | "in-session";
- }) {
+ async function createHarness(input?: HarnessOptions) {
const now = new Date().toISOString();
const baseDir = input?.baseDir ?? fs.mkdtempSync(path.join(os.tmpdir(), "t3code-reactor-"));