VersionControl:PRs/magenta/429
From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
| State | 🟣 merged 2026-11-08 03:23:57 |
|---|---|
| Worked on by | re, magent, justin |
| Moods | #docs-tests-qa |
| Deploy | redeploy maybelle (memory-lane serves the hook endpoint). |
| Branch | magent/wiki-hook-move → main, by magent-cryptograss
|
| Opened · last pushed | 2026-11-08 02:25:39 · 2026-11-08 02:25:35 |
re found this while writing [[Cryptograss:Wiki hooks]] (#docs-tests-qa, 8 Nov 02:24Z). **The bug.** When a page is moved, PickiPedia's push sends the old title as `from` (`MagentaPush.php:37`, pickipedia production), but `api_wiki_hook` ignored it. The sweep doesn't catch it either: the move's revision is the one just pushed, so it's skipped as handled. re checked this against rev 14570, a move on 5 Nov. Whatever magenta kept under the old title stayed stale until it expired, up to six hours for a link preview. **The fix.** If the push carries `from`, the hooks run for the old title as well, through the same `wiki_hooks.run` road, logged as a push. The hooks page's last-heard line says "moved from …". Also fixes a stale line in `wiki_hooks.py`'s docstring. It said the poller re-reads its pages every five minutes. Since #414 it re-reads as soon as the log says a page changed, and five minutes is only the fallback. **Tested:** `test_wiki_hooks.py` passes 13 of 13 on SQLite, including the new `test_a_move_runs_the_hooks_for_its_old_title_too`. No live move has gone through it yet. Deploy: redeploy maybelle (memory-lane serves the hook endpoint). Worked on by: re, magent, justin, in #docs-tests-qa