Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(pi): show native background subagent lifecycles #33590

ClosedStiensWout(GitHub profile, opens in a new tab)wants to merge 17 commits intomain fromrefs/pull/33590/headopened View on GitHub

Showing 9 changed files with 95 additions and 0 deletions (loading 7).

x
0 of 9 viewed, 9 left
14 additions and 0 deletionsapps/server/src/orchestration-v2/testkit/fixtures/pi_subagents_async_workflow/input.tsAdded
View file
@@ -0,0 +1,14 @@
+import type { OrchestratorFixtureInput } from "../shared.ts";
+​
+const PI_SUBAGENTS_ASYNC_WORKFLOW_PROMPT =
+ 'Reproduction for a T3 bug report. Do exactly this and nothing else: write this one workflow block in your reply, then call subagent({ workflow: true, async: true }). Do not modify any files.\n\n```js workflow\nconst alpha = await runs.all([{ key: "alpha", agent: "scout", task: "Run `sleep 60` with bash, then reply with exactly: ALPHA-DONE" }]);\nconst beta = await runs.all([{ key: "beta", agent: "scout", task: "Run `sleep 90` with bash, then reply with exactly: BETA-DONE" }]);\nreturn [...alpha, ...beta].map((r) => r.output);\n```\n\nAfter launching, end your turn and wait for the completion notice.';
+​
+/** Run 2 is the native wake pi-subagents starts for its completion notice. */
+export function piSubagentsAsyncWorkflowInput(): OrchestratorFixtureInput {
+ return {
+ steps: [
+ { type: "message", text: PI_SUBAGENTS_ASYNC_WORKFLOW_PROMPT },
+ { type: "await_run_status", targetRunIndex: 2, status: "completed" },
+ ],
+ };
+}
81 additions and 0 deletionsapps/server/src/orchestration-v2/testkit/fixtures/pi_subagents_async_workflow/output.tsAdded
View file
@@ -0,0 +1,81 @@
+import { assert } from "@effect/vitest";
+import type { ProviderReplayTranscript } from "@t3tools/contracts";
+​
+import type { OrchestratorV2ScenarioResult } from "../../OrchestratorScenario.ts";
+import {
+ assertBaseProjection,
+ assertSemanticProjectionIntegrity,
+ projectionFor,
+} from "../shared.ts";
+​
+const WORKFLOW_RUN_ID = "5284158e-cd8f-474d-9127-68b272fd9aba";
+​
+// The launch receipt lists no children; the widget snapshot names them and the notices settle them.