Skip to content

Commit 23e418c

Browse files
chore(server): trim background-work coverage to the service tests
The contract test only re-checked that Schema.optional accepts a missing field. The doc no longer says list status reads completed while work is pending, since main now reports it as waiting. AI-assisted; verified with the tests and tools listed above.
1 parent 28b9067 commit 23e418c

2 files changed

Lines changed: 4 additions & 49 deletions

File tree

‎docs/orchestration-v2/orchestrator-mcp-server.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,10 @@ wakes early only when it has a pending request or fails after snoozing. Complete
430430
runs, background wakes, and delegated completions keep it snoozed.
431431

432432
They also report `blockedOnThreadWait` and `pendingBackgroundTasks`, the shell
433-
fields behind the sidebar's Waiting label, so an agent can tell a `completed`
434-
thread that still waits on background work from one that is done. A subagent or
435-
`background_task` holds the thread. A command or monitor holds it only with
436-
`awaited: true`, since agents often leave a dev server running.
433+
fields behind the sidebar's Waiting label, so an agent can see what a thread
434+
still waits on after its run completed. A subagent or `background_task` holds
435+
the thread. A command or monitor holds it only with `awaited: true`, since agents
436+
often leave a dev server running.
437437

438438
### `t3_thread_update`
439439

‎packages/contracts/src/orchestratorMcp.test.ts‎

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,12 @@ import * as Schema from "effect/Schema";
44
import {
55
OrchestratorMcpDelegateTaskInput,
66
OrchestratorMcpDelegateTaskResult,
7-
OrchestratorMcpThreadDetail,
8-
OrchestratorMcpThreadListItem,
97
} from "./orchestratorMcp.ts";
108

119
const decodeDelegateTaskInput = Schema.decodeUnknownSync(OrchestratorMcpDelegateTaskInput);
1210
const decodeDelegateTaskResult = Schema.decodeUnknownSync(OrchestratorMcpDelegateTaskResult);
13-
const decodeThreadListItem = Schema.decodeUnknownSync(OrchestratorMcpThreadListItem);
14-
const decodeThreadDetail = Schema.decodeUnknownSync(OrchestratorMcpThreadDetail);
1511

1612
describe("orchestrator MCP contracts", () => {
17-
it("decodes thread results from a linked environment that predates background work", () => {
18-
const listItem = {
19-
threadId: "thread-1",
20-
projectId: "project-1",
21-
title: "Fix the build",
22-
createdBy: "user",
23-
creationSource: "web",
24-
status: "completed",
25-
latestRunId: null,
26-
providerInstanceId: "codex",
27-
model: "gpt-5.4",
28-
runtimeMode: "full-access",
29-
interactionMode: "default",
30-
linkedPullRequest: null,
31-
settled: false,
32-
settledAt: null,
33-
snoozed: false,
34-
snoozedUntil: null,
35-
parentThreadId: null,
36-
relationshipToParent: null,
37-
itemCount: 0,
38-
createdAt: "2026-01-01T00:00:00.000Z",
39-
updatedAt: "2026-01-01T00:00:00.000Z",
40-
};
41-
const detail = {
42-
...listItem,
43-
activeRunId: null,
44-
titleRegeneration: null,
45-
branch: null,
46-
worktreePath: null,
47-
runCount: 0,
48-
pendingRequestCount: 0,
49-
archived: false,
50-
};
51-
52-
for (const decoded of [decodeThreadListItem(listItem), decodeThreadDetail(detail)]) {
53-
expect(decoded.blockedOnThreadWait).toBeUndefined();
54-
expect(decoded.pendingBackgroundTasks).toBeUndefined();
55-
}
56-
});
57-
5813
it("decodes cross-provider delegated task requests and durable results", () => {
5914
const request = decodeDelegateTaskInput({
6015
task: "Inspect the workspace and report the result.",

0 commit comments

Comments
 (0)