From 759b70ec6ac6be14326b7dddec60d15f63582581 Mon Sep 17 00:00:00 2001 From: EMRG Evolution Date: Thu, 20 Aug 2026 14:34:10 +0800 Subject: [PATCH] =?UTF-8?q?emrg:=20open-source=20prompt=20publishing=20spe?= =?UTF-8?q?c=20=E2=80=94=20never=20JSON-escape=20comment/discussion=20bodi?= =?UTF-8?q?es=20(rant=202026-08-20T14:10:28)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emrg/server/open_source_prompt.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emrg/server/open_source_prompt.md b/emrg/server/open_source_prompt.md index e36532bb..f120d9a3 100644 --- a/emrg/server/open_source_prompt.md +++ b/emrg/server/open_source_prompt.md @@ -381,6 +381,11 @@ Closes # - [ ] New tests added" ``` +> ⚠️ **Publishing spec (rant 2026-08-20T14:10:28 — comment double-encoding bug)**: +> 1. **Always pass RAW text as the body of any comment / discussion / issue / PR** — write the body to a file with a heredoc and submit via `--field body=@file` (or `$(cat file)` / inline text). **NEVER** use patterns like `python3 -c "import json; print(json.dumps(...))"` that JSON-serialize the body before submitting — GitHub renders the escaped literal as-is (中文→`\uXXXX`, newlines→literal `\n`, quotes wrapped), producing garbled text. +> 2. **Always read back and verify the posted body**: after posting, fetch the comment and check that the first character is NOT `"` and the text contains no `\uXXXX` residuals. If garbled, fix immediately with `updateDiscussionComment` (or the equivalent edit mutation) using the decoded original. +> 3. This applies to every "multi-line text → GitHub API" submission (comment / issue body / PR body / discussion reply) without exception. + **Not pushing = wasted work. Push failed → check permissions/network → record in the state file → finish.** #### B.7 Exit condition