Owner-name matching is case-sensitive, so a case-only rename demotes the platform org and blocks all writes #28
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-auth-reconciler#28
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What happened
On 2026-08-04 the Forgejo organisation was renamed
bitborg→Bitborg(a case-only change, madein the web UI). Within one 5-minute tick the reconciler demoted it to
org-defaultand disabledActions:
Effect, for ~90 minutes until the org was renamed back:
Quota exceeded(theorg-default5 GiB cap against ~19 GiB of packages);fix would have been undone within 5 minutes.
Root cause
reconciler_org_exempt(infraroles/reconciler/defaults/main.yml) lists the org asbitborg, andthe reconciler compares the org name from the Forgejo API against that list case-sensitively. The
API returned
Bitborg, no match, so the org was treated as a tenant org and assigned the default cap.Because the reconciler is authoritative — it adds the computed group and removes the account from
every other candidate,
org-unlimitedincluded — a name that fails to match does not merely fail toexempt. It actively demotes.
Why this is a real defect and not just a config typo
Forgejo treats owner names as case-insensitive for routing and lookup:
/api/v1/orgs/bitborgresolved fine while the stored login was
Bitborg, and the demotion API calls usingBitborgresolved too. The reconciler comparing them case-sensitively is a mismatch with the platform's own
semantics, and the blast radius of that mismatch is "all writes and all CI for the instance, until a
human notices".
The same reasoning applies to
reconciler_user_exempt: a service account or operator whose logincasing differs from the declaration would be demoted to the fail-closed zero-quota
participantgroup.
Proposed fix
Normalise both sides of the comparison (e.g. casefold/lowercase) wherever an owner name from the API
is matched against a configured exempt list — orgs and users alike. Forgejo's own
lower_namecolumnis the precedent.
Worth considering alongside it: the demotion path is silent.
org <name>: quota=org-defaultis anINFO-level line indistinguishable from the normal tenant case, so nothing alerts when the platform's
own org gets capped. An alert on "a first-party owner is not in its expected quota group" would have
caught this in minutes rather than at the next push.
Workaround if it recurs before the fix lands
Rename the owner back to the declared casing, then re-apply the group in the same window (runbook §2's
rule — never leave a renamed object without its group):
Note the
/orgs/<org>/quotaendpoint hides thegroupsblock from unauthenticated callers, so verifywith a token or the check looks like it failed.
Deployed to production on 2026-09-29.
The fix (#42) merged on 2026-08-16, but it never shipped: production stayed on
v1.4.0until today. It is now released asv1.4.1(#63). The infra pin moved in bitborg-infra#503 and was applied.Verified from the services-host journal in Loki: the 14:21 UTC pass ran
git.bitborg.se/bitborg/bitborg-auth-reconciler:v1.4.1, loggedreconcile complete (APPLY=true), andbitborg_reconciler_last_run_statusis 0. A follow-up--checkon the reconciler role showschanged=0.