reconcile trigger core: sentinel + .path oneshot + 30s floor (ADR 0037 P1) #235

Stängd
öppnade 2026-07-28 19:29:09 +00:00 av supernaut · 1 kommentar
Ägare

Part of the event-driven reconcile trigger (ADR 0037). Phase 1 (infra half).

Give the existing oneshot reconciler a prompt trigger without changing the reconciler and without a daemon or queue.

What to build (bitborg-infra)

  • Sentinel + .path unit. A systemd user .path unit (under gitborg_user) watches a sentinel file and starts the existing gitborg-reconciler.service (oneshot) when it appears.
  • ExecStartPre deletes the sentinel at run start → a touch that arrives during a run re-fires the .path unit after the run (at-least-once-after-last-write).
  • 30 s min-interval floor (starting value): if the last successful run was < 30 s ago, skip and leave the sentinel so the .path unit re-fires when the window clears. Collapses bursts (e.g. repo-import) to one sweep; a lone sign-up still fires near-instantly.
  • Sentinel location: a dir writable by the co-located web container (bind-mounted into web) and by the reconciler's ExecStartPre, owned by gitborg_user.
  • 5-min timer untouched — remains the drift-healing backstop.

Done when

  • A touch of the sentinel triggers a reconcile within seconds; bursts within 30 s collapse to one run.
  • Timer sweep behaviour unchanged; backout = disable the .path unit.
  • Role/handlers idempotent; documented in the runbook.

Pairs with the web adapter issue (Phase 1, bitborg-web).

Part of the event-driven reconcile trigger (ADR 0037). **Phase 1 (infra half).** Give the existing oneshot reconciler a prompt trigger **without changing the reconciler** and without a daemon or queue. ## What to build (bitborg-infra) - **Sentinel + `.path` unit.** A systemd user `.path` unit (under `gitborg_user`) watches a sentinel file and starts the existing `gitborg-reconciler.service` (oneshot) when it appears. - **`ExecStartPre` deletes the sentinel** at run start → a touch that arrives *during* a run re-fires the `.path` unit after the run (at-least-once-after-last-write). - **30 s min-interval floor** (starting value): if the last successful run was < 30 s ago, skip and leave the sentinel so the `.path` unit re-fires when the window clears. Collapses bursts (e.g. repo-import) to one sweep; a lone sign-up still fires near-instantly. - **Sentinel location:** a dir writable by the co-located web container (bind-mounted into web) and by the reconciler's `ExecStartPre`, owned by `gitborg_user`. - **5-min timer untouched** — remains the drift-healing backstop. ## Done when - A touch of the sentinel triggers a reconcile within seconds; bursts within 30 s collapse to one run. - Timer sweep behaviour unchanged; backout = disable the `.path` unit. - Role/handlers idempotent; documented in the runbook. Pairs with the web adapter issue (Phase 1, bitborg-web).
Upphovsperson
Ägare

Part of epic bitborg-docs#54 (ADR 0037).

Part of epic bitborg-docs#54 (ADR 0037).
Logga in för att delta i denna konversation.
Ingen milstolpe
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#235
Ingen beskrivning angiven.