dispatch: add IssueFetcher config hook (default stays gh) #12

Open
opened 2026-05-26 03:03:16 +00:00 by coilysiren · 0 comments
Owner

Problem

coily dispatch is locked to GitHub because fetchIssue shells out to gh api directly. Kais own work routes through Forgejo, so consumers need a way to swap the resolver without forking the whole dispatch package.

Fix

  • Add an IssueFetcher function type (or interface) to dispatch.Config. Signature: func(ctx context.Context, ref *issueRef) (*ghIssue, error).
  • If unset, fall back to the existing gh-based fetcher. The cli-guard default stays GitHub - cli-guard is the reusable library shipped for external consumers, GitHub is the right default there.
  • Resolution order is the consumers concern, not cli-guards. cli-guard exposes the hook; the consumer wires whatever order it wants.

Out of scope

  • Forgejo URL parsing in issueRefURLRE. Add when first consumer needs it. coilys consumer can short-circuit by passing owner/repo#N and resolving from the fetchers side.
  • coilys own forgejo-first wiring - separate issue on coilysiren/coily.

Trigger

Agentic-os v0.2.8 cleanup fan-out: 10 of 25 cleanup-issue repos are Forgejo-only and undispatchable until coily can resolve Forgejo refs.

**Problem** `coily dispatch` is locked to GitHub because `fetchIssue` shells out to `gh api` directly. Kais own work routes through Forgejo, so consumers need a way to swap the resolver without forking the whole dispatch package. **Fix** - Add an `IssueFetcher` function type (or interface) to `dispatch.Config`. Signature: `func(ctx context.Context, ref *issueRef) (*ghIssue, error)`. - If unset, fall back to the existing gh-based fetcher. The cli-guard default stays GitHub - cli-guard is the reusable library shipped for external consumers, GitHub is the right default there. - Resolution order is the consumers concern, not cli-guards. cli-guard exposes the hook; the consumer wires whatever order it wants. **Out of scope** - Forgejo URL parsing in `issueRefURLRE`. Add when first consumer needs it. coilys consumer can short-circuit by passing `owner/repo#N` and resolving from the fetchers side. - coilys own forgejo-first wiring - separate issue on coilysiren/coily. **Trigger** Agentic-os v0.2.8 cleanup fan-out: 10 of 25 cleanup-issue repos are Forgejo-only and undispatchable until coily can resolve Forgejo refs.
coilysiren changed title from dispatch: default issue tracker to Forgejo, fall back to GitHub to dispatch: add IssueFetcher config hook (default stays gh) 2026-05-26 03:04:58 +00:00
coilysiren added
P2
and removed
P1
labels 2026-05-31 07:00:14 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/cli-guard#12
No description provided.