VersionControl:PRs/pickipedia/175
From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
| State | 🟣 merged 2026-11-06 16:58:52 |
|---|---|
| Worked on by | magent, justin |
| Moods | #interfaces |
| Deploy | not said |
| Branch | magenta-push → production, by magent-cryptograss
|
| Opened · last pushed | 2026-11-06 04:45:40 · 2026-11-06 04:45:35 |
Justin, in #interfaces (6 Nov): "Notification of every edit fires from pickipedia to magenta."
- `src/MagentaPush.php`: after a save (`PageSaveComplete`), a move (`PageMoveComplete`, with the title it had) or an upload (`UploadComplete`), POSTs `{title, revid, user, kind, at}` as JSON to magenta's `/api/wiki/hook/` (`$wgPickiPediaContentMagentaUrl` + the path), signed `X-Magenta-Signature: sha256=<HMAC-SHA256 of the body>` with `$wgPickiPediaContentMagentaHookSecret`. Sent as a deferred update, after the response, with a 5 s timeout: a save never waits on magenta. A push that fails is logged (channel PickiPediaContent) and let go: magenta sweeps our recent changes once a minute and catches it, saying so in its #ops.
- No secret configured: nothing is sent, and the sweep alone serves. The secret is the same value as magenta's `WIKI_HOOK_SECRET` (magenta#404, maybelle-config PR to follow). Set it in `LocalSettings.local.php` on the wiki host as `$wgPickiPediaContentMagentaHookSecret`, or as `MAGENTA_HOOK_SECRET` in the environment.
- `tests/check-magenta-push.php` (payload, signature vector, URL), in the Jenkinsfile and the checks workflow.
Not run in a live wiki here (my container is Justin's worktree, not this branch): the hook signatures are MediaWiki 1.43's, checked against the container's interfaces.
Redeploy: pickipedia (then put the secret in LocalSettings.local.php there, the same one as magenta's)
Worked on by: magent, justin, in #interfaces