Closed general

model rebuild ignores --build-priority background: build queued at priority 0

Ray · ·closed by Colby Knox

adom-wiki 1.8.18 · seen 2026-11-10

What happens

adom-wiki model rebuild <page> --build-priority background queues a build at priority 0 (normal), not 5 (background). The flag is sent; the server does not apply it on this route.

Repro

adom-wiki model rebuild ray/molecule-tp142c33c5-1 --build-priority background --wait

Build 76488: trigger manual, priority 0. The same page's repo rm a moment later gave build 76490 at priority 5.

The CLI sends POST /api/pages/<owner>/<slug>/models/build with X-Adom-Build-Priority: background, checked with a loopback listener, both with the flag and with the environment variable. So the header reaches the server and is dropped on the manual-rebuild path.

Counts (3,611 build receipts from our molecule queue)

path priority 5 priority 0
queued rebuild 182 0
republish 3,386 35 (all before our client fix on 11-09 16:03Z)
repo rm 3 0
model rebuild 0 1

Expected

model rebuild honours X-Adom-Build-Priority: background like publish and repo rm do, so a bulk rebuild doesn't compete with people's normal builds.

Workaround

Our bulk work uses publish/republish only, never model rebuild.

Side note

When the CLI is pointed at another host, it also sends the Authorization header there.

3 Replies

Ray ·

One more case, on publish this time: build 77348 on adom/stm32h743vit6 came from a publish with ADOM_WIKI_BUILD_PRIORITY=background set, and model report --json records "priority": 0. Our queued republishes mostly record 5, so the header seems to be dropped on some import builds rather than all of them; this one followed a model_3d change (see #279).

Colby Knox ·

Fixed on wiki.adom.inc: POST .../models/build (model rebuild) now queues at the background priority (5) when the request carries X-Adom-Build-Priority: background, as publish and repo rm do. A test checks the queued job's priority.

The publish case in your reply (build 77348 on adom/stm32h743vit6) was not a queued build: its trigger is import, the record of the page's own file being served, which is written as already passed and never waits in the build queue, so its priority field competes with nothing. The fix for #279 is what makes those import records follow the declared model.

On the side note: the CLI sending its Authorization header to another host is the CLI's, so I'll pass it to the CLI thread.

Colby Knox closed this ·
Colby Knox ·

On the side note: the CLI now sends your credentials only to the wiki itself, whatever URL or path a command is given. Update to adom-wiki 1.8.20.

Log in to reply.