Skip to content

Web app missing background jobs: research, signals, recommendations, heartbeat #76

Description

@contractorr

Problem

The web app calls `scheduler.start()` on startup, which only registers:

  • `intel_gather` (scraping)
  • `entity_extraction`
  • Extended jobs (company movements, hiring, regulatory — if enabled)

The CLI daemon's `start_with_research()` additionally registers:

  • `deep_research` (weekly)
  • `weekly_recommendations` (weekly)
  • `signal_detection` (daily)
  • `autonomous_actions` (daily)
  • `heartbeat` / `goal_intel_matching`
  • `trending_radar`

Web-only users get none of these. The insight store is empty, recommendations aren't auto-generated, signals aren't detected, goal-intel matching doesn't run. This significantly degrades the web experience compared to CLI+daemon users.

Root Cause

`src/web/app.py` calls `scheduler.start(cron_expr=cron)` — the simple path. `start_with_research()` requires an `AdvisorEngine` instance and config, which the web app doesn't construct at scheduler init time.

Proposed Fix

  1. Add a `start_web()` method to `IntelScheduler` that registers the full job set but constructs engines lazily (on first job execution, using the shared/default API key)
  2. Or: make `start_with_research()` accept a factory callable instead of a pre-built engine
  3. Gate research/recommendation jobs behind having a valid API key (shared key users may need different limits)

Scope

  • `src/intelligence/scheduler.py` — new entry point or refactor
  • `src/web/app.py` — call the full scheduler path
  • Config: respect `agent.enabled`, `agent.autonomous.*` settings

Notes

  • This is a gap in existing functionality, not a new feature
  • May need rate limiting for shared-key users (research + recommendations both call LLMs)
  • Signal detection and goal-intel matching are lightweight (mostly DB queries + optional LLM scoring)

Acceptance Criteria

  • Web app runs signal detection, goal-intel matching, trending radar on schedule
  • Weekly recommendations and research run if user has own API key
  • Insight store populated for web-only users
  • No regression for CLI daemon users

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions