From b48ae1975169ff6fc95e5430492dff14c0b780d5 Mon Sep 17 00:00:00 2001 From: Max Lin Date: Sun, 5 Apr 2026 11:31:07 -0700 Subject: [PATCH] debug: add gate log before interpretWriteTurn call Logs whether WRITE_INTERPRETING_TURN_TYPES check passes, to confirm whether the function is actually being reached. Co-Authored-By: Claude Sonnet 4.6 --- apps/web/src/lib/server/turn-router.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/web/src/lib/server/turn-router.ts b/apps/web/src/lib/server/turn-router.ts index 61d3805..e61c16d 100644 --- a/apps/web/src/lib/server/turn-router.ts +++ b/apps/web/src/lib/server/turn-router.ts @@ -118,9 +118,14 @@ export async function routeMessageTurn( // Pipeline B: interpret write intent for write-capable turns only. const priorOperation = discourseState.pending_write_operation; - const writeInterpretation = WRITE_INTERPRETING_TURN_TYPES.has( + const shouldInterpretWrite = WRITE_INTERPRETING_TURN_TYPES.has( classification.turnType, - ) + ); + console.info("interpret_write_turn_gate", { + turnType: classification.turnType, + shouldInterpretWrite, + }); + const writeInterpretation = shouldInterpretWrite ? await interpretWriteTurn({ currentTurnText: input.normalizedText, turnType: classification.turnType,