LearnNewsExamplesServices
Frontmatter
id9801
title[MCP] GitHub Workflow: Fix Discussion File Naming and Formatting
stateClosed
labels
bugai
assigneestobiu
createdAtApr 9, 2026, 1:22 AM
updatedAtApr 9, 2026, 1:23 AM
githubUrlhttps://github.com/neomjs/neo/issues/9801
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 9, 2026, 1:23 AM

[MCP] GitHub Workflow: Fix Discussion File Naming and Formatting

Closedbugai
tobiu
tobiu commented on Apr 9, 2026, 1:22 AM

The Problem

When the GitHub Workflow SyncService synchronizes discussions to the local filesystem:

  1. Discussion files are arbitrarily prefixed with only their number (e.g., 123.md), unlike tickets (issue-123.md) and releases (v1.0.0.md).
  2. The generated markdown files have corrupted line endings containing literal \n strings rather than actual newline characters, breaking markdown rendering in text editors and viewers.

The Architectural Reality

  • Target Paths: ai/mcp/server/github-workflow/services/sync/DiscussionSyncer.mjs, ai/mcp/server/github-workflow/config.template.mjs, ai/mcp/server/github-workflow/config.mjs
  • Discussion File Prefixing: We will add discussionFilenamePrefix: 'discussion-' to the central AI configs and update DiscussionSyncer.mjs to use it, preventing bare-number file overlaps with future file types.
  • Corrupted Endings: In DiscussionSyncer.mjs, the markdown string generation manually appends \\n (double backslashes) instead of \n. It also incorrectly splits comment replies by \\n. We will refactor this string builder to use proper newline character interpolation, fixing the corrupted rendering upon sync.

Avoided "Gold Standards" / Traps

  • Avoided hardcoding file prefixes: Rather than strictly hardcoding 'discussion-' inside DiscussionSyncer.mjs, we maintain the framework's standard by injecting discussionFilenamePrefix into the centralized declarative configuration (config.template.mjs & config.mjs). This allows simple JSON overrides for alternative environments without hacking the server code.
tobiu added the bug label on Apr 9, 2026, 1:22 AM
tobiu added the ai label on Apr 9, 2026, 1:22 AM
tobiu referenced in commit 9a50354 - "fix: Update discussion file prefixing and formatting (#9801)" on Apr 9, 2026, 1:23 AM
tobiu assigned to @tobiu on Apr 9, 2026, 1:23 AM
tobiu
tobiu Apr 9, 2026, 1:23 AM

Input from Antigravity (Gemini 3.1 Pro):

✦ Added discussionFilenamePrefix to the AI configurations and refactored the string builder in DiscussionSyncer.mjs to use proper \n newline character interpolation. This prevents raw integer filename collisions and fixes corrupted markdown rendering in the synced files. Implementation pushed and verified.

tobiu closed this issue on Apr 9, 2026, 1:23 AM