Visual review pages for every open MR
Adds a visual-review queue service that builds a visual-review page for every open, non-draft, same-project MR, publishes it to Cloudflare Pages (https://mr-<iid>.<pages_project>.pages.dev) and keeps a link block at the top of the MR description.
Flow
- Producer (API only): writes or repairs the
<!-- huginn:visual-review -->block. Queues an MR's first page at once, and a new head afterdebounce_minutes(20 by default). The old page stays linked meanwhile. - Worker: if the MR's
/diffsfingerprint (outsideskip_paths) equals the published one, it keeps the page (rebases, generated-only pushes). Otherwise it pins its own base worktree to the MR head and runs the skill as a credential-less agent that only writes the page. - Publish: huginn runs the skill's
publish.pyitself (fresh HOME and a config huginn writes, root-owned PATH, only the Cloudflare variables). publish.py refuses non-public projects. - huginn's own description rewrite (
mr_processing) keeps the block. Rewrites by anyone else are repaired on the next pass.
Deploy: new image docker/visual-review.Dockerfile on top of huginn-bot's: fonts, espeak-ng, the render and Kokoro venvs on CPU torch, the voice pre-downloaded, and the skill pinned read-only. The service is opt-in through compose profile visual-review. It has no Docker socket, and /app/huginn is root-owned in that image. To enable it, set COMPOSE_PROFILES=visual-review, CLOUDFLARE_API_TOKEN (Pages: Edit) and CLOUDFLARE_ACCOUNT_ID in .env, and add visual_review: {enabled: true, pages_project: thorchain-mr-reviews, skip_paths: ...} to the project in huginn.yaml (see examples/huginn.yaml). Workers default to 1.
Tests: tests/test_visual_review.py adds 29 tests covering the block, the fingerprint, producer debounce and repair, the handler paths, publish env scrubbing and config validation. Full suite: 5941 passed. 2 failures in test_git_canonical_url/test_git_operations also fail on master on horcrux (host git credential config). The image builds, and a smoke test inside it passed: Kokoro TTS offline, the fonts, publish.py --which, and read-only /app/huginn and skill.
The companion thornode MR adds the CI environment: job behind the MR widget's "View app" button.