fix(local): repair the preview, broken since the bitborg rename #449

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/local-preview-rename-drift in i main 2026-08-19 07:33:08 +00:00
Ägare

make up in local/ fails outright:

TASK [Render app.ini (same template as prod)]
[ERROR]: Task failed: 'bitborg_domain' is undefined
  caused by: ansible/roles/forgejo/templates/app.ini.j2

The ADR 0039 rename moved gitborg_domain to bitborg_domain in group_vars and updated
app.ini.j2, but left local/vars.local.yml behind. The preview renders the prod template against
its own vars, so the template asked for a name its vars no longer defined.

Half-renamed rather than simply un-renamed. Line 77 of the same file already used
bitborg_domain; line 10 still defined gitborg_domain. Same shape as the ADR 0039 §7b textfile
writers, where HELP and TYPE moved to the new prefix and the sample line did not.

Nothing noticed because the preview is a developer tool and is not exercised by CI. The only signal
is a person running make up, and it stays broken until someone needs it, which is when they least
want to debug it.

Verified, not assumed

make up now completes and the stack serves. Checked in the running preview:

  • Forgejo reports 16.0.2+gitea-1.22.0.
  • The navbar "Create account" link resolves to https://www.bitborg.se/en/signup, so
    bitborg_www_domain renders as its own comment promises ("footer links render exactly as in
    prod"). It previously said www.gitborg.se.

Also renamed the display-only forgejo_app_name, which still read gitborg (local dev). Cosmetic,
same drift.

Why this came up

Needed to verify the ADR 0038 concealment surfaces against Forgejo 16.0.2 for #447 without touching
production. local/Makefile pins the floating 16-rootless, so the preview runs 16.0.2 today, which
makes it the right place for that check. Kept as its own change so the security bump in #447 stays a
two-line diff and reviews quickly.

Note for a follow-up, not fixed here

local/Makefile pins codeberg.org/forgejo/forgejo:16-rootless under a comment reading "Keep in
sync with ansible/group_vars/all/vars.yml (forgejo_image*, postgres_image*)". It is a floating minor
where prod is pinned exact, so the two cannot be in sync by construction. Convenient for this task,
but the comment claims an invariant that does not hold, and that is the same class of thing as the
bug above. Worth deciding deliberately rather than leaving the comment wrong.

`make up` in `local/` fails outright: ``` TASK [Render app.ini (same template as prod)] [ERROR]: Task failed: 'bitborg_domain' is undefined caused by: ansible/roles/forgejo/templates/app.ini.j2 ``` The ADR 0039 rename moved `gitborg_domain` to `bitborg_domain` in `group_vars` and updated `app.ini.j2`, but left `local/vars.local.yml` behind. The preview renders the prod template against its own vars, so the template asked for a name its vars no longer defined. **Half-renamed rather than simply un-renamed.** Line 77 of the same file already used `bitborg_domain`; line 10 still defined `gitborg_domain`. Same shape as the ADR 0039 §7b textfile writers, where `HELP` and `TYPE` moved to the new prefix and the sample line did not. Nothing noticed because the preview is a developer tool and is not exercised by CI. The only signal is a person running `make up`, and it stays broken until someone needs it, which is when they least want to debug it. ## Verified, not assumed `make up` now completes and the stack serves. Checked in the running preview: - Forgejo reports `16.0.2+gitea-1.22.0`. - The navbar "Create account" link resolves to `https://www.bitborg.se/en/signup`, so `bitborg_www_domain` renders as its own comment promises ("footer links render exactly as in prod"). It previously said `www.gitborg.se`. Also renamed the display-only `forgejo_app_name`, which still read `gitborg (local dev)`. Cosmetic, same drift. ## Why this came up Needed to verify the ADR 0038 concealment surfaces against Forgejo 16.0.2 for #447 without touching production. `local/Makefile` pins the floating `16-rootless`, so the preview runs 16.0.2 today, which makes it the right place for that check. Kept as its own change so the security bump in #447 stays a two-line diff and reviews quickly. ## Note for a follow-up, not fixed here `local/Makefile` pins `codeberg.org/forgejo/forgejo:16-rootless` under a comment reading "Keep in sync with ansible/group_vars/all/vars.yml (forgejo_image*, postgres_image*)". It is a floating minor where prod is pinned exact, so the two cannot be in sync by construction. Convenient for this task, but the comment claims an invariant that does not hold, and that is the same class of thing as the bug above. Worth deciding deliberately rather than leaving the comment wrong.
supernaut lade till 1 incheckning 2026-08-19 07:07:26 +00:00
fix(local): repair the preview, broken since the bitborg rename
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m48s
a33b31350d
`make up` failed outright: "'bitborg_domain' is undefined". The ADR 0039 rename
moved `gitborg_domain` to `bitborg_domain` in group_vars and updated
roles/forgejo/templates/app.ini.j2, but left local/vars.local.yml behind. The
preview renders the prod template against its own vars, so the template asked
for a name its vars no longer defined.

Half-renamed, not merely un-renamed: line 77 of the SAME file already used
`bitborg_domain` while line 10 still defined `gitborg_domain`. That is the same
shape as the ADR 0039 §7b textfile writers, where HELP and TYPE moved and the
sample line did not.

Nothing noticed because the preview is not exercised by CI. It is a developer
tool, so the only signal is a person running `make up`, and the failure is loud
when they do. Left alone it stays broken until someone needs it, which is
exactly when they least want to debug it. Found today needing it to verify the
ADR 0038 concealment surfaces against Forgejo 16.0.2 (#447).

Also renamed the display-only `forgejo_app_name` value, which still said
gitborg. Cosmetic, same drift.

`bitborg_www_domain` now carries the real prod value, so the footer and navbar
links render as the variable's own comment promises. Verified in the running
preview: the navbar "Create account" link resolves to
https://www.bitborg.se/en/signup.

Refs #447
supernaut tvångsskickade fix/local-preview-rename-drift från a33b31350d
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m48s
till d0caf4ea66
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m59s
2026-08-19 07:30:13 +00:00
Jämför
supernaut sammanfogade incheckning 9a2718b935 till main 2026-08-19 07:33:08 +00:00
supernaut tog bort grenen fix/local-preview-rename-drift 2026-08-19 07:33:08 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!449
Ingen beskrivning angiven.