From 16b8895ced61ed58b808be73f58e4353964fbbc8 Mon Sep 17 00:00:00 2001 From: Ouroboros Date: Tue, 15 Sep 2026 19:38:02 +0300 Subject: [PATCH] Re-pin the chat contracts on the activity-block predicate The combined tree's full serial suite ended with 30 failures; 21 of them were static string contracts and source pins that still described the sticky card-presence machinery WP-G deleted (taskUiStates, forceCard/forceTaskCard, markTaskToolCall, markAssistantReply, scheduleTaskUiCleanup, retiredTaskIds, the cardVisible latch, the replay `needsVisibleTerminal` branch, the applyEventTelemetry closure and the HTML-template conversion button). Every one of them is now pinned on the mechanism that replaced it, so the contracts say what the code does instead of guarding a deleted symbol: - presence is ONE predicate (`blockVisible`) whose inputs are record facts, including that the completion note is not content and that a terminal outcome other than Done keeps the block; - `ensureLiveCardVisible` both mounts and unmounts from that predicate, and the rebuild sweep re-runs it for every record instead of reading a latch; - tool rows are content keyed `tool::`, so a failure or timeout evolves its own call's row, and replay shows the one summary row `noteToolMetrics` derives from the recorded per-tool counts; - the refetch after a lost task_done is owed only by a visible block; - a lineage-known child is minted as its parent's nested card by whichever path reaches it first, and the conversion button carries the design-system role and marker on the node the chrome sync builds. Two fixture group ids and one test name that named the retirement/force writers were renamed to the behaviour they now pin; the `retiredTaskIds.clear` row is dropped because the stronger `retiredTaskIds`-absent pin owns that fact. Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com> --- .../fixtures/chat_logs_ui_static_checks.json | 2 +- tests/test_projects_v6640.py | 13 +++++++-- tests/test_restart_reconnect.py | 28 ++++++++++++++----- tests/test_subagent_reliability.py | 7 ++++- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/tests/fixtures/chat_logs_ui_static_checks.json b/tests/fixtures/chat_logs_ui_static_checks.json index ee49383e3..f7b6ab11f 100644 --- a/tests/fixtures/chat_logs_ui_static_checks.json +++ b/tests/fixtures/chat_logs_ui_static_checks.json @@ -1 +1 @@ -[{"id": "test_degraded_outcomes_render_with_typed_severity", "path": "web/modules/chat.js", "kind": "contains", "value": "taskOutcomeSeverity,"}, {"id": "test_degraded_outcomes_render_with_typed_severity", "path": "web/modules/log_events.js", "kind": "contains", "value": "const presentation = taskPresentation(terminal || outcome === 'error' ? outcome : 'working');"}, {"id": "test_degraded_outcomes_render_with_typed_severity", "path": "web/modules/log_events.js", "kind": "contains", "value": "['failed', 'infra_failed'].includes(execution)"}, {"id": "test_degraded_outcomes_render_with_typed_severity", "path": "web/modules/log_events.js", "kind": "contains", "value": "objective === 'fail'"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const liveCardRecords = new Map();"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const taskUiStates = new Map();"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "summarizeChatLiveEvent"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "Show details"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "if (msg.is_progress) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "updateLiveCardFromProgressMessage(msg, { grantCancelAuthority: true });"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "appendTaskSummaryToLiveCard(msg);"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "else if (explicitTaskId && typedTerminal) {\n changed = appendTaskSummaryToLiveCard(msg) || changed;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "onWs('log', (msg) => {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "withRemoteActivity(() => updateLiveCardFromLogEvent(msg.data));"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "hideTypingIndicatorOnly();"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function hasActiveLiveCard()"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "state.activePage !== 'chat'"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function isNearBottom(threshold = NEAR_BOTTOM_THRESHOLD_PX)"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const isMounted = node.parentNode === messagesDiv;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function markTaskToolCall(taskId, count = 1, {\n minimumOnly = false, tool = '', metrics = {}, history = false, rawTs = '', suppressDomInsert = false,\n } = {})"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "taskState.forceCard || taskState.toolCalls > 0 || shouldAlwaysShowTaskCard(taskState.taskId)"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function forceTaskCard(taskId, rawTs = '')"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function markAssistantReply(taskId = '')"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "export function isTerminalTaskPhase(phase = '', terminal = false) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "taskState.completed = true;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "scheduleTaskUiCleanup(taskState, 30000);"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "if (!_historyRow && taskState.completed && !isTerminalTaskPhase(summary.phase || '', summary.terminal)) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "if (record.finished && !isTerminalTaskPhase(nextPhase, summary.terminal)) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const taskId = msg.task_id || '';"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const taskState = getTaskUiState(taskId, true);"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const wasFinished = record.finished;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "settleLiveCard(record, summary.phase || 'done', wasFinished);"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function settleLiveCard(record, phase, wasFinished) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "if (!wasFinished) scheduleHistorySync();"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function setLiveCardExpanded(record, expanded) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "if (record.root.dataset.expanded === value) return false;"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "return Boolean(terminal) || ['done', 'lifecycle_error', 'cancelled'].includes(phase);"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/chat.js", "kind": "contains", "value": "const desiredPhase = desiredLiveCardPhase(record, activePhase);"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/chat.js", "kind": "contains", "value": "record.finished = isTerminalTaskPhase(nextPhase, summary.terminal);"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/chat.js", "kind": "contains", "value": "const presentation = taskPresentation(phase || 'done');"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "function extractCommandText(args) {"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "evt.status === 'non_zero_exit'"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "phase: 'warn'"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "A command returned"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "commandText.full || errorResult.full"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "not_contains", "value": "task_checkpoint_reflection"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "not_contains", "value": "task_checkpoint_anomaly"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "not_contains", "value": "Checkpoint anomaly"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "task_checkpoint"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "periodic self-check"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/logs.js", "kind": "contains", "value": "from './log_events.js'"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/logs.js", "kind": "contains", "value": "isGroupedTaskEvent(evt)"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/logs.js", "kind": "contains", "value": "createTaskGroupCard"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/logs.js", "kind": "contains", "value": "renderTaskTimeline"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/log_events.js", "kind": "contains", "value": "export function summarizeLogEvent"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/log_events.js", "kind": "contains", "value": "export function summarizeChatLiveEvent"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/log_events.js", "kind": "contains", "value": "export function isGroupedTaskEvent"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/log_events.js", "kind": "contains", "value": "export function getLogTaskGroupId"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/ui.css", "kind": "contains", "value": "--accent-light:"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-header-actions {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-header-btn {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card[data-finished=\"1\"] {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-timeline {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-toggle {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-summary-button {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card[data-expanded=\"1\"] > .chat-live-summary-button .chat-live-chevron {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card[data-expanded=\"1\"] > .chat-live-timeline {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".log-task-card {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".log-task-timeline {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "regex", "value": "\\.chat-live-title\\s*\\{[^}]*font-weight:\\s*500;"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "regex", "value": "\\.chat-live-line-title\\s*\\{[^}]*font-weight:\\s*400;"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "regex", "value": "\\n\\.chat-live-line-body\\s*\\{[^}]*font-size:\\s*var\\(--type-meta\\);"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards_expanded", "path": "web/style.css", "kind": "regex", "value": "\\.chat-live-line\\[data-expanded=\"1\"\\]\\s+\\.chat-live-line-body\\s*\\{[^}]*font-size:\\s*var\\(--type-body\\);"}, {"id": "test_chat_only_polls_state_when_active", "path": "web/modules/chat.js", "kind": "contains", "value": "state.activePage !== 'chat'"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": ".chat-live-typing {"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": ".chat-live-typing span {"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": "animation: typing-bounce"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card[data-finished=\"1\"] > .chat-live-summary-button .chat-live-typing {"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": "animation: thinking-pulse"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card:not([data-finished=\"1\"]) .chat-live-phase:is(.working, .thinking, .progress, .calling, .context)"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/task_phase_chip.js", "kind": "contains", "value": "export function setLiveCardTypingVisible(record, visible) {"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/chat.js", "kind": "contains", "value": "inlineTypingEl: root.querySelector('[data-live-typing]')"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/task_phase_chip.js", "kind": "contains", "value": "setLiveCardTypingVisible(record, !record.finished)"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/chat.js", "kind": "contains", "value": "setLiveCardTypingVisible(record, true);"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/chat.js", "kind": "contains", "value": "data-live-typing"}, {"id": "test_live_card_timeline_body_renders_markdown", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "renderMarkdown(displayBody, { inlineHeadingBreaks: true })"}, {"id": "test_live_card_timeline_body_renders_markdown", "path": "web/modules/chat_activity.js", "kind": "not_contains", "value": "escapeHtml(displayBody)"}, {"id": "test_live_card_timeline_headline_renders_markdown_for_progress", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "isProgressLine"}, {"id": "test_live_card_timeline_headline_renders_markdown_for_progress", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "isProgressLine ? renderMarkdown(displayHeadline, { inlineHeadingBreaks: true })"}, {"id": "test_live_card_timeline_headline_renders_markdown_for_progress", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "item.phase === 'working' || item.phase === 'thinking'"}, {"id": "test_live_card_timeline_headline_renders_markdown_for_progress", "path": "web/modules/chat_activity.js", "kind": "not_contains", "value": "item.phase === 'progress' || item.phase === 'thought'"}, {"id": "test_chat_history_replays_failed_task_summaries", "path": "web/modules/chat.js", "kind": "contains", "value": "const summary = taskTerminalSummary({ ...msg, task_id: taskId });"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "ouroboros/gateway/history.py", "kind": "contains", "value": "\"task_id\": str(entry.get(\"task_id\", \"\"))"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "web/modules/chat.js", "kind": "contains", "value": "const taskId = msg.task_id || '';"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "web/modules/chat.js", "kind": "contains", "value": "appendTaskSummaryToLiveCard(msg);"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "web/modules/chat.js", "kind": "contains", "value": "taskId,"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "if (role !== 'user' && !opts.isProgress && opts.taskId) {"}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "class=\"about-body\""}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "class=\"about-logo\""}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "class=\"about-title\""}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "class=\"about-credits\""}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "data-settings-panel=\"about\""}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "class=\"costs-stats-grid\""}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "class=\"costs-tables-grid\""}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "class=\"costs-table-label\""}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "cell('cost-cell-name', name"}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "className = 'cost-bar'"}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "document.createElement('tr')"}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "td.textContent = text"}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "bar.value"}, {"id": "test_evolution_tags_table_escapes_untrusted_tag_names", "path": "web/modules/evolution.js", "kind": "contains", "value": "escapeHtmlText(p.tag || '')"}, {"id": "test_evolution_tags_table_escapes_untrusted_tag_names", "path": "web/modules/evolution.js", "kind": "contains", "value": "escapeHtmlText(dateStr)"}, {"id": "test_evolution_tags_table_escapes_untrusted_tag_names", "path": "web/modules/evolution.js", "kind": "not_contains", "value": "${p.tag}"}, {"id": "test_skill_lifecycle_terminal_progress_can_finish_live_card", "path": "web/modules/log_events.js", "kind": "contains", "value": "startsWith('skill_lifecycle_')"}, {"id": "test_skill_lifecycle_terminal_progress_can_finish_live_card", "path": "web/modules/log_events.js", "kind": "contains", "value": "completed|failed"}, {"id": "test_skill_lifecycle_terminal_progress_can_finish_live_card", "path": "web/modules/log_events.js", "kind": "contains", "value": "lifecycleTerminal"}, {"id": "test_skill_lifecycle_terminal_progress_can_finish_live_card", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "Boolean(terminal) || ['done', 'lifecycle_error', 'cancelled'].includes(phase)"}, {"id": "test_sync_history_shows_typing_for_ongoing_tasks", "path": "web/modules/chat_history.js", "kind": "contains", "value": "export function createChatHistoryPager({"}, {"id": "test_sync_history_shows_typing_for_ongoing_tasks", "path": "web/modules/chat.js", "kind": "contains", "value": "function deriveChatStatus() {"}, {"id": "test_sync_history_shows_typing_for_ongoing_tasks", "path": "web/modules/chat.js", "kind": "contains", "value": "for (const [id, entry] of activeDirectActivities) {"}, {"id": "test_sync_history_shows_typing_for_ongoing_tasks", "path": "web/modules/chat.js", "kind": "contains", "value": "const wasFirstLoad = !historyLoaded;"}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "id=\"chat-swarm\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "id=\"chat-context-mode\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "class=\"chat-composer-pills\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "data-mode=\"low\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "data-mode=\"max\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "class=\"chat-send-group\""}, {"id": "test_skill_review_click_guard_prevents_duplicate_posts", "path": "web/modules/skills.js", "kind": "contains", "value": "if (reviewingSkills.has(name)) return;"}, {"id": "test_skill_review_click_guard_prevents_duplicate_posts", "path": "web/modules/skills.js", "kind": "contains", "value": "target.disabled = true;"}, {"id": "test_skill_review_click_guard_prevents_duplicate_posts", "path": "web/modules/skills.js", "kind": "contains", "value": "reviewingSkills.add(name);"}, {"id": "test_swarm_send_listener_uses_arrow_function", "path": "web/modules/chat.js", "kind": "contains", "value": "sendMessage(swarmArmed())"}, {"id": "test_swarm_send_listener_uses_arrow_function", "path": "web/modules/chat.js", "kind": "contains", "value": "sendBtn.addEventListener('click', () => sendMessage(swarmArmed()))"}, {"id": "test_swarm_default_off", "path": "web/modules/chat.js", "kind": "contains", "value": "data-armed=\"false\""}, {"id": "test_swarm_functions_exist", "path": "web/modules/chat.js", "kind": "contains", "value": "function swarmArmed()"}, {"id": "test_swarm_functions_exist", "path": "web/modules/chat.js", "kind": "contains", "value": "function setSwarm(armed)"}, {"id": "test_swarm_one_shot_disarms_on_send", "path": "web/modules/chat.js", "kind": "contains", "value": "if (planMode) setSwarm(false);"}, {"id": "test_context_segmented_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-context-mode .chat-seg {"}, {"id": "test_context_segmented_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-context-mode[data-context-mode=\"max\"] .chat-seg[data-mode=\"max\"]"}, {"id": "test_context_segmented_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-context-mode[data-context-mode=\"low\"] .chat-seg[data-mode=\"low\"]"}, {"id": "test_swarm_armed_marker_css", "path": "web/style.css", "kind": "contains", "value": ".chat-swarm[data-armed=\"true\"]"}, {"id": "test_composer_pills_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-composer-pills {"}, {"id": "test_composer_pills_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-swarm {"}, {"id": "test_composer_pills_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-context-mode {"}, {"id": "test_composer_pills_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-send-group {"}, {"id": "test_context_segment_click_handler", "path": "web/modules/chat.js", "kind": "contains", "value": "event.target.closest('.chat-seg')"}, {"id": "test_context_segment_click_handler", "path": "web/modules/chat.js", "kind": "contains", "value": "data-context-mode"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "contains", "value": "retiredTaskIds.delete(taskId);"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "contains", "value": "fromReconnect = false"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "contains", "value": "const isReconnect = typeof msg?.previouslyConnected === 'boolean'"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "contains", "value": "fromReconnect: isReconnect"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "contains", "value": "scheduleHistorySync"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "not_contains", "value": "if (!historyLoaded) retiredTaskIds.clear();"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "contains", "value": "let pendingReconnectSync = false;"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "contains", "value": "pendingReconnectSync = true;"}, {"id": "test_history_replay_unretires_represented_task_ids", "path": "web/modules/chat.js", "kind": "contains", "value": "if (pendingReconnectSync)"}, {"id": "test_sync_history_sweep_skips_invisible_completed_cards", "path": "web/modules/chat.js", "kind": "contains", "value": "ts.cardVisible"}, {"id": "test_sync_history_sweep_skips_invisible_completed_cards", "path": "web/modules/chat.js", "kind": "contains", "value": "ts.completed"}, {"id": "test_chat_input_disables_autocorrect", "path": "web/modules/chat.js", "kind": "contains", "value": "id=\"chat-input\""}, {"id": "test_chat_input_disables_autocorrect", "path": "web/modules/chat.js", "kind": "contains", "value": "autocorrect=\"off\""}, {"id": "test_chat_input_disables_autocorrect", "path": "web/modules/chat.js", "kind": "contains", "value": "autocapitalize=\"off\""}, {"id": "test_chat_input_disables_autocorrect", "path": "web/modules/chat.js", "kind": "contains", "value": "spellcheck=\"false\""}, {"id": "test_history_replay_preserves_failed_task_summary_phase", "path": "web/modules/task_phase_chip.js", "kind": "contains", "value": "function replayTerminalPhase(taskState, record) {"}, {"id": "test_history_replay_preserves_failed_task_summary_phase", "path": "web/modules/chat.js", "kind": "contains", "value": "finishLiveCard(taskId, msg.task_terminal_status ? taskTerminalPhase(msg) : replayTerminalPhase(taskState, record));"}, {"id": "test_history_replay_preserves_failed_task_summary_phase", "path": "web/modules/log_events.js", "kind": "contains", "value": "terminal || outcome === 'error' ? outcome : 'working'"}, {"id": "test_chat_messages_rows_keep_height_no_flex_shrink", "path": "web/style.css", "kind": "regex", "value": "#chat-messages > \\*[,\\s][^{]*\\{[^}]*flex-shrink:\\s*0"}, {"id": "test_health_regressed_badge_rendered", "path": "web/modules/skill_card_renderer.js", "kind": "contains", "value": "skill.health_regressed"}, {"id": "test_chat_composer_uses_two_row_toolbar", "path": "web/modules/chat.js", "kind": "contains", "value": "class=\"chat-text-row\""}, {"id": "test_chat_composer_uses_two_row_toolbar", "path": "web/modules/chat.js", "kind": "contains", "value": "class=\"chat-toolbar-row\""}, {"id": "test_chat_drag_drop_stages_attachments", "path": "web/modules/chat_media.js", "kind": "contains", "value": "page.addEventListener('drop'"}, {"id": "test_chat_drag_drop_stages_attachments", "path": "web/style.css", "kind": "contains", "value": "#chat-input-area.drag-active .chat-input-wrap"}, {"id": "test_chat_input_no_long_pill_padding", "path": "web/style.css", "kind": "not_contains", "value": "padding: 10px 256px 10px 42px"}, {"id": "test_cancel_run_button_marker_gated", "path": "web/modules/chat.js", "kind": "contains", "value": "btn.dataset.cancelRun = '1'"}, {"id": "test_cancel_run_button_marker_gated", "path": "web/modules/chat.js", "kind": "contains", "value": "const eligible = cancelRunEligibility({"}, {"id": "test_cancel_run_button_marker_gated", "path": "web/modules/chat.js", "kind": "contains", "value": "cancelable: !record.historicalUnavailable && !record.historicalUnconfirmed && cancelableTaskIds.has(record.groupId),"}, {"id": "test_cancel_run_button_marker_gated", "path": "web/modules/chat.js", "kind": "not_contains", "value": "data-cancel-run>"}, {"id": "test_cancelled_phase_has_warn_tone", "path": "web/style.css", "kind": "contains", "value": ".chat-live-phase:is(.warn, .alive, .empty, .cancelled)"}, {"id": "test_sync_history_merges_offline_bootstrap_user_rows", "path": "web/modules/chat.js", "kind": "contains", "value": "applyHistoryMessages(messages, { fromReconnect, includeUser: true });"}, {"id": "test_cancel_run_confirm_and_cascade", "path": "web/modules/chat.js", "kind": "contains", "value": "await requestStop(taskId, action);"}, {"id": "test_cancel_run_confirm_and_cascade", "path": "web/modules/chat.js", "kind": "contains", "value": "openTaskControlMenu(btn, {"}, {"id": "test_cancel_run_confirm_and_cascade", "path": "web/modules/activity.js", "kind": "contains", "value": "await requestStop(id, action);"}, {"id": "test_cancel_run_confirm_and_cascade", "path": "web/modules/task_control_menu.js", "kind": "contains", "value": "cancelTask(id, { cascade: true, stopPolicy: stopPolicyFor(action) })"}, {"id": "test_inflight_keyed_final_scoped_conclusion", "path": "web/modules/chat.js", "kind": "contains", "value": "const finished = activeDirectActivities.get(explicitTaskId);"}, {"id": "test_inflight_keyed_final_scoped_conclusion", "path": "web/modules/chat.js", "kind": "contains", "value": "recordConcludedActivity(explicitTaskId);"}, {"id": "test_inflight_keyed_final_scoped_conclusion", "path": "web/modules/chat.js", "kind": "contains", "value": "if (finished?.clientMessageId) {"}, {"id": "test_inflight_routing_receipt_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "if (receiptCid && pendingSubmissions.delete(receiptCid)) {"}, {"id": "test_inflight_history_annotation_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "if (msg.chat_annotation && msg.client_message_id) {"}, {"id": "test_inflight_history_annotation_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "pendingSubmissions.delete(String(msg.client_message_id));"}, {"id": "test_inflight_bare_final_never_ledgers", "path": "web/modules/chat.js", "kind": "not_contains", "value": "recordConcludedActivity(aid)"}, {"id": "test_inflight_bare_final_never_ledgers", "path": "web/modules/chat.js", "kind": "regex", "value": "} else if \\(msg\\.system_type !== 'terminal_incident'\\) \\{[^{}]*?activeDirectActivities\\.clear\\(\\);\\s*pendingSubmissions\\.clear\\(\\);"}, {"id": "test_inflight_reconnect_user_row_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "if (fromReconnect && msg.role === 'user' && msg.client_message_id) {"}, {"id": "test_inflight_queue_eviction_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "onWs('outbound_dropped', (msg) => {"}, {"id": "test_inflight_queue_eviction_retires_pending", "path": "web/modules/ws.js", "kind": "contains", "value": "this.emit('outbound_dropped', {"}, {"id": "test_inflight_queue_eviction_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "markPendingDropped(cid);"}, {"id": "test_inflight_queue_eviction_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "Not delivered — send again"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "function isPinnedToLatest()"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "const pinned = isPinnedToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "if (state.activeFilters[cat] && pinned) scrollToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "if (state.activeFilters[category] && pinned) scrollToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "not_contains", "value": "if (state.activeFilters[cat]) scrollToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "not_contains", "value": "if (state.activeFilters[category]) scrollToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "window.addEventListener('ouro:page-shown', (event) => {"}, {"id": "tool-call-signal-death-renders-error", "path": "web/modules/log_events.js", "kind": "contains", "value": "const signalDeath = Boolean(evt.signal) || (typeof evt.exit_code === 'number' && evt.exit_code < 0);"}, {"id": "tool-call-signal-death-killed-label", "path": "web/modules/log_events.js", "kind": "contains", "value": "killed (${evt.signal || evt.exit_code})"}] +[{"id": "test_degraded_outcomes_render_with_typed_severity", "path": "web/modules/chat.js", "kind": "contains", "value": "taskOutcomeSeverity,"}, {"id": "test_degraded_outcomes_render_with_typed_severity", "path": "web/modules/log_events.js", "kind": "contains", "value": "const presentation = taskPresentation(terminal || outcome === 'error' ? outcome : 'working');"}, {"id": "test_degraded_outcomes_render_with_typed_severity", "path": "web/modules/log_events.js", "kind": "contains", "value": "['failed', 'infra_failed'].includes(execution)"}, {"id": "test_degraded_outcomes_render_with_typed_severity", "path": "web/modules/log_events.js", "kind": "contains", "value": "objective === 'fail'"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const liveCardRecords = new Map();"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": " function blockVisible(record) {\n if (!record || record.isSubagent) return true;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "summarizeChatLiveEvent"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "Show details"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "if (msg.is_progress) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "updateLiveCardFromProgressMessage(msg, { grantCancelAuthority: true });"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "appendTaskSummaryToLiveCard(msg);"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "else if (explicitTaskId && typedTerminal) {\n changed = appendTaskSummaryToLiveCard(msg) || changed;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "onWs('log', (msg) => {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "withRemoteActivity(() => updateLiveCardFromLogEvent(msg.data));"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "hideTypingIndicatorOnly();"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function hasActiveLiveCard()"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "state.activePage !== 'chat'"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function isNearBottom(threshold = NEAR_BOTTOM_THRESHOLD_PX)"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const isMounted = node.parentNode === messagesDiv;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": " function noteToolMetrics(taskId, metrics, rawTs, { suppressDomInsert = false } = {}) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": " || record.items.some((item) => !String(item.dedupeKey || '').startsWith('task_done|'))\n || (record.finished && record.phaseEl?.dataset?.phase !== 'done');"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": " if (blockVisible(record)) insertMessageNode(record.root, { reorderExisting });\n else if (record.root.parentNode === messagesDiv) record.root.remove();"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "not_contains", "value": "taskUiStates"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "export function isTerminalTaskPhase(phase = '', terminal = false) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": " record.finished = true;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "not_contains", "value": "forceCard"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": " if (!record.items.some((item) => String(item.dedupeKey || '').startsWith('tool:'))) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "if (record.finished && !isTerminalTaskPhase(nextPhase, summary.terminal)) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const taskId = msg.task_id || '';"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": " const record = getLiveCardRecord(taskId);"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "const wasFinished = record.finished;"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "settleLiveCard(record, summary.phase || 'done', wasFinished);"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function settleLiveCard(record, phase, wasFinished) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": " if (!wasFinished && blockVisible(record)) scheduleHistorySync();"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "function setLiveCardExpanded(record, expanded) {"}, {"id": "test_chat_progress_updates_route_into_live_card", "path": "web/modules/chat.js", "kind": "contains", "value": "if (record.root.dataset.expanded === value) return false;"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "return Boolean(terminal) || ['done', 'lifecycle_error', 'cancelled'].includes(phase);"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/chat.js", "kind": "contains", "value": "const desiredPhase = desiredLiveCardPhase(record, activePhase);"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/chat.js", "kind": "contains", "value": "record.finished = isTerminalTaskPhase(nextPhase, summary.terminal);"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/chat.js", "kind": "contains", "value": "const presentation = taskPresentation(phase || 'done');"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "function extractCommandText(args) {"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "evt.status === 'non_zero_exit'"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "phase: 'warn'"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "A command returned"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "function toolCallKey(evt, groupId) {\n return `tool:${groupId}:${evt.tool_call_id || `${evt.tool || ''}|${toolCallTarget(evt.args)}`}`;\n}"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "not_contains", "value": "task_checkpoint_reflection"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "not_contains", "value": "task_checkpoint_anomaly"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "not_contains", "value": "Checkpoint anomaly"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "task_checkpoint"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": "periodic self-check"}, {"id": "test_live_card_recovery_keeps_step_failures_non_terminal", "path": "web/modules/log_events.js", "kind": "contains", "value": " dedupeKey: toolCallKey(evt, groupId),"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/logs.js", "kind": "contains", "value": "from './log_events.js'"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/logs.js", "kind": "contains", "value": "isGroupedTaskEvent(evt)"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/logs.js", "kind": "contains", "value": "createTaskGroupCard"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/logs.js", "kind": "contains", "value": "renderTaskTimeline"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/log_events.js", "kind": "contains", "value": "export function summarizeLogEvent"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/log_events.js", "kind": "contains", "value": "export function summarizeChatLiveEvent"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/log_events.js", "kind": "contains", "value": "export function isGroupedTaskEvent"}, {"id": "test_logs_use_shared_log_event_helpers_and_group_task_cards", "path": "web/modules/log_events.js", "kind": "contains", "value": "export function getLogTaskGroupId"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/ui.css", "kind": "contains", "value": "--accent-light:"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-header-actions {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-header-btn {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card[data-finished=\"1\"] {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-timeline {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-toggle {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-summary-button {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card[data-expanded=\"1\"] > .chat-live-summary-button .chat-live-chevron {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card[data-expanded=\"1\"] > .chat-live-timeline {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".log-task-card {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "contains", "value": ".log-task-timeline {"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "regex", "value": "\\.chat-live-title\\s*\\{[^}]*font-weight:\\s*500;"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "regex", "value": "\\.chat-live-line-title\\s*\\{[^}]*font-weight:\\s*400;"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards", "path": "web/style.css", "kind": "regex", "value": "\\n\\.chat-live-line-body\\s*\\{[^}]*font-size:\\s*var\\(--type-meta\\);"}, {"id": "test_styles_cover_chat_header_controls_and_grouped_cards_expanded", "path": "web/style.css", "kind": "regex", "value": "\\.chat-live-line\\[data-expanded=\"1\"\\]\\s+\\.chat-live-line-body\\s*\\{[^}]*font-size:\\s*var\\(--type-body\\);"}, {"id": "test_chat_only_polls_state_when_active", "path": "web/modules/chat.js", "kind": "contains", "value": "state.activePage !== 'chat'"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": ".chat-live-typing {"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": ".chat-live-typing span {"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": "animation: typing-bounce"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card[data-finished=\"1\"] > .chat-live-summary-button .chat-live-typing {"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": "animation: thinking-pulse"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/style.css", "kind": "contains", "value": ".chat-live-card:not([data-finished=\"1\"]) .chat-live-phase:is(.working, .thinking, .progress, .calling, .context)"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/task_phase_chip.js", "kind": "contains", "value": "export function setLiveCardTypingVisible(record, visible) {"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/chat.js", "kind": "contains", "value": "inlineTypingEl: root.querySelector('[data-live-typing]')"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/task_phase_chip.js", "kind": "contains", "value": "setLiveCardTypingVisible(record, !record.finished)"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/chat.js", "kind": "contains", "value": "setLiveCardTypingVisible(record, true);"}, {"id": "test_live_card_has_inline_typing_dots_and_pulsing_phase_badge", "path": "web/modules/chat.js", "kind": "contains", "value": "data-live-typing"}, {"id": "test_live_card_timeline_body_renders_markdown", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "renderMarkdown(displayBody, { inlineHeadingBreaks: true })"}, {"id": "test_live_card_timeline_body_renders_markdown", "path": "web/modules/chat_activity.js", "kind": "not_contains", "value": "escapeHtml(displayBody)"}, {"id": "test_live_card_timeline_headline_renders_markdown_for_progress", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "isProgressLine"}, {"id": "test_live_card_timeline_headline_renders_markdown_for_progress", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "isProgressLine ? renderMarkdown(displayHeadline, { inlineHeadingBreaks: true })"}, {"id": "test_live_card_timeline_headline_renders_markdown_for_progress", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "item.phase === 'working' || item.phase === 'thinking'"}, {"id": "test_live_card_timeline_headline_renders_markdown_for_progress", "path": "web/modules/chat_activity.js", "kind": "not_contains", "value": "item.phase === 'progress' || item.phase === 'thought'"}, {"id": "test_chat_history_replays_failed_task_summaries", "path": "web/modules/chat.js", "kind": "contains", "value": "const summary = taskTerminalSummary({ ...msg, task_id: taskId });"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "ouroboros/gateway/history.py", "kind": "contains", "value": "\"task_id\": str(entry.get(\"task_id\", \"\"))"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "web/modules/chat.js", "kind": "contains", "value": "const taskId = msg.task_id || '';"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "web/modules/chat.js", "kind": "contains", "value": "appendTaskSummaryToLiveCard(msg);"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "web/modules/chat.js", "kind": "contains", "value": "taskId,"}, {"id": "test_chat_history_replays_task_summaries_into_live_cards", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "if (role !== 'user' && !opts.isProgress && opts.taskId) {"}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "class=\"about-body\""}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "class=\"about-logo\""}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "class=\"about-title\""}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "class=\"about-credits\""}, {"id": "test_about_uses_css_classes_not_inline", "path": "web/modules/settings_ui.js", "kind": "contains", "value": "data-settings-panel=\"about\""}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "class=\"costs-stats-grid\""}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "class=\"costs-tables-grid\""}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "class=\"costs-table-label\""}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "cell('cost-cell-name', name"}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "className = 'cost-bar'"}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "document.createElement('tr')"}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "td.textContent = text"}, {"id": "test_costs_uses_css_classes_not_inline", "path": "web/modules/costs.js", "kind": "contains", "value": "bar.value"}, {"id": "test_evolution_tags_table_escapes_untrusted_tag_names", "path": "web/modules/evolution.js", "kind": "contains", "value": "escapeHtmlText(p.tag || '')"}, {"id": "test_evolution_tags_table_escapes_untrusted_tag_names", "path": "web/modules/evolution.js", "kind": "contains", "value": "escapeHtmlText(dateStr)"}, {"id": "test_evolution_tags_table_escapes_untrusted_tag_names", "path": "web/modules/evolution.js", "kind": "not_contains", "value": "${p.tag}"}, {"id": "test_skill_lifecycle_terminal_progress_can_finish_live_card", "path": "web/modules/log_events.js", "kind": "contains", "value": "startsWith('skill_lifecycle_')"}, {"id": "test_skill_lifecycle_terminal_progress_can_finish_live_card", "path": "web/modules/log_events.js", "kind": "contains", "value": "completed|failed"}, {"id": "test_skill_lifecycle_terminal_progress_can_finish_live_card", "path": "web/modules/log_events.js", "kind": "contains", "value": "lifecycleTerminal"}, {"id": "test_skill_lifecycle_terminal_progress_can_finish_live_card", "path": "web/modules/chat_activity.js", "kind": "contains", "value": "Boolean(terminal) || ['done', 'lifecycle_error', 'cancelled'].includes(phase)"}, {"id": "test_sync_history_shows_typing_for_ongoing_tasks", "path": "web/modules/chat_history.js", "kind": "contains", "value": "export function createChatHistoryPager({"}, {"id": "test_sync_history_shows_typing_for_ongoing_tasks", "path": "web/modules/chat.js", "kind": "contains", "value": "function deriveChatStatus() {"}, {"id": "test_sync_history_shows_typing_for_ongoing_tasks", "path": "web/modules/chat.js", "kind": "contains", "value": "for (const [id, entry] of activeDirectActivities) {"}, {"id": "test_sync_history_shows_typing_for_ongoing_tasks", "path": "web/modules/chat.js", "kind": "contains", "value": "const wasFirstLoad = !historyLoaded;"}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "id=\"chat-swarm\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "id=\"chat-context-mode\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "class=\"chat-composer-pills\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "data-mode=\"low\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "data-mode=\"max\""}, {"id": "test_swarm_and_context_dom_present", "path": "web/modules/chat.js", "kind": "contains", "value": "class=\"chat-send-group\""}, {"id": "test_skill_review_click_guard_prevents_duplicate_posts", "path": "web/modules/skills.js", "kind": "contains", "value": "if (reviewingSkills.has(name)) return;"}, {"id": "test_skill_review_click_guard_prevents_duplicate_posts", "path": "web/modules/skills.js", "kind": "contains", "value": "target.disabled = true;"}, {"id": "test_skill_review_click_guard_prevents_duplicate_posts", "path": "web/modules/skills.js", "kind": "contains", "value": "reviewingSkills.add(name);"}, {"id": "test_swarm_send_listener_uses_arrow_function", "path": "web/modules/chat.js", "kind": "contains", "value": "sendMessage(swarmArmed())"}, {"id": "test_swarm_send_listener_uses_arrow_function", "path": "web/modules/chat.js", "kind": "contains", "value": "sendBtn.addEventListener('click', () => sendMessage(swarmArmed()))"}, {"id": "test_swarm_default_off", "path": "web/modules/chat.js", "kind": "contains", "value": "data-armed=\"false\""}, {"id": "test_swarm_functions_exist", "path": "web/modules/chat.js", "kind": "contains", "value": "function swarmArmed()"}, {"id": "test_swarm_functions_exist", "path": "web/modules/chat.js", "kind": "contains", "value": "function setSwarm(armed)"}, {"id": "test_swarm_one_shot_disarms_on_send", "path": "web/modules/chat.js", "kind": "contains", "value": "if (planMode) setSwarm(false);"}, {"id": "test_context_segmented_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-context-mode .chat-seg {"}, {"id": "test_context_segmented_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-context-mode[data-context-mode=\"max\"] .chat-seg[data-mode=\"max\"]"}, {"id": "test_context_segmented_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-context-mode[data-context-mode=\"low\"] .chat-seg[data-mode=\"low\"]"}, {"id": "test_swarm_armed_marker_css", "path": "web/style.css", "kind": "contains", "value": ".chat-swarm[data-armed=\"true\"]"}, {"id": "test_composer_pills_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-composer-pills {"}, {"id": "test_composer_pills_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-swarm {"}, {"id": "test_composer_pills_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-context-mode {"}, {"id": "test_composer_pills_css_exists", "path": "web/style.css", "kind": "contains", "value": ".chat-send-group {"}, {"id": "test_context_segment_click_handler", "path": "web/modules/chat.js", "kind": "contains", "value": "event.target.closest('.chat-seg')"}, {"id": "test_context_segment_click_handler", "path": "web/modules/chat.js", "kind": "contains", "value": "data-context-mode"}, {"id": "test_history_replay_resyncs_after_reconnect", "path": "web/modules/chat.js", "kind": "not_contains", "value": "retiredTaskIds"}, {"id": "test_history_replay_resyncs_after_reconnect", "path": "web/modules/chat.js", "kind": "contains", "value": "fromReconnect = false"}, {"id": "test_history_replay_resyncs_after_reconnect", "path": "web/modules/chat.js", "kind": "contains", "value": "const isReconnect = typeof msg?.previouslyConnected === 'boolean'"}, {"id": "test_history_replay_resyncs_after_reconnect", "path": "web/modules/chat.js", "kind": "contains", "value": "fromReconnect: isReconnect"}, {"id": "test_history_replay_resyncs_after_reconnect", "path": "web/modules/chat.js", "kind": "contains", "value": "scheduleHistorySync"}, {"id": "test_history_replay_resyncs_after_reconnect", "path": "web/modules/chat.js", "kind": "contains", "value": "let pendingReconnectSync = false;"}, {"id": "test_history_replay_resyncs_after_reconnect", "path": "web/modules/chat.js", "kind": "contains", "value": "pendingReconnectSync = true;"}, {"id": "test_history_replay_resyncs_after_reconnect", "path": "web/modules/chat.js", "kind": "contains", "value": "if (pendingReconnectSync)"}, {"id": "test_sync_history_sweep_rederives_block_presence", "path": "web/modules/chat.js", "kind": "contains", "value": " for (const rec of liveCardRecords.values()) {\n reorderDirtyCardIfNeeded(rec);\n ensureLiveCardVisible(rec);\n }"}, {"id": "test_sync_history_sweep_rederives_block_presence", "path": "web/modules/chat.js", "kind": "not_contains", "value": "cardVisible"}, {"id": "test_chat_input_disables_autocorrect", "path": "web/modules/chat.js", "kind": "contains", "value": "id=\"chat-input\""}, {"id": "test_chat_input_disables_autocorrect", "path": "web/modules/chat.js", "kind": "contains", "value": "autocorrect=\"off\""}, {"id": "test_chat_input_disables_autocorrect", "path": "web/modules/chat.js", "kind": "contains", "value": "autocapitalize=\"off\""}, {"id": "test_chat_input_disables_autocorrect", "path": "web/modules/chat.js", "kind": "contains", "value": "spellcheck=\"false\""}, {"id": "test_history_replay_preserves_failed_task_summary_phase", "path": "web/modules/task_phase_chip.js", "kind": "contains", "value": "export function replayTerminalPhase(record) {\n return (record?.finished ? record?.phaseEl?.dataset?.phase : '') || 'done';"}, {"id": "test_history_replay_preserves_failed_task_summary_phase", "path": "web/modules/chat.js", "kind": "contains", "value": "finishLiveCard(taskId, msg.task_terminal_status ? taskTerminalPhase(msg) : replayTerminalPhase(record));"}, {"id": "test_history_replay_preserves_failed_task_summary_phase", "path": "web/modules/log_events.js", "kind": "contains", "value": "terminal || outcome === 'error' ? outcome : 'working'"}, {"id": "test_chat_messages_rows_keep_height_no_flex_shrink", "path": "web/style.css", "kind": "regex", "value": "#chat-messages > \\*[,\\s][^{]*\\{[^}]*flex-shrink:\\s*0"}, {"id": "test_health_regressed_badge_rendered", "path": "web/modules/skill_card_renderer.js", "kind": "contains", "value": "skill.health_regressed"}, {"id": "test_chat_composer_uses_two_row_toolbar", "path": "web/modules/chat.js", "kind": "contains", "value": "class=\"chat-text-row\""}, {"id": "test_chat_composer_uses_two_row_toolbar", "path": "web/modules/chat.js", "kind": "contains", "value": "class=\"chat-toolbar-row\""}, {"id": "test_chat_drag_drop_stages_attachments", "path": "web/modules/chat_media.js", "kind": "contains", "value": "page.addEventListener('drop'"}, {"id": "test_chat_drag_drop_stages_attachments", "path": "web/style.css", "kind": "contains", "value": "#chat-input-area.drag-active .chat-input-wrap"}, {"id": "test_chat_input_no_long_pill_padding", "path": "web/style.css", "kind": "not_contains", "value": "padding: 10px 256px 10px 42px"}, {"id": "test_cancel_run_button_marker_gated", "path": "web/modules/chat.js", "kind": "contains", "value": "btn.dataset.cancelRun = '1'"}, {"id": "test_cancel_run_button_marker_gated", "path": "web/modules/chat.js", "kind": "contains", "value": "const eligible = cancelRunEligibility({"}, {"id": "test_cancel_run_button_marker_gated", "path": "web/modules/chat.js", "kind": "contains", "value": "cancelable: !record.historicalUnavailable && !record.historicalUnconfirmed && cancelableTaskIds.has(record.groupId),"}, {"id": "test_cancel_run_button_marker_gated", "path": "web/modules/chat.js", "kind": "not_contains", "value": "data-cancel-run>"}, {"id": "test_cancelled_phase_has_warn_tone", "path": "web/style.css", "kind": "contains", "value": ".chat-live-phase:is(.warn, .alive, .empty, .cancelled)"}, {"id": "test_sync_history_merges_offline_bootstrap_user_rows", "path": "web/modules/chat.js", "kind": "contains", "value": "applyHistoryMessages(messages, { fromReconnect, includeUser: true });"}, {"id": "test_cancel_run_confirm_and_cascade", "path": "web/modules/chat.js", "kind": "contains", "value": "await requestStop(taskId, action);"}, {"id": "test_cancel_run_confirm_and_cascade", "path": "web/modules/chat.js", "kind": "contains", "value": "openTaskControlMenu(btn, {"}, {"id": "test_cancel_run_confirm_and_cascade", "path": "web/modules/activity.js", "kind": "contains", "value": "await requestStop(id, action);"}, {"id": "test_cancel_run_confirm_and_cascade", "path": "web/modules/task_control_menu.js", "kind": "contains", "value": "cancelTask(id, { cascade: true, stopPolicy: stopPolicyFor(action) })"}, {"id": "test_inflight_keyed_final_scoped_conclusion", "path": "web/modules/chat.js", "kind": "contains", "value": "const finished = activeDirectActivities.get(explicitTaskId);"}, {"id": "test_inflight_keyed_final_scoped_conclusion", "path": "web/modules/chat.js", "kind": "contains", "value": "recordConcludedActivity(explicitTaskId);"}, {"id": "test_inflight_keyed_final_scoped_conclusion", "path": "web/modules/chat.js", "kind": "contains", "value": "if (finished?.clientMessageId) {"}, {"id": "test_inflight_routing_receipt_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "if (receiptCid && pendingSubmissions.delete(receiptCid)) {"}, {"id": "test_inflight_history_annotation_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "if (msg.chat_annotation && msg.client_message_id) {"}, {"id": "test_inflight_history_annotation_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "pendingSubmissions.delete(String(msg.client_message_id));"}, {"id": "test_inflight_bare_final_never_ledgers", "path": "web/modules/chat.js", "kind": "not_contains", "value": "recordConcludedActivity(aid)"}, {"id": "test_inflight_bare_final_never_ledgers", "path": "web/modules/chat.js", "kind": "regex", "value": "} else if \\(msg\\.system_type !== 'terminal_incident'\\) \\{[^{}]*?activeDirectActivities\\.clear\\(\\);\\s*pendingSubmissions\\.clear\\(\\);"}, {"id": "test_inflight_reconnect_user_row_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "if (fromReconnect && msg.role === 'user' && msg.client_message_id) {"}, {"id": "test_inflight_queue_eviction_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "onWs('outbound_dropped', (msg) => {"}, {"id": "test_inflight_queue_eviction_retires_pending", "path": "web/modules/ws.js", "kind": "contains", "value": "this.emit('outbound_dropped', {"}, {"id": "test_inflight_queue_eviction_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "markPendingDropped(cid);"}, {"id": "test_inflight_queue_eviction_retires_pending", "path": "web/modules/chat.js", "kind": "contains", "value": "Not delivered — send again"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "function isPinnedToLatest()"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "const pinned = isPinnedToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "if (state.activeFilters[cat] && pinned) scrollToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "if (state.activeFilters[category] && pinned) scrollToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "not_contains", "value": "if (state.activeFilters[cat]) scrollToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "not_contains", "value": "if (state.activeFilters[category]) scrollToLatest();"}, {"id": "test_logs_autoscroll_sticks_only_when_pinned", "path": "web/modules/logs.js", "kind": "contains", "value": "window.addEventListener('ouro:page-shown', (event) => {"}, {"id": "tool-call-signal-death-renders-error", "path": "web/modules/log_events.js", "kind": "contains", "value": "const signalDeath = Boolean(evt.signal) || (typeof evt.exit_code === 'number' && evt.exit_code < 0);"}, {"id": "tool-call-signal-death-killed-label", "path": "web/modules/log_events.js", "kind": "contains", "value": "killed (${evt.signal || evt.exit_code})"}] diff --git a/tests/test_projects_v6640.py b/tests/test_projects_v6640.py index b443a0d1d..779688406 100644 --- a/tests/test_projects_v6640.py +++ b/tests/test_projects_v6640.py @@ -531,7 +531,14 @@ def test_project_lifecycle_rows_render_design_system_action_static_contract(): # the shared design-system role beside their `btn btn-xs btn-danger` sibling. assert "chat-live-project-btn" not in chat assert "chat-live-project-btn" not in style - assert 'class="btn btn-xs btn-default" data-turn-into-project' in chat + # The conversion button is now built by the chrome sync from the record's + # facts (an HTML template could not be re-derived when a turn is direct), + # so the design-system role and the marker app.js queries are set on the + # node itself. + chrome = chat[chat.index("function syncBlockChrome(record) {"):chat.index("function syncCancelRunButton(record) {")] + assert "btn.className = 'btn btn-xs btn-default';" in chrome + assert "btn.dataset.turnIntoProject = '1';" in chrome + assert "btn.textContent = 'Turn into project';" in chrome # The identity chip keeps its own role, now built once in ui_helpers and # shared by the converted card (chat.js) and the bound-task footer (app.js). assert "chat-live-project-card-btn" in helpers @@ -703,7 +710,9 @@ def test_web_frames_keep_reference_order_and_one_authored_reply(): assert reference.index("isModelWaitReference(row)") < reference.index("reviewReferenceFromRow(row)") logs = chat[chat.index("function updateLiveCardFromLogEvent"):chat.index("function addMessage")] assert logs.index("handleCardReference(evt)") < logs.index("const taskId = getLogTaskGroupId(evt)") - assert logs.index("handleCardReference(evt)") < logs.index("applyEventTelemetry") + # Tool accounting (the telemetry closure's one surviving job) also runs + # after the reference seam. + assert logs.index("handleCardReference(evt)") < logs.index("noteToolMetrics(taskId, evt, rawTs)") history = chat[chat.index("function applyHistoryMessages"):chat.index("async function syncHistory")] assert history.index("handleCardReference(msg)") < history.index("updateLiveCardFromProgressMessage(msg,") fanout = chat[chat.index("onWs('chat'"):chat.index("onWs('message_annotation'")] diff --git a/tests/test_restart_reconnect.py b/tests/test_restart_reconnect.py index ad72ae01e..30c7b37e0 100644 --- a/tests/test_restart_reconnect.py +++ b/tests/test_restart_reconnect.py @@ -287,13 +287,21 @@ def test_task_done_live_summary_distinguishes_typed_failure(): assert "headline: presentation.headline" in source -def test_chat_warning_task_summaries_force_visible_cards(): +def test_chat_warning_task_summaries_keep_a_visible_block(): + """A task that ended warn/error/cancelled keeps its block in the transcript. + + No writer forces that any more (the sticky `forceCard` flag and the replay's + `needsVisibleTerminal` branch are gone): the ONE presence predicate admits + any terminal outcome whose phase chip is not `done`, so the same summary + row mounts the block live, after a reload and after a reconnect, while a + zero-tool Done turn leaves nothing behind. + """ source = _read("web/modules/chat.js") - assert "summary.terminal && summary.phase === 'warn'" in source - assert ( - "const needsVisibleTerminal = severity === 'error' || severity === 'warn'" - " || severity === 'cancelled';" - ) in source + predicate = source[source.index("function blockVisible(record) {"):source.index("function noteDirectTurn")] + assert "|| (record.finished && record.phaseEl?.dataset?.phase !== 'done');" in predicate + # The completion note itself is not content, so Done alone admits nothing. + assert "|| record.items.some((item) => !String(item.dedupeKey || '').startsWith('task_done|'))" in predicate + assert "forceCard" not in source def test_chat_scrolls_to_bottom_after_first_history_load(): @@ -319,7 +327,13 @@ def test_chat_scrolls_to_bottom_after_first_history_load(): "The anchors factory must receive the live-card registry it reads" assert "liveCardRecords.get(entry.taskId)" in anchor_source, \ "A rebuilt live card whose earliest timestamp changed needs canonical task lookup" - assert "reorderExisting: anchorMovedEarlier" in source, \ + # One reanchor owner: a card is re-sorted only when its own anchor actually + # moved earlier (or its history position did), never on every mutation. + assert "const movedEarlier = stampNodeTimestamp(record.root, rawTs, { anchor: true });" in source, \ + "The reanchor owner must read the node's own anchor move" + assert "if (!movedEarlier && !positionChanged) return false;" in source, \ + "An unmoved anchor must not re-sort a mounted card" + assert "ensureLiveCardVisible(record, { reorderExisting: true });" in source, \ "A mounted task card must be re-sorted if a later event lowers its anchor" assert "record._anchorOrderDirty = true;" in source assert "reorderDirtyCardIfNeeded(rec);" in source, \ diff --git a/tests/test_subagent_reliability.py b/tests/test_subagent_reliability.py index 52f7c9b29..84cedd63e 100644 --- a/tests/test_subagent_reliability.py +++ b/tests/test_subagent_reliability.py @@ -66,7 +66,12 @@ def test_replay_learns_subagent_lineage_before_merging_card_rows(): # child card; ephemeral registration now lives in the early reference seam. assert fanout.index("learnSubagentLineage(msg);") < fanout.index("updateLiveCardFromProgressMessage(msg,") assert fanout.index("learnSubagentLineage(msg);") < fanout.index("routeSubagentFinalMessageToCard(explicitTaskId, msg)") - assert "forceTaskCard(childId, rawTs);" in src + # A lineage-known child is minted as its parent's nested card by whichever + # path reaches it first (#636) — no sticky force writer: the parent's anchor + # follows the child's frame and the predicate always admits a child block. + assert "reanchorTaskCard(getLiveCardRecord(parentId), rawTs);" in src + assert "const record = getSubagentCardRecord(childId, parentId, role);" in src + assert "if (!record || record.isSubagent) return true;" in src # A child is locked terminal from EITHER a terminal subagent event OR a # genuinely-settled server task_terminal_status; interrupted stays retryable. assert "const replayTerminal = msg.task_terminal_status" in src