refactor(daemon): PR review scanning and reactions are their own type (#1933)

This commit is contained in:
sam committed 2026-11-13 04:13:36 +11:00
1 parent 0d13b919da
commit 0a770ed171
6 files changed
+94 -68

No files matched your search

+1 -1
View File
@@ -615,7 +615,6 @@ func (b *boot) buildDaemon(ctx context.Context) {
Storage: b.storeBackend, Storage: b.storeBackend,
Log: log, Log: log,
Tasks: b.natsClient, Tasks: b.natsClient,
Reactions: b.reactionClient,
RunCredentials: b.stateStoreGrants, RunCredentials: b.stateStoreGrants,
ContainerPool: b.containerPool, ContainerPool: b.containerPool,
ModelEgress: b.modelEgress, ModelEgress: b.modelEgress,
@@ -631,6 +630,7 @@ func (b *boot) buildDaemon(ctx context.Context) {
b.d.IssuePoller = daemon.NewIssuePoller(b.cfgHolder, b.stateStore, log, b.issueSources, b.taskActions().Withdraw, b.d.PublishTask, b.d) b.d.IssuePoller = daemon.NewIssuePoller(b.cfgHolder, b.stateStore, log, b.issueSources, b.taskActions().Withdraw, b.d.PublishTask, b.d)
b.d.Access = b.accessChain b.d.Access = b.accessChain
b.d.ReviewScanner = daemon.NewReviewScanner(b.stateStore, b.reactionClient, b.natsClient.PublishUnique, b.bus, b.d, b.d, b.d, log)
} }
func (b *boot) publishConfig(ctx context.Context, cfg config.Config) { func (b *boot) publishConfig(ctx context.Context, cfg config.Config) {
+2 -2
View File
@@ -30,8 +30,8 @@ func (d *Daemon) BuiltinJobs() []BuiltinJob {
return []BuiltinJob{ return []BuiltinJob{
{ID: "volume-cleanup", Name: "Remove expired volumes", DefaultInterval: time.Hour, Run: d.cleanupExpiredStorage}, {ID: "volume-cleanup", Name: "Remove expired volumes", DefaultInterval: time.Hour, Run: d.cleanupExpiredStorage},
{ID: "issue-discovery", Name: "Discover forge issues", DefaultInterval: time.Minute, Run: d.IssuePoller.poll}, {ID: "issue-discovery", Name: "Discover forge issues", DefaultInterval: time.Minute, Run: d.IssuePoller.poll},
{ID: "pr-reconcile", Name: "Reconcile pull requests", DefaultInterval: time.Minute, Run: d.reconcilePRs}, {ID: "pr-reconcile", Name: "Reconcile pull requests", DefaultInterval: time.Minute, Run: d.ReviewScanner.reconcilePRs},
{ID: "pr-review-scan", Name: "Scan pull request reviews", DefaultInterval: time.Minute, Run: d.scanPRReviews}, {ID: "pr-review-scan", Name: "Scan pull request reviews", DefaultInterval: time.Minute, Run: d.ReviewScanner.scanPRReviews},
{ID: "mirror-prune", Name: "Prune repository mirrors", DefaultInterval: 24 * time.Hour, Run: d.pruneMirrors}, {ID: "mirror-prune", Name: "Prune repository mirrors", DefaultInterval: 24 * time.Hour, Run: d.pruneMirrors},
} }
} }
+3 -9
View File
@@ -114,16 +114,10 @@ type Daemon struct {
Log *slog.Logger Log *slog.Logger
// Tasks is the NATS task bus. // Tasks is the NATS task bus.
Tasks TaskBus Tasks TaskBus
// reactionConsumer is built by Startup and kept for its lifetime drop // ReviewScanner reconciles PRs, scans their reviews and drains review
// counter. // reactions into remediate runs.
reactionConsumer *reactionConsumer ReviewScanner *ReviewScanner
// reactionPublisher delivers review reactions. Startup sets it to
// PublishReaction; tests swap it to deliver without the bus.
reactionPublisher ReactionPublisher
// Reactions is the review-reaction stream, drained into remediate runs each
// cycle.
Reactions ReactionSource
// RunCredentials issues each task's run credential (see runCredential). // RunCredentials issues each task's run credential (see runCredential).
// Required whenever ConnectedStateStore.URL is set: the task is parked // Required whenever ConnectedStateStore.URL is set: the task is parked
// rather than handed the daemon's own administrative token. // rather than handed the daemon's own administrative token.
+1 -10
View File
@@ -13,7 +13,6 @@ import (
// Startup runs crash recovery and access verification once. // Startup runs crash recovery and access verification once.
func (d *Daemon) Startup(ctx context.Context) error { func (d *Daemon) Startup(ctx context.Context) error {
d.wireReactions()
if err := d.cleanupExpiredStorage(ctx); err != nil { if err := d.cleanupExpiredStorage(ctx); err != nil {
d.Log.WarnContext(ctx, "startup volume cleanup failed", "err", err) d.Log.WarnContext(ctx, "startup volume cleanup failed", "err", err)
} }
@@ -29,14 +28,6 @@ func (d *Daemon) Startup(ctx context.Context) error {
return nil return nil
} }
// wireReactions builds the review-reaction consumer and publisher. Startup
// calls it before the run loop and the scheduler start, so nothing builds them
// concurrently.
func (d *Daemon) wireReactions() {
d.reactionConsumer = newReactionConsumer(d.Store, d.Store, d.Store, d.botUserForTask, d.Log)
d.reactionPublisher = d.PublishReaction
}
// sweepAccess accepts pending invitations and verifies push access through // sweepAccess accepts pending invitations and verifies push access through
// every organisation connection, each in its own goroutine. // every organisation connection, each in its own goroutine.
func (d *Daemon) sweepAccess(ctx context.Context) { func (d *Daemon) sweepAccess(ctx context.Context) {
@@ -149,7 +140,7 @@ func (d *Daemon) RunOnce(ctx context.Context) {
// (drainLoop in Run, once in RunOnce) so they start within about a second. // (drainLoop in Run, once in RunOnce) so they start within about a second.
func (d *Daemon) Cycle(ctx context.Context) { func (d *Daemon) Cycle(ctx context.Context) {
d.markPass("cycle") d.markPass("cycle")
d.drainReactions(ctx) d.ReviewScanner.drainReactions(ctx)
d.retryTransientParks(ctx) d.retryTransientParks(ctx)
} }
+86 -42
View File
@@ -7,6 +7,7 @@ import (
"github.com/samcharles93/archie-core/internal/config" "github.com/samcharles93/archie-core/internal/config"
"github.com/samcharles93/archie-core/internal/domain/identity" "github.com/samcharles93/archie-core/internal/domain/identity"
"github.com/samcharles93/archie-core/internal/domain/storecontract"
"github.com/samcharles93/archie-core/internal/domain/workflow" "github.com/samcharles93/archie-core/internal/domain/workflow"
workflowtask "github.com/samcharles93/archie-core/internal/domain/workflow/task" workflowtask "github.com/samcharles93/archie-core/internal/domain/workflow/task"
"github.com/samcharles93/archie-core/internal/domain/workintake" "github.com/samcharles93/archie-core/internal/domain/workintake"
@@ -20,6 +21,12 @@ import (
// on the envelope's source-independent key. // on the envelope's source-independent key.
type ReactionPublisher func(ctx context.Context, reaction workintake.ReviewCommentEnvelope) error type ReactionPublisher func(ctx context.Context, reaction workintake.ReviewCommentEnvelope) error
// botUserSource names the bot login that owns a task, so the reaction consumer
// can drop Archie's own comments.
type botUserSource interface {
botUserForTask(task *workflowtask.Task) string
}
// writerGate decides which review activity on one PR may reach agents: never // writerGate decides which review activity on one PR may reach agents: never
// the bot's own, and only from users with write access, which the forge is // the bot's own, and only from users with write access, which the forge is
// asked once per user for the lifetime of one scan. // asked once per user for the lifetime of one scan.
@@ -122,26 +129,64 @@ func scanPRReviewReactions(
return newReviewCursor, newCommentCursor, nil return newReviewCursor, newCommentCursor, nil
} }
// ReviewScanner runs the pull request maintenance: it reconciles open PRs with
// forge state, scans their reviews into the reaction stream, and drains that
// stream into remediate runs.
type ReviewScanner struct {
store storecontract.TaskStore
reactions ReactionSource
publishTask func(ctx context.Context, subject, idempotencyKey string, payload []byte) error
bus *events.Bus
repos repoHub
orgs orgResolver
bots botUserSource
log *slog.Logger
consumer *reactionConsumer
publish ReactionPublisher
}
// NewReviewScanner wires the scanner to its dependencies. The reaction consumer
// and publisher are built here, so the consumer's drop counter spans the
// process lifetime.
func NewReviewScanner(
store storecontract.TaskStore,
reactions ReactionSource,
publishTask func(ctx context.Context, subject, idempotencyKey string, payload []byte) error,
bus *events.Bus,
repos repoHub,
orgs orgResolver,
bots botUserSource,
log *slog.Logger,
) *ReviewScanner {
s := &ReviewScanner{
store: store, reactions: reactions, publishTask: publishTask, bus: bus,
repos: repos, orgs: orgs, bots: bots, log: log,
}
s.consumer = newReactionConsumer(store, store, store, bots.botUserForTask, log)
s.publish = s.PublishReaction
return s
}
// scanPRReviews scans every open PR task for review activity with its // scanPRReviews scans every open PR task for review activity with its
// identity's forge. Forges without review reading are skipped. // identity's forge. Forges without review reading are skipped.
func (d *Daemon) scanPRReviews(ctx context.Context) error { func (s *ReviewScanner) scanPRReviews(ctx context.Context) error {
tasks, err := d.Store.OpenPRs(ctx) tasks, err := s.store.OpenPRs(ctx)
if err != nil { if err != nil {
return fmt.Errorf("review scan query: %w", err) return fmt.Errorf("review scan query: %w", err)
} }
var failed []string var failed []string
for i := range tasks { for i := range tasks {
t := &tasks[i] t := &tasks[i]
reader, ok := d.forgeFor(ctx, t).(forge.PullRequestReviewReader) reader, ok := s.repos.forgeFor(ctx, t).(forge.PullRequestReviewReader)
if !ok { if !ok {
continue // the noop forge and any forge without the capability continue // the noop forge and any forge without the capability
} }
checker, ok := d.forgeFor(ctx, t).(forge.WriteAccessChecker) checker, ok := s.repos.forgeFor(ctx, t).(forge.WriteAccessChecker)
if !ok { if !ok {
d.Log.WarnContext(ctx, "review scan skipped: forge cannot verify write access", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber) s.log.WarnContext(ctx, "review scan skipped: forge cannot verify write access", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber)
continue continue
} }
if !d.scanOnePR(ctx, reader, checker, t) { if !s.scanOnePR(ctx, reader, checker, t) {
failed = append(failed, fmt.Sprintf("%s/%s#%d", t.Owner, t.Repo, t.PRNumber)) failed = append(failed, fmt.Sprintf("%s/%s#%d", t.Owner, t.Repo, t.PRNumber))
} }
} }
@@ -149,12 +194,12 @@ func (d *Daemon) scanPRReviews(ctx context.Context) error {
} }
// scanOnePR reports false when the scan failed; the cause is logged here. // scanOnePR reports false when the scan failed; the cause is logged here.
func (d *Daemon) scanOnePR(ctx context.Context, reader forge.PullRequestReviewReader, checker forge.WriteAccessChecker, t *workflowtask.Task) bool { func (s *ReviewScanner) scanOnePR(ctx context.Context, reader forge.PullRequestReviewReader, checker forge.WriteAccessChecker, t *workflowtask.Task) bool {
// Resolve the org; on failure skip this task for now. // Resolve the org; on failure skip this task for now.
if t.Org == "" { if t.Org == "" {
resolved, err := d.identityOrg(ctx, identity.IdentityID(t.Identity)) resolved, err := s.orgs.identityOrg(ctx, identity.IdentityID(t.Identity))
if err != nil { if err != nil {
d.Log.WarnContext(ctx, "review scan org resolve failed", "task", t.ID, "err", err) s.log.WarnContext(ctx, "review scan org resolve failed", "task", t.ID, "err", err)
return false return false
} }
t.Org = resolved t.Org = resolved
@@ -163,20 +208,20 @@ func (d *Daemon) scanOnePR(ctx context.Context, reader forge.PullRequestReviewRe
// unchanged: the next scan re-fetches, and PublishUnique's dedup covers // unchanged: the next scan re-fetches, and PublishUnique's dedup covers
// anything the previous scan already published. // anything the previous scan already published.
reviewCursor, commentCursor, err := scanPRReviewReactions( reviewCursor, commentCursor, err := scanPRReviewReactions(
ctx, d.Log, reader, checker, t, d.botUserForTask(t), ctx, s.log, reader, checker, t, s.bots.botUserForTask(t),
t.ReviewCursor, t.WatchCommentID, d.reactionPublisher) t.ReviewCursor, t.WatchCommentID, s.publish)
if err != nil { if err != nil {
d.Log.WarnContext(ctx, "review scan failed", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber, "err", err) s.log.WarnContext(ctx, "review scan failed", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber, "err", err)
return false return false
} }
if reviewCursor == t.ReviewCursor && commentCursor == t.WatchCommentID { if reviewCursor == t.ReviewCursor && commentCursor == t.WatchCommentID {
return true return true
} }
if err := d.Store.SetReviewCursors(ctx, t.ID, reviewCursor, commentCursor); err != nil { if err := s.store.SetReviewCursors(ctx, t.ID, reviewCursor, commentCursor); err != nil {
// A stale guard here means the task was claimed between the scan and // A stale guard here means the task was claimed between the scan and
// the write; the next scan re-reads and re-lists from the old cursor, // the write; the next scan re-reads and re-lists from the old cursor,
// and PublishUnique plus the consumer's dedup absorb the repeats. // and PublishUnique plus the consumer's dedup absorb the repeats.
d.Log.WarnContext(ctx, "review cursor persist failed", "task", t.ID, "err", err) s.log.WarnContext(ctx, "review cursor persist failed", "task", t.ID, "err", err)
return false return false
} }
return true return true
@@ -184,19 +229,18 @@ func (d *Daemon) scanOnePR(ctx context.Context, reader forge.PullRequestReviewRe
// drainReactions turns available review reactions into queued remediate // drainReactions turns available review reactions into queued remediate
// runs. It runs before the task drain so a reaction queued in this pass can // runs. It runs before the task drain so a reaction queued in this pass can
// be claimed by it. The consumer is built by Startup, so its drop counter // be claimed by it.
// spans the process lifetime. func (s *ReviewScanner) drainReactions(ctx context.Context) {
func (d *Daemon) drainReactions(ctx context.Context) { if _, err := s.consumer.drain(ctx, s.reactions, maxReactionsPerCycle); err != nil {
if _, err := d.reactionConsumer.drain(ctx, d.Reactions, maxReactionsPerCycle); err != nil { s.log.ErrorContext(ctx, "reaction drain failed", "err", err)
d.Log.ErrorContext(ctx, "reaction drain failed", "err", err)
} }
} }
// PublishReaction stamps the org on a review reaction, defaulting to the // PublishReaction stamps the org on a review reaction, defaulting to the
// root identity's, and publishes it. // root identity's, and publishes it.
func (d *Daemon) PublishReaction(ctx context.Context, reaction workintake.ReviewCommentEnvelope) error { func (s *ReviewScanner) PublishReaction(ctx context.Context, reaction workintake.ReviewCommentEnvelope) error {
if reaction.Org == "" { if reaction.Org == "" {
resolved, err := d.identityOrg(ctx, identity.SystemID) resolved, err := s.orgs.identityOrg(ctx, identity.SystemID)
if err != nil { if err != nil {
return fmt.Errorf("publish reaction %s: resolve org: %w", reaction.Ref(), err) return fmt.Errorf("publish reaction %s: resolve org: %w", reaction.Ref(), err)
} }
@@ -206,65 +250,65 @@ func (d *Daemon) PublishReaction(ctx context.Context, reaction workintake.Review
if err != nil { if err != nil {
return err return err
} }
return d.Tasks.PublishUnique(ctx, reaction.Subject(), reaction.IdempotencyKey(), payload) return s.publishTask(ctx, reaction.Subject(), reaction.IdempotencyKey(), payload)
} }
// reconcilePRs moves pr_open tasks to merged/rejected from GitHub state // reconcilePRs moves pr_open tasks to merged/rejected from GitHub state
// and cleans up their worktrees. // and cleans up their worktrees.
func (d *Daemon) reconcilePRs(ctx context.Context) error { func (s *ReviewScanner) reconcilePRs(ctx context.Context) error {
tasks, err := d.Store.OpenPRs(ctx) tasks, err := s.store.OpenPRs(ctx)
if err != nil { if err != nil {
return fmt.Errorf("reconcile query: %w", err) return fmt.Errorf("reconcile query: %w", err)
} }
var failed []string var failed []string
for _, t := range tasks { for _, t := range tasks {
fg := d.forgeFor(ctx, &t) fg := s.repos.forgeFor(ctx, &t)
if _, unavailable := fg.(*forge.NoopForge); unavailable { if _, unavailable := fg.(*forge.NoopForge); unavailable {
continue continue
} }
trees := d.treesFor(&t) trees := s.repos.treesFor(&t)
// PRState/PR reconciliation is valid regardless of Source -- a // PRState/PR reconciliation is valid regardless of Source -- a
// chat-sourced task can still open a real PR against a real // chat-sourced task can still open a real PR against a real
// branch. Only the issue-label call (tied to the synthetic // branch. Only the issue-label call (tied to the synthetic
// issue number) is forge-only. // issue number) is forge-only.
state, err := fg.PRState(ctx, t.Owner, t.Repo, t.PRNumber) state, err := fg.PRState(ctx, t.Owner, t.Repo, t.PRNumber)
if err != nil { if err != nil {
d.Log.WarnContext(ctx, "PR state check failed", "pr", t.PRNumber, "err", err) s.log.WarnContext(ctx, "PR state check failed", "pr", t.PRNumber, "err", err)
failed = append(failed, fmt.Sprintf("%s/%s#%d", t.Owner, t.Repo, t.PRNumber)) failed = append(failed, fmt.Sprintf("%s/%s#%d", t.Owner, t.Repo, t.PRNumber))
continue continue
} }
attempt := t.Attempt attempt := t.Attempt
switch state { switch state {
case "merged": case "merged":
if err := d.Store.Transition(ctx, t.ID, workflow.StatusPROpen, workflow.StatusMerged, ""); err != nil { if err := s.store.Transition(ctx, t.ID, workflow.StatusPROpen, workflow.StatusMerged, ""); err != nil {
d.Log.ErrorContext(ctx, "PR merged but task transition failed", "task", t.ID, "pr", t.PRNumber, "err", err) s.log.ErrorContext(ctx, "PR merged but task transition failed", "task", t.ID, "pr", t.PRNumber, "err", err)
failed = append(failed, fmt.Sprintf("%s/%s#%d", t.Owner, t.Repo, t.PRNumber)) failed = append(failed, fmt.Sprintf("%s/%s#%d", t.Owner, t.Repo, t.PRNumber))
continue continue
} }
if err := trees.Cleanup(t.Owner, t.Repo, t.IssueNumber); err != nil { if err := trees.Cleanup(t.Owner, t.Repo, t.IssueNumber); err != nil {
d.Log.WarnContext(ctx, "worktree cleanup failed", "task", t.ID, "err", err) s.log.WarnContext(ctx, "worktree cleanup failed", "task", t.ID, "err", err)
} }
// Close the issue explicitly; nothing else does. // Close the issue explicitly; nothing else does.
d.closeResolvedIssue(ctx, &t, fmt.Sprintf( s.closeResolvedIssue(ctx, &t, fmt.Sprintf(
"Closed by #%d, merged by archie.", t.PRNumber, "Closed by #%d, merged by archie.", t.PRNumber,
)) ))
d.Log.InfoContext(ctx, "PR merged", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber) s.log.InfoContext(ctx, "PR merged", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber)
d.emit(ctx, events.Event{ s.bus.Publish(ctx, events.Event{
Kind: events.KindPRMerged, TaskID: t.ID, Attempt: attempt, Kind: events.KindPRMerged, TaskID: t.ID, Attempt: attempt,
Repo: t.Owner + "/" + t.Repo, Issue: t.IssueNumber, Repo: t.Owner + "/" + t.Repo, Issue: t.IssueNumber,
Data: map[string]any{"pr": t.PRNumber}, Data: map[string]any{"pr": t.PRNumber},
}) })
case "closed": case "closed":
if err := d.Store.Transition(ctx, t.ID, workflow.StatusPROpen, workflow.StatusRejected, "PR closed without merge"); err != nil { if err := s.store.Transition(ctx, t.ID, workflow.StatusPROpen, workflow.StatusRejected, "PR closed without merge"); err != nil {
d.Log.ErrorContext(ctx, "PR rejected but task transition failed", "task", t.ID, "pr", t.PRNumber, "err", err) s.log.ErrorContext(ctx, "PR rejected but task transition failed", "task", t.ID, "pr", t.PRNumber, "err", err)
failed = append(failed, fmt.Sprintf("%s/%s#%d", t.Owner, t.Repo, t.PRNumber)) failed = append(failed, fmt.Sprintf("%s/%s#%d", t.Owner, t.Repo, t.PRNumber))
continue continue
} }
if err := trees.Cleanup(t.Owner, t.Repo, t.IssueNumber); err != nil { if err := trees.Cleanup(t.Owner, t.Repo, t.IssueNumber); err != nil {
d.Log.WarnContext(ctx, "worktree cleanup failed", "task", t.ID, "err", err) s.log.WarnContext(ctx, "worktree cleanup failed", "task", t.ID, "err", err)
} }
d.Log.InfoContext(ctx, "PR rejected", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber) s.log.InfoContext(ctx, "PR rejected", "repo", t.Owner+"/"+t.Repo, "pr", t.PRNumber)
d.emit(ctx, events.Event{ s.bus.Publish(ctx, events.Event{
Kind: events.KindPRRejected, TaskID: t.ID, Attempt: attempt, Kind: events.KindPRRejected, TaskID: t.ID, Attempt: attempt,
Repo: t.Owner + "/" + t.Repo, Issue: t.IssueNumber, Repo: t.Owner + "/" + t.Repo, Issue: t.IssueNumber,
Data: map[string]any{"pr": t.PRNumber}, Data: map[string]any{"pr": t.PRNumber},
@@ -276,17 +320,17 @@ func (d *Daemon) reconcilePRs(ctx context.Context) error {
// closeResolvedIssue closes a finished task's forge issue, skipping chat // closeResolvedIssue closes a finished task's forge issue, skipping chat
// tasks. Failures are logged. // tasks. Failures are logged.
func (d *Daemon) closeResolvedIssue(ctx context.Context, task *workflow.Task, comment string) { func (s *ReviewScanner) closeResolvedIssue(ctx context.Context, task *workflow.Task, comment string) {
if !task.IsForgeBacked() { if !task.IsForgeBacked() {
return return
} }
resolved, err := d.Repository(ctx, task, config.OperationPR) resolved, err := s.repos.Repository(ctx, task, config.OperationPR)
if err != nil { if err != nil {
d.Log.WarnContext(ctx, "issue closure not permitted", "task", task.ID) s.log.WarnContext(ctx, "issue closure not permitted", "task", task.ID)
return return
} }
if err := resolved.Forge.CloseIssue(ctx, task.Owner, task.Repo, task.IssueNumber, comment); err != nil { if err := resolved.Forge.CloseIssue(ctx, task.Owner, task.Repo, task.IssueNumber, comment); err != nil {
d.Log.WarnContext(ctx, "closing resolved issue failed; it stays open and will be re-polled", s.log.WarnContext(ctx, "closing resolved issue failed; it stays open and will be re-polled",
"repo", task.Owner+"/"+task.Repo, "issue", task.IssueNumber, "err", err) "repo", task.Owner+"/"+task.Repo, "issue", task.IssueNumber, "err", err)
} }
} }
+1 -4
View File
@@ -29,9 +29,6 @@ func wired(d *Daemon) *Daemon {
if d.Store == nil { if d.Store == nil {
d.Store = neutralStore{} d.Store = neutralStore{}
} }
if d.Reactions == nil {
d.Reactions = neutralReactions{}
}
if d.Bus == nil { if d.Bus == nil {
d.Bus = events.NewBus() d.Bus = events.NewBus()
} }
@@ -89,7 +86,7 @@ func wired(d *Daemon) *Daemon {
func(context.Context) []IssueSource { return nil }, func(context.Context) []IssueSource { return nil },
func(context.Context, int64, string) error { return nil }, func(context.Context, int64, string) error { return nil },
d.PublishTask, d) d.PublishTask, d)
d.wireReactions() d.ReviewScanner = NewReviewScanner(d.Store, neutralReactions{}, d.Tasks.PublishUnique, d.Bus, d, d, d, d.Log)
return d return d
} }