Skip to content

Recover stranded prediction PRs: worker_prediction + worker_ml producer - #235

Merged
extreme4all merged 2 commits into
developfrom
fix/stranded-prediction-prs
Oct 8, 2026
Merged

extreme4all merged 2 commits into
developfrom
fix/stranded-prediction-prs

Conversation

@extreme4all

Copy link
Copy Markdown
Contributor

Closes #228 (finally)

What happened

#231 and #230 were stacked PRs targeting ml/predictions-topic-struct. That base branch still existed after #229 merged, so GitHub never retargeted them to develop — and both were merged into the side branch (dbd0c2c, 2364f4c), never into develop.

Result: develop got the topic (#229), firehose exposure (#232) and the CI workflow (#234) — but none of the actual worker code. The dispatched worker_prediction run failed with cd: can't cd to projects/worker_prediction.

This PR

Cherry-picks the two stranded commits onto develop, unchanged:

Verification

  • uv lock --locked in projects/worker_prediction passes (the exact failing CI step)
  • 36 tests passed (worker_prediction, worker_ml, database); ruff + mypy clean

extreme4all added 2 commits October 9, 2026 01:00
New base + project that consumes predictions.to_insert and inserts
into the prediction and prediction_latest tables via WorkerRunner
(modeled on worker_report) (#228).

- PredictionRepo/PredictionLatestRepo insert signatures widened to
  Sequence (covariant, type-level only)
- project scaffolding: pyproject.toml, Dockerfile, uv.lock (mirrors
  worker_report)
Replaces the inline database insert with a produce to the new
predictions.to_insert topic, decoupling the predictor from the db
(#228).

- worker_ml loses its database dependency (asyncmy, cryptography,
  sqlalchemy removed from the project)
- on publish failure the source batch is requeued, offsets commit
  only after the produce succeeds
- metrics: worker_ml_predictions_inserted -> worker_ml_predictions_published
@extreme4all
extreme4all merged commit 328be2f into develop Oct 8, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decouple ML predictor from database: publish predictions to Kafka

1 participant