From 23f25f433915110268efee8e2e2d2c2266421343 Mon Sep 17 00:00:00 2001 From: "Alice (OpenClaw)" Date: Wed, 13 May 2026 17:34:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20include=20pre-answer=20callback=20debug?= =?UTF-8?q?=20in=20patch=20flow=20/=20=E5=B0=87=20pre-answer=20callback=20?= =?UTF-8?q?debug=20=E7=B4=8D=E5=85=A5=20patch=20=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reports/openclaw-patch-inventory.md | 2 ++ reports/pluginization-status-report.md | 2 ++ scripts/apply-openclaw-poc-patch.sh | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/reports/openclaw-patch-inventory.md b/reports/openclaw-patch-inventory.md index 908e9a9..e37c69e 100644 --- a/reports/openclaw-patch-inventory.md +++ b/reports/openclaw-patch-inventory.md @@ -45,6 +45,8 @@ Observed patch points: - raw callback debug file path: - `reply-end-debug.log` +- pre-answer callback debug write: + - `[pre-answer] ... data=...` - persisted state file path: - `reply-end-controls.json` - callback click handling: diff --git a/reports/pluginization-status-report.md b/reports/pluginization-status-report.md index 342a1eb..b35a335 100644 --- a/reports/pluginization-status-report.md +++ b/reports/pluginization-status-report.md @@ -74,6 +74,8 @@ The project now has: The apply/rollback flow has been validated against a pristine extracted `openclaw@2026.5.7` package. +The live acceptance loop has also shown why observability matters: a pre-answer callback debug write was needed to separate Telegram callback ingress from later acknowledgement failures. That instrumentation is now part of the current PoC patch flow. + ## What is still not pluginized enough ### 1. Live OpenClaw runtime still uses inline patch behavior diff --git a/scripts/apply-openclaw-poc-patch.sh b/scripts/apply-openclaw-poc-patch.sh index 0e1dfd9..7d44b31 100644 --- a/scripts/apply-openclaw-poc-patch.sh +++ b/scripts/apply-openclaw-poc-patch.sh @@ -53,8 +53,9 @@ if 'import fsSync from "node:fs";' not in bot_text: old_raw = 'const data = (callback.data ?? "").trim();' new_raw = '''const data = (callback.data ?? "").trim(); const replyEndDebugPath = path.join(process.env.OPENCLAW_STATE_DIR || path.join(process.env.HOME || "", ".openclaw"), "reply-end-debug.log"); + try { fsSync.appendFileSync(replyEndDebugPath, `[pre-answer] ${new Date().toISOString()} data=${data || ""}\n`); } catch {} try { fsSync.appendFileSync(replyEndDebugPath, `[raw] ${new Date().toISOString()} data=${data || ""}\n`); } catch {}''' -if old_raw in bot_text and 'reply-end-debug.log' not in bot_text: +if old_raw in bot_text and '[pre-answer]' not in bot_text: bot_text = bot_text.replace(old_raw, new_raw, 1) old_click = '''const chatId = callbackMessage.chat.id;