From a9dc927cc62723ae338a7e3d7f6dea00a9ea43b8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 7 May 2026 14:19:08 +0000 Subject: [PATCH] diag(quic-interop): log TESTCASE + parallel branch entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hypothesis: the [interop] / [batch] logs are missing because we're hitting the SERIAL branch (parallel=false), not the parallel one — which would explain perfectly the writer trace pattern: - streamsView grows by 1 every 2-3 drains - active stays at 6 or 7 (3 H3 init + at most 4 chunk streams) - one stream per RTT cadence on the wire That's exactly what client.get(authority, path) looks like in sequence. parallel=true would call prepareRequests for chunks of 64. Two new unconditional log lines (low-volume, control-flow only, NOT in hot paths): 1. [boot] now includes TESTCASE and ROLE — to verify the runner is sending TESTCASE=multiplexing as expected 2. [boot] transfer mode: parallel=BOOL urls=N — confirms which branch we took If parallel=false despite TESTCASE=multiplexing, the bug is in our testcase-to-parallel mapping (line 192 of InteropClient.kt). If parallel=true but [interop]/[batch] still missing, the bug is elsewhere. --- .../vitorpamplona/quic/interop/runner/InteropClient.kt | 8 +++++++- .../com/vitorpamplona/quic/connection/WriterDebug.kt | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/quic/interop/src/main/kotlin/com/vitorpamplona/quic/interop/runner/InteropClient.kt b/quic/interop/src/main/kotlin/com/vitorpamplona/quic/interop/runner/InteropClient.kt index ccda033a7c..fe8a681377 100644 --- a/quic/interop/src/main/kotlin/com/vitorpamplona/quic/interop/runner/InteropClient.kt +++ b/quic/interop/src/main/kotlin/com/vitorpamplona/quic/interop/runner/InteropClient.kt @@ -90,7 +90,9 @@ fun main() { com.vitorpamplona.quic.connection.writerDebugEnabled = true System.err.println( "[boot] DEBUG=1; writerDebugEnabled=true; build_id=" + - "${com.vitorpamplona.quic.connection.WRITER_DEBUG_BUILD_ID}", + "${com.vitorpamplona.quic.connection.WRITER_DEBUG_BUILD_ID}; " + + "TESTCASE=${System.getenv("TESTCASE") ?: "(unset)"}; " + + "ROLE=${System.getenv("ROLE") ?: "(unset)"}", ) } else { System.err.println("[boot] DEBUG=${debugEnv ?: "(unset)"} writerDebugEnabled=false") @@ -320,6 +322,10 @@ private fun runTransferTest( } val authority = if (port == 443) host else "$host:$port" + // Unconditional one-shot log so we can confirm which branch + // runs even when DEBUG=0 — this is a control-flow boundary, + // not a hot-path trace. + System.err.println("[boot] transfer mode: parallel=$parallel urls=${urls.size}") val outcome = withTimeoutOrNull(TRANSFER_TIMEOUT_SEC * 1_000L) { val responses = diff --git a/quic/src/commonMain/kotlin/com/vitorpamplona/quic/connection/WriterDebug.kt b/quic/src/commonMain/kotlin/com/vitorpamplona/quic/connection/WriterDebug.kt index ff3aebd7b8..0fbd586f24 100644 --- a/quic/src/commonMain/kotlin/com/vitorpamplona/quic/connection/WriterDebug.kt +++ b/quic/src/commonMain/kotlin/com/vitorpamplona/quic/connection/WriterDebug.kt @@ -39,4 +39,4 @@ var writerDebugEnabled: Boolean = false * docker layer cache didn't serve a stale jar). Bump when adding new * trace lines to make them traceable from the wire run. */ -const val WRITER_DEBUG_BUILD_ID: String = "2026-05-07-batch-log-v1" +const val WRITER_DEBUG_BUILD_ID: String = "2026-05-07-parallel-branch-v1"