[04:58:03.857] INFO (#1): Running database migrations [04:58:04.086] INFO (#1): Migrations ran successfully { migrations: [ '1_OrchestrationEvents', '2_OrchestrationCommandReceipts', '3_CheckpointDiffBlobs', '4_ProviderSessionRuntime', '5_Projections', '6_ProjectionThreadSessionRuntimeModeColumns', '7_ProjectionThreadMessageAttachments', '8_ProjectionThreadActivitySequence', '9_ProviderSessionRuntimeMode', '10_ProjectionThreadsRuntimeMode', '11_OrchestrationThreadCreatedRuntimeMode', '12_ProjectionThreadsInteractionMode', '13_ProjectionThreadProposedPlans', '14_ProjectionThreadProposedPlanImplementation', '15_ProjectionTurnsSourceProposedPlan', '16_CanonicalizeModelSelections', '17_ProjectionThreadsArchivedAt', '18_ProjectionThreadsArchivedAtIndex', '19_ProjectionSnapshotLookupIndexes', '20_AuthAccessManagement', '21_AuthSessionClientMetadata', '22_AuthSessionLastConnectedAt', '23_ProjectionThreadShellSummary', '24_BackfillProjectionThreadShellSummary', '25_CleanupInvalidProjectionPendingApprovals', '26_CanonicalizeModelSelectionOptions', '27_ProviderSessionRuntimeInstanceId', '28_ProjectionThreadSessionInstanceId', '29_ProjectionThreadDetailOrderingIndexes', '30_ProjectionThreadShellArchiveIndexes', '31_AuthAuthorizationScopes', '32_AuthPairingProofKeyThumbprint', '33_ProjectionThreadsSettled', '34_ProjectionThreadsSnoozed', '35_ProjectionThreadTitleRegeneration', '36_ProjectionThreadsPinned', '37_ProjectionTurnsKeysetIndex', '38_ProjectionThreadsPinOrderKey', '39_ProjectionProjectsDefaultThreadEnvMode', '40_ProjectionProjectFaviconPath', '41_AuthSessionClientConnection', '42_ProjectionThreadLinkedPullRequest', '43_ProjectionThreadsUnsettledAt', '44_ClearAutomaticProjectModelDefaults', '45_ProjectionProjectsAutoPull', '46_RepairAutomaticSettlementTimestamps', '47_ProjectionProjectIcon', '48_ProjectionThreadBranchPullRequest', '49_ProjectionThreadsActiveOrderKey', '50_ProjectionThreadPullRequests', '51_ProjectionThreadMessageContext', '52_ProjectionThreadTitleState', '53_PullRequestFilesViewed', '54_ProjectionThreadsAutoSettleDisabledAt', '55_OrchestrationV2', '56_RemoveRedundantProjectionIndexes', '57_ScheduledTaskWebhooks', '58_WebhookRelayDeliveries', '59_McpAppModelContext', '60_ThreadSnapshotWindowIndexes', '61_PullRequestReviewGuides', '62_ThreadFailureLookupIndex', '63_DropUnusedV1Projections', '64_CanonicalizeThreadPullRequestLinks', '65_CodexUsageNativeTurnIndex', '66_RepairClientSettlementTimestamps', '67_WebhookDedupe', '68_ShellStopRequestIndex', '69_ThreadMessageSearch', '70_PeerLinks', '71_PeerLinkFence', '72_WaitingLinkRequestIndex', '73_ActiveTurnItemIndexes', '74_ExcludeAttachmentPlaceholdersFromSearch', '75_SubagentDeliveryState', '76_ProjectionProjectsPinArchive', '77_RepairBooleanSettledOverride', '78_DropOrchestrationEventCorrelationIndex', '79_DelegatedRecoveryIndexes', '80_ScheduledTaskThreadMode', '81_ProjectionMessageSearchText', '82_TurnItemConversationIndex', '83_CommandReadIndexes', '84_LastExecutedRunIndex', '85_TurnItemCounts', '86_QueuedTurnInputIndex', '87_ProjectionProjectsCustomTitle', '88_TurnItemTypeStatusIndex', '89_ShellThreadReadIndexes', '90_AuthConnectDevices', '91_AuthConnectDeniedRequests', '92_QueuedTurnInputIndexJsonValid', '93_ProviderTurnAttemptIndex', '94_TurnItemMessageOrdinalIndex', '95_TurnItemInlineWorkOutput', '96_RepairStaleTitleRegeneration', '97_IssueTrackerBindings', '98_ActiveShellIndexIndexes', '99_BackgroundRecoveryIndexes', '100_TurnStartReadIndexes', ... 20 more items ] } { "commit": "c16ad0ce179d46c0ae335e6547e81d1cc3522fda", "platform": "win32", "osRelease": "10.0.26100", "arch": "x64", "node": "v26.13.1", "sqlite": "3.54.1", "items": 30000, "runs": 6, "seed": [ { "type": "assistant_message", "status": "completed", "count": 15000 }, { "type": "user_message", "status": "completed", "count": 15000 } ], "warmups": 5, "measuredRuns": 9, "summary": [ { "scenario": "no compaction", "actionMs": [ 6.560600000000704, 5.866300000001502, 5.821400000000722, 6.024100000002363, 6.380000000001019, 5.903300000001764, 5.64980000000287, 5.642499999998108, 5.533800000001065 ], "returnedMessages": [ [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ] ], "sqlMs": [ 2.0159999999996217, 2.136800000000221, 2.144899999999325, 2.4144999999989523, 2.296699999998964, 2.100699999999051, 2.0584000000017113, 2.034700000000157, 2.0904000000009546 ], "medianSqlMs": 2.100699999999051, "spreadSqlMs": 0.3984999999993306, "medianActionMs": 5.866300000001502, "samples": [ { "scenario": "no compaction", "ms": 2.0159999999996217, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 2.136800000000221, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 2.144899999999325, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 2.4144999999989523, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 2.296699999998964, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 2.100699999999051, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 2.0584000000017113, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 2.034700000000157, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 2.0904000000009546, "vmSteps": 150083, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] } ] }, { "scenario": "early compaction plus later rolled-back compaction", "actionMs": [ 5.730999999999767, 5.798299999998562, 5.878700000001118, 5.787700000000768, 5.476500000000669, 5.824899999999616, 5.585100000000239, 5.887000000002445, 5.928299999999581 ], "returnedMessages": [ [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ] ], "sqlMs": [ 2.115699999998469, 1.9681000000018685, 2.1120999999984633, 2.084999999999127, 2.0718999999990046, 2.153600000001461, 1.9330000000009022, 2.1574000000000524, 2.1045999999987544 ], "medianSqlMs": 2.1045999999987544, "spreadSqlMs": 0.22439999999915017, "medianActionMs": 5.798299999998562, "samples": [ { "scenario": "early compaction plus later rolled-back compaction", "ms": 2.115699999998469, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 1.9681000000018685, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 2.1120999999984633, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 2.084999999999127, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 2.0718999999990046, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 2.153600000001461, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 1.9330000000009022, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 2.1574000000000524, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 2.1045999999987544, "vmSteps": 150227, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_conversation_idx (thread_id=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_conversation_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND item.type NOT IN ('command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool')\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] } ] } ] }