From ded49b8b1b5ff66419b7ad0b0a6e1d4eaa62d2bf Mon Sep 17 00:00:00 2001 From: Majjo <90888719+NoxRare@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:17:45 +0200 Subject: [PATCH] debug: hex dump batch_stories responses >1KB that parse 0 stories --- .../core/features/impl/global/CompanionServer.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/global/CompanionServer.kt b/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/global/CompanionServer.kt index 4f07329f..8f8d9877 100644 --- a/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/global/CompanionServer.kt +++ b/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/global/CompanionServer.kt @@ -381,6 +381,12 @@ class CompanionServer : Feature("CompanionServer") { } } } + // If still 0 and response is large enough to contain stories, dump hex for inspection + if (parsed == 0 && buffer.size > 1000) { + val hexPreview = buffer.take(128).joinToString(" ") { "%02x".format(it) } + pushStoryDebug("no_match", mapOf("endpoint" to endpoint, "hex_preview" to hexPreview, "bytes" to buffer.size)) + context.log.warn("CompanionServer: [$endpoint] ${buffer.size}B parsed 0 — hex: $hexPreview", "CompanionServer") + } } context.log.info("CompanionServer: [$endpoint] parsed $parsed new stories (total=${capturedStories.values.sumOf { it.size }})", "CompanionServer")