Epic: event-driven reconcile trigger (ADR 0037) #54
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
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-docs#54
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?
Summary
Give the entitlement reconciler (ADR 0035) a prompt, event-driven trigger so an identity change
(sign-up, trial opt-in, Renovate toggle, new repo, future payment) is applied within seconds instead
of waiting up to 5 minutes for the next timer tick — without a work queue, and without turning
the reconciler into a long-running daemon.
What we're building
.pathunit fires the existing oneshot reconciler(zero reconciler code change).
ExecStartPredeletes the sentinel (at-least-once-after-last-write);a 30 s min-interval floor coalesces bursts; the 5-min timer stays as the backstop.
the Forgejo
repositorywebhook and the future payment service go through a small,stateless, socket-activated auth shim (no admin creds; per-source bearer tokens; TLS via Caddy;
internal-only + firewalled; pluggable auth for later mTLS).
trigger_lagKPI + run-cause metrics, Loki kick logs per source, and aLoki-based event-path-silent alert.
Decision record
See ADR 0037 — Reconciler event-driven trigger (
decisions/0037-reconciler-event-driven-work-queue.md).Tasks (phased; the timer backstop stays throughout)
repositorywebhook: bitborg-infra#236Out of scope
getPersonMemberOf, token bucket, per-keybackoff, reconciler-as-daemon) — retained only as ADR 0037's documented scale-out path.
Phases 1–3 shipped and verified end-to-end in production (2026-07-29). Moved to Roadmap → Shipped.
repositorywebhook (bitborg-infra#236): live + verified — creating a repo delivers to the shim → kick → reconcile (measured trigger lag 0 s). Shim: the newbitborg-reconcile-triggerservice. Needed three follow-up fixes found in prod verification (a delegated-taskbecome, default-vs-system webhook type + a UI-created system webhook, and Forgejo'sALLOWED_HOST_LISTSSRF guard).gitborg_reconcile_trigger_lag_secondsmetric, a LokiReconcileEventPathSilentalert (evaluating), and a dashboard row.Phase 4 — payment adapter + external ingress remains, deferred until the payment service ships (tracked internally). The 5-minute reconciler timer backstops correctness throughout.
Closing — Phases 1–3 are shipped and verified in production.
.path+ 30 s floor)repositorywebhooktrigger_lag, Loki alert, board)The 5-minute timer remains in place as the backstop throughout, as designed.
Phase 4 (payment adapter wiring) was scoped from the outset as deferred until the payment
service ships, and is tracked separately — it is not blocking this epic. The scale-out path (full
work-queue controller, per-object reconcile, mTLS on the shim) stays documented in ADR 0037 as a
future option rather than open work.