Hive Hive
Sign in

fix(oban): run syncers as workers

GitHub issue · Closed

Metadata
Source
tuist/hive #105
Updated
Jul 5, 2026
Domains
Hive
Details

What changed

  • Start Oban unconditionally in the application supervision tree before the endpoint.
  • Convert the GitHub issue syncer, GitHub release drop syncer, and feed drop syncer into Oban workers scheduled by Oban.Plugins.Cron.
  • Add @reboot entries for syncers so they still run after boot, plus one-minute uniqueness guards to avoid duplicate boot and scheduled jobs in the same minute.
  • Route the dashboard’s manual feed sync action through the feed worker instead of Task.start/1.
  • Remove the test-only drop syncer disable flag and the manual Oban startup from test/test_helper.exs.
  • Keep drop classification enqueueing independent from large language model configuration, so deterministic fallback classification still runs.

Why

The production error was not a missing model configuration problem. Feed ingestion can create drops and enqueue classification work even when model-backed agents are dormant, and that path needs Oban to be running.

Root cause

Hive.Drops.RssSyncer ran as a supervised timer process and could call Oban.insert/3 while the default Oban instance was unavailable. There were also other product syncers using their own timers or tasks, so background scheduling was split between Oban and application child processes.

Approach

Oban is now the single owner of product background execution. The syncers expose immediate sync_now entry points for tests and reuse the Oban worker perform/1 callbacks for scheduled work. One-source manual feed syncs enqueue the same worker with a drop_source_id.

Impact

Instances without model-backed agents can ingest feed drops without crashing and without making model calls. Scheduled sync behavior remains boot-time plus every fifteen minutes, but now the jobs are visible, retryable, and deduplicated through Oban.

Validation

  • mix compile --warnings-as-errors passed.
  • mix test passed with 806 tests.
  • Focused tests passed for GitHub issue sync, GitHub release sync, feed sync, drop classification enqueueing, and the manual feed sync dashboard event.
Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments
GA
github-actions[bot] Jul 3, 2026

Blick review didn’t run

The blick review step failed before producing a manifest, so there’s no review to post on this PR. This usually means the agent (opencode) couldn’t start — common causes are an expired or suspended model API key, a missing secret, or the workflow timing out.

See the workflow run for details: https://github.com/tuist/hive/actions/runs/28670508864

Commit: c9d49675837e6187ee164fe3a59cbb7c22195790

GA
github-actions[bot] Jul 3, 2026

Blick review didn’t run

The blick review step failed before producing a manifest, so there’s no review to post on this PR. This usually means the agent (opencode) couldn’t start — common causes are an expired or suspended model API key, a missing secret, or the workflow timing out.

See the workflow run for details: https://github.com/tuist/hive/actions/runs/28670607230

Commit: 97b0d0aa670ae18dde8eba62e4ae07a6df432fe8

GA
github-actions[bot] Jul 3, 2026

Blick review didn’t run

The blick review step failed before producing a manifest, so there’s no review to post on this PR. This usually means the agent (opencode) couldn’t start — common causes are an expired or suspended model API key, a missing secret, or the workflow timing out.

See the workflow run for details: https://github.com/tuist/hive/actions/runs/28670901792

Commit: bca37f654dbce85546cfb9dd74f7c1dcf677b15d

GA
github-actions[bot] Jul 3, 2026

Blick review didn’t run

The blick review step failed before producing a manifest, so there’s no review to post on this PR. This usually means the agent (opencode) couldn’t start — common causes are an expired or suspended model API key, a missing secret, or the workflow timing out.

See the workflow run for details: https://github.com/tuist/hive/actions/runs/28671299293

Commit: bca37f654dbce85546cfb9dd74f7c1dcf677b15d