mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-12 02:02:13 +03:00
CI failures on PR #9439: 1. Migration version collision: upstream/release/v3.8.50 landed 134_proxy_logs_egress_ip.sql (#9291) after this branch's original rebase, colliding with this branch's own 134_agentic_conversations.sql. Renamed to 135_agentic_conversations.sql (re-rebased onto the current tip first). 2. check:file-size: rebaselined the files this PR's own feature growth pushed over their frozen/cap thresholds (RequestLoggerDetail.tsx, RequestTimeline.tsx, RequestLoggerV2.tsx, chat.ts, chatCore.ts — see the new _rebaseline_2026_08_04_9439 entry for the itemized justification) plus open-sse/executors/base.ts, which was already over its own frozen baseline on release/v3.8.50 independent of this branch (confirmed via `git diff upstream/release/v3.8.50 HEAD -- open-sse/executors/base.ts` — empty). 3. A third real bug, found by re-checking the live dashboard after the previous round's fixes: a request with a long real conversation chain showed only its own response in the "Full Conversation" panel. Root cause: open-sse/handlers/chatCore/logTruncation.ts's truncateForLog() replaces any request body over ~8KB with a bare {_truncated, _originalBytes, messageCount, ...} summary, dropping messages/input entirely — the norm, not the exception, for any conversation with real substance. buildRequestTurns() legitimately found nothing to parse, so the transcript silently rendered only that row's response, and (more subtly) every subsequent row's delta-slicing bookkeeping was computed against the wrong running total (0 instead of the row's real turn count), which would have corrupted the rest of the reconstruction too for any longer chain built on top of a truncated row. Fix: buildMultiRowConversation now detects a truncated request body via its messageCount field, uses that count for delta bookkeeping instead of silently treating it as zero, and renders one explicit placeholder turn ("N messages not shown — the request body was too large to log") instead of just disappearing. Test plan: - New regression tests for the truncation case (single truncated row, and a truncated row followed by a real row to verify bookkeeping stays correct) - npm run check:migration-numbering / check:file-size — clean - npm run typecheck:core / npm run lint — clean - npm run test:unit — 27086 tests, only 4 failures remain (down from 18 — 2 were fixed by the newer upstream commits pulled in by this re-rebase), all independently pre-existing/unrelated (ServiceSupervisor timing, monaco-editor path, npm-pack) - npm run test:vitest — 291/291 passed