Skip to content

emrg: open-source prompt publishing spec — never JSON-escape comment/discussion bodies (rant 2026-08-20T14:10:28) - #883

Merged
argszero merged 1 commit into
masterfrom
feature/open-source-publish-body-rule
Aug 20, 2026
Merged

emrg: open-source prompt publishing spec — never JSON-escape comment/discussion bodies (rant 2026-08-20T14:10:28)#883
argszero merged 1 commit into
masterfrom
feature/open-source-publish-body-rule

Conversation

@argszero

Copy link
Copy Markdown
Owner

Fixes the root cause pattern behind the GitHub discussion comment double-encoding bug (rant 2026-08-20T14:10:28): 3 comments on deepseek-harness discussions (#3519/#3505/#3520) were garbled because the publishing command JSON-serialized the body (json.dumps) before submitting, so GitHub rendered the escaped literal (中文→\\uXXXX, newlines→literal \\n).

The 3 historical comments were already repaired by the host via updateDiscussionComment. This PR adds the no-relapse prevention rules to the publishing spec of emrg/server/open_source_prompt.md (the source of truth for opensource-task prompts):

  1. Always pass RAW text as comment/discussion/issue/PR bodies — heredoc to file + --field body=@file (or $(cat file) / inline). NEVER python3 -c "json.dumps(...)" serialization patterns.
  2. Read back and verify after posting — first char must not be ", no \uXXXX residuals; if garbled, fix immediately via updateDiscussionComment.
  3. Applies to every multi-line text → GitHub API submission.

Doc-only change (Agent.md/test counts unaffected). Local: pytest test_doc_counts 4 passed, import + CLI OK.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (20260820-143548)

Doc-only change: publishing spec added to open_source_prompt.md B.6 (rant 2026-08-20T14:10:28 comment double-encoding). Verified the 3 rules — raw text bodies only, read-back verification, universal applicability — are correctly placed and reference the correct root cause (json.dumps serialization). CI run 32340170532: test PASS (1m22s) + test-windows PASS (54s). 1/3 LGTM.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (20260820-150026) — fresh per-cycle re-review

Re-verified head 759b70e (unchanged): doc-only 5-line addition to open_source_prompt.md B.6 — publishing spec with 3 no-relapse rules (raw text bodies via heredoc/--field body=@file, read-back verification for \uXXXX residuals, universal scope). Correctly placed after the PR-template block. CI run 32340170532: test PASS + test-windows PASS; mergeState CLEAN. 2/3 LGTMs.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (20260820-150958) — fresh per-cycle re-review

Re-verified head 759b70e (unchanged, now MERGEABLE/CLEAN after #882 merge): doc-only 5-line publishing spec in open_source_prompt.md B.6 — 3 no-relapse rules for the comment double-encoding bug (raw text bodies, read-back verification, universal scope). Correct placement and content. CI: test PASS + test-windows PASS (run 32340170532). 3/3 LGTMs.

@argszero
argszero merged commit fc9f65b into masterAug 20, 2026
2 checks passed
@argszero
argszero deleted the feature/open-source-publish-body-rule branch August 20, 2026 07:12
argszero added a commit that referenced this pull request Aug 20, 2026
#885)
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero