Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): subagent runs no longer delay replies #6584

ClosedDeepusleepy(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/6584/headopened View on GitHub

Showing 6 changed files with 229 additions and 1 deletion (loading 5).

x
0 of 6 viewed, 6 left
229 additions and 1 deletionapps/server/src/orchestration/Layers/ProviderRuntimeIngestion.activity.test.tsModified
View file
@@ -7,7 +7,7 @@
} from "@t3tools/contracts";
import { describe, expect, it } from "vite-plus/test";
​
-import { runtimeEventToActivities } from "./ProviderRuntimeIngestion.ts";
+import { mergeBackgroundIngestion, runtimeEventToActivities } from "./ProviderRuntimeIngestion.ts";
​
const base = {
provider: ProviderDriverKind.make("codex"),
@@ -82,3 +82,231 @@
expect(usagePayload).not.toHaveProperty("status");
});
});
+​
+describe("mergeBackgroundIngestion", () => {
+ it("preserves usage when a later task progress tick only updates activity", () => {
+ const taskId = RuntimeTaskId.make("agent-partial-progress");
+ const usageUpdate = {
+ source: "runtime",
+ event: {
+ ...base,
+ type: "task.progress",
+ eventId: EventId.make("evt-task-usage"),
+ payload: {
+ taskId,
+ description: "Agent partial progress",
+ typedUsage: { totalTokens: 4_200 },
+ },
+ } satisfies ProviderRuntimeEvent,