fix(metrics): give identity projection its own degraded signal #23
Inga granskare
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!23
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/identity-degraded-signal"
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?
Closes #22.
reconcileIdentityset the samedegradedflag the Actions step uses, and the metric writerpublished that single boolean as the Actions enforcement gauge. So a failed profile write or a failed
rename raised an alert saying the reconciler was not applying CI tier enforcement, and told the
operator to broaden a token scope — when the token was fine and an identity value had been refused.
It was also permanent: the projection recomputes the same diff every run, so a value the git host will
never accept produced one warning per tick and a stuck flag, under the wrong name. The two identity
gauges that existed counted successes only; nothing counted failures.
The mix-up is now structurally impossible, not merely fixed.
reconcileIdentityno longerreceives the Actions flag at all — it returns its own outcome — and the shared reference is renamed so
the two cannot be silently crossed again.
Publishes
gitborg_reconciler_identity_projection_degradedandgitborg_reconciler_identity_failures,both unlabelled gauges rewritten in full each run, with HELP text naming the likely cause: a value the
identity provider accepts and the git host will not — a reserved or already-taken username, or an
over-length email. The Actions gauge keeps its value and meaning; only its HELP gained a pointer
saying identity failures are not counted there. Identity warnings lost their misleading token-scope
wording and now name the refused fields.
Three properties the dependent alert rule needs to respect, spelled out in the HELP text:
…_identity_failuresis per-run, not cumulative — hence no_totalsuffix. A steady1meansone account failing every tick, not one failure since boot.
rate()/increase()are meaningless.alert should also require a clean last run or let the status alert own that case.
Verification
Thirteen new assertions, all red before the fix. The key cases: identity degrades without touching
the Actions gauge on a refused profile write and on a refused rename; and a forbidden repo listing
degrades Actions without touching identity.
Additive only — no existing metric renamed, no environment-variable contract change — so current
alert rules are unaffected. Version bumped; the tag is the release trigger and was deliberately not
created here.