dead5fa8a8
Issue #503 reported a hardBreak sent via updatePageJson being «silently cut» — no error, no line break — forcing the agent to split lines into separate paragraphs. A faithful repro shows the bug does NOT reproduce against develop: hardBreak is fully representable in the markdown canon in BOTH directions and survives the real Yjs write path. - pm -> md: the serializer (now in @docmost/prosemirror-markdown after the #293 STEP 5 consolidation) emits the CommonMark hard break ` \n`, not a bare `\n`. - md -> pm: marked tokenizes ` \n` to `<br>`, which generateJSON parses back to a hardBreak node in ONE paragraph (not split, not dropped). - updatePageJson (PM JSON -> applyDocToFragment = PMNode.fromJSON + updateYFragment, the real collab-session write encoder -> read back) keeps text + hardBreak + text in one paragraph. The issue's diagnosis points at packages/mcp/.../markdown-converter.ts as the serializer, but that file is a 15-line re-export shim since #293 STEP 5 — the diagnosis predates the converter consolidation that already closed both sides. P1 (semantic round-trip) + P2 (byte-fixpoint) hold, and the node already has broad property/corpus/golden coverage in the package. No converter change is warranted (switching the break form to `\`+newline would churn the whole #351 byte-fixpoint corpus against the established ` \n` repo convention for zero functional gain). This adds one integration guard at the MCP canon seam covering all three seams of the reported updatePageJson path. Mutation-verified: neutering the serializer arm or the importer `<br>` handling reddens seams 1-2; neutering the real applyDocToFragment write path reddens seam 3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>