Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

feat(worker): installing the bot connects the repo, no manual add

2 months ago

a540657
Authored
grim8/23/2026, 4:11:40 AM
Installing tripwire on an open-git repo did nothing. The installation delivery
arrived, the normalizer returned null, and processEvent logged 'event kind not
ingested'. The repo only appeared later, when its first pull request forced a
lazy upsert — so an install looked like it had silently failed.

open-git's installation events cannot become a NormalizedEvent: they carry no
actor, and they name repositories by BARE UUID. Forcing them into that shape
means inventing both. They are handled before that step instead, with
credentials, which normalization deliberately has none of. The api does return
owner and name, so the worker asks — authenticated with the bot jwt, since
there is no repo yet to mint an installation token against.

getInstallationOrg defaults its forge to github. Called without one it looked
for a GitHub claim, found none, and left every repo unclaimed — the repo row
existed but stayed invisible in the dash, which is exactly the symptom this was
meant to fix. Both call sites now pass the forge. syncInstallationRepos took
the same treatment: it hardcoded forge github and wrote unfindable rows.

Never guesses. No org until someone claims the installation, and rows land
private because open-git reports no visibility — the fail-closed side, since
the 10 public run page must not open for a repo nobody confirmed is public.

Verified live: deleting every opengit repo row and replaying one
installation.repos_changed recreated BOTH repos the installation grants, bound
to the claiming org.

Parent815381f

6 files changed
  • apps/worker/src/forge-runtime.ts+28−0
  • apps/worker/src/jobs/process-event.ts+111−0
  • packages/db/src/services/repos.ts+8−2
  • packages/forge-opengit/src/client/installation.test.ts+99−0
  • packages/forge-opengit/src/client/installation.ts+66−0
  • packages/forge-opengit/src/index.ts+4−0