Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions apps/server/src/orchestration-v2/ProjectionStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7121,6 +7121,18 @@ it.layer(layerTest)("ProjectionStoreV2", (it) => {
}
}
}

// Without the hint the planner walks every settled command, tool, and subagent item.
const pendingQuery = statements.find((statement) =>
statement.includes("AS owning_provider_instance_id"),
);
assert.isDefined(pendingQuery);
const pendingPlan = yield* planOf(pendingQuery);
assert.include(
pendingPlan.find((detail) => detail.startsWith("SEARCH i ")) ?? "",
"orchestration_v2_projection_turn_items_shell_pending_idx",
pendingPlan.join("\n"),
);
}),
);

Expand Down
1 change: 1 addition & 0 deletions apps/server/src/orchestration-v2/ProjectionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8492,6 +8492,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
) => sql<ShellPendingTurnItemRow>`
SELECT i.thread_id, i.payload_json, p.provider_instance_id AS owning_provider_instance_id
FROM orchestration_v2_projection_turn_items i
INDEXED BY orchestration_v2_projection_turn_items_shell_pending_idx
LEFT JOIN orchestration_v2_projection_provider_threads p
ON p.provider_thread_id = i.provider_thread_id
LEFT JOIN orchestration_v2_projection_runs r
Expand Down
Loading