VersionControl:PRs/pickipedia-mcp/26
From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
| State | 🟣 merged 2026-10-30 21:56:42 |
|---|---|
| Worked on by | not said |
| Moods | not said |
| Deploy | not said |
| Branch | keep-line-breaks → master, by magent-cryptograss
|
| Opened · last pushed | 2026-09-15 21:50:28 · 2026-10-30 21:51:42 |
Fixes #25. ## The bug The verification middleware matches paragraphs joined into one line, which is fine for matching because a newline in prose renders as a space. But it also **stored and restored** them joined. The wiki's gate (`PickiPediaVerification`, `firstUnmarkedNewLine`) compares revisions line by line. So when a human had written a paragraph over two lines, the middleware sent it back as a single line the gate had never seen, with no marker, and the gate refused the whole edit. Real case: [[Arkansauce]] has its photo caption written over two lines, so adding a lineup section anywhere on the page failed with `pickipediaverification-bot-needs-proposed`. ## The fix - `buildLineSet()` still matches on the joined text but stores `currentParagraph.join( '\n' )`, so an unchanged paragraph goes back exactly as the page had it. - Paragraphs that are already marked or verified go back with their original lines instead of being joined. - Unchanged list items are returned byte for byte. They used to be rebuilt as `* content`, which turned `*foo` into `* foo`, and the gate treats that as a new line too. - A list item is never restored from a multi-line stored paragraph. New content is marked exactly as before. ## Checks `npm test` has a new section, "Unchanged paragraphs keep their line breaks". It includes a cut-down copy of the wiki gate, so the checks ask the same question the wiki will. Against the old `verification.ts`, 6 of the new checks fail. With this change, every check passes. Lint shows 0 errors; the 2 warnings are already on master, in `src/common/config.ts`. ## To ship Merge, then pull, `npm run build`, and **restart the stdio server**. The running process holds the old code until then. https://claude.ai/code/session_015YGcYQ1UzPuNAxQhHTcCz6