Skip to main content

Rumor digest

The rumor digest reads new raw_signals rows, asks an LLM for one verdict per player, and stores them in rumor_signals. It is advisory only. It never touches ESPN and runs no browser.

What starts it?​

The rumor-digest-bot launcher job runs node src/bots/rumor_digest_bot.js daily at 11:00 America/Chicago. Its rumor.signal_created events start core's rumor-action-trigger, which keeps a 21:45 schedule as a fallback. It needs the database and LLM keys but no ESPN cookies.

What does it read and write?​

DirectionTableDetail
Readraw_signalsRows with id above the watermark and a matched player_id. The id is core's internal (Sleeper) id, not ESPN's.
Writerumor_signalsplayer_id, sentiment, confidence, suggested_action, source_raw_signal_ids, max_raw_signal_id.

The watermark is the highest max_raw_signal_id already stored. Every verdict in a run, including no_op, carries that run's maximum id, so the watermark advances without a separate state table.

What does the LLM return?​

One object per distinct player, in strict JSON.

FieldAllowed values
sentimentpositive, negative, neutral
confidenceA number from 0 to 1
suggested_actionboost_waiver_priority, bench_watch, no_op

The parser drops an entry with an unknown player, a duplicate player, or an invalid field, and logs a warning. It throws only when the response isn't a JSON array.

How are large batches handled?​

SettingDefaultPurpose
RUMOR_DIGEST_CHUNK_SIZE20 playersLargest chunk per LLM call.
RUMOR_DIGEST_TOKEN_BUDGET6 000 tokensEstimated prompt size per chunk (about 4 characters per token).
RUMOR_DIGEST_CHUNK_DELAY_MS60 000Pause between chunks to stay under per-minute provider limits.

All of a player's rows stay in one chunk.

What does it emit?​

Once the transaction commits, the digest publishes one rumor.signal_created event per stored signal to core's job_events exchange, no_op verdicts included. The subject is player:<player_id> and the payload is {"signal_id": <rumor_signals.id>}. A launcher job can subscribe to it through the catalog's on_event. The run summary records events_emitted.

Publishing is best-effort. After the first event the broker doesn't take, the digest stops emitting and logs a warning, so a down broker costs one ten-second attempt rather than one per signal. The failure never fails the run. A subscribed job should keep its schedule for signals whose event wasn't sent.

What can go wrong?​

FailureResult
No new rowsLogs and exits without an LLM call.
Any chunk failsThe whole run fails and nothing is stored. The watermark doesn't move, so the next run retries.
Database write failsThe error propagates. The transaction rolls back, and nothing is emitted.
Broker unavailableEvents are skipped with a warning after one attempt. The signals are still stored.