Home

boring / v2

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

fix(worker): resolve the sweeper's adapter per repo, not once at boot

2 months ago

c2bd379
Authored
grim8/23/2026, 3:41:23 AM
The action sweeper took a single adapter, wired to GitHub's, and ran it against
every stuck row whatever forge the repo was on. Sweeping an open-git repo
authenticated as the GitHub app, found no installation for it there, and logged
'no installation for boring/playground' every minute until the give-up window
abandoned the row. Same forge-blindness as the lazy upsert, one layer down.

It now resolves per row. runs carries repo_full_name and no forge, so the forge
comes from the repo itself: findRepoForge returns the forge of the one live row
with that name, and null when none or several match — acting on a guess there
would touch the wrong repository.

Also classifies listForgeConnections and disconnectForge as authed. They came
in with the forge groundwork and main's server-fn boundary test arrived by
merge, so nothing failed until the two met. A forge connection belongs to the
user, not an org: both carry accessGuard alone, and org-scoping either would
lock a user out of a connection they own.

Parent8278fce

5 files changed
  • apps/web/src/lib/server-fn-classification.ts+8−0
  • apps/worker/src/index.ts+15−3
  • apps/worker/src/jobs/sweep-actions.ts+17−4
  • apps/worker/src/sweep-actions.integration.test.ts+2−2
  • packages/db/src/services/repos.ts+20−0