perf(server): shell snapshots no longer parse every remote delegated task's payload #36240
Pushed0941989
- @@ -9546,10 +9546,11 @@95469546 )95479547 ELSE 0 END95489548 ) AS may_be_live,9549- -- One list for the whole read, found through the child_thread_id index. A lookup per9550- -- thread would parse the payload of every subagent row.9551- t.thread_id IN (9552- SELECT subagent.thread_id FROM orchestration_v2_projection_subagents subagent9553- WHERE subagent.origin = 'app_owned'9554- AND subagent.child_thread_id IS NULL9555- AND json_type(subagent.payload_json, '$.remoteChild') = 'object'9549+ -- The list skips threads without childless tasks from column values alone. Payloads are9550+ -- parsed only up to a thread's first remote task, since automations keep thousands.9551+ (9552+ t.thread_id IN (9553+ SELECT subagent.thread_id FROM orchestration_v2_projection_subagents subagent9554+ WHERE subagent.origin = 'app_owned' AND subagent.child_thread_id IS NULL9555+ )9556+ AND EXISTS (
Sign in to join this conversation.
coderabbitai[bot](GitHub profile, opens in a new tab) reviewed
Actionable comments posted: 1
a58fbd87-25a5-4f39-b960-96bd7b1044f3Reviewing files that changed from the base of the PR and between ac38960600eae54b85e19354859736b4118ac27b and 094198978399ac7b4b6146c745a7ed6a0f723350.
apps/server/src/orchestration-v2/ProjectionStore.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.