refactor(janitor): migrate to adapter factory (MF-10) #320
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!320
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/mf10-migrate-janitor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Cleanup of MF-8 (#299) out-of-scope list — migrates
janitor.tsfrom hard-codednew ForgejoAdapter(token)instantiations tocreateForgeAdapterForRepo(repo, token)from the adapter factory (MF-4).All 15 call sites in the production
implseam now resolve the correct adapter (Forgejo / GitHub / GitLab) per-repo via theforge:binding inconfig/agents.json, instead of silently falling back to Forgejo. This finally makes the janitor's auto-heal paths actually multi-forge.new ForgejoAdapter(token).X(...)withcreateForgeAdapterForRepo(repo, token).X(...)at all 15 call sitesForgejoAdapterfrom theforgejo-adapterimport (onlyparseReporemains — the helper is generic)createForgeAdapterForRepoimport from../infrastructure/forge/adapter-factoryimpldoc-blocks to describe the factory-driven seamrepo: stringas the first argument, so callers and tests are unchangedTest plan
bun x turbo run typecheckcleanbun x biome checkclean (299 files)bun test src/background/janitor.test.ts— 42 pass / 0 fail, 89 expect() callsRefs MF-8 (#299, #313) — this was the explicit out-of-scope follow-up called out in the MF-8 PR body.