Skip to content

fix(celery-worker): add OLLAMA_BASE_URL + OMNIBIOAI_MYSQL_PASSWORD, matching workbench - #74

Merged
man4ish merged 1 commit into
mainfrom
fix/celery-worker-ollama-mysql-env-parity
Sep 1, 2026
Merged

fix(celery-worker): add OLLAMA_BASE_URL + OMNIBIOAI_MYSQL_PASSWORD, matching workbench#74
man4ish merged 1 commit into
mainfrom
fix/celery-worker-ollama-mysql-env-parity

Conversation

@man4ish

@man4ish man4ish commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Companion to the bio_agent post-#518 live audit finding. celery-worker runs the exact same image as workbench but was missing 2 env vars workbench already has, breaking BioQueryAI's and Workflow Planner's real Celery-executed steps. Full detail in the commit message.

Verified: sha256 match on all relevant source (7 files) between celery-worker and workbench/local. Real E2E confirms the fix itself works — Workflow Planner's MySQL scan genuinely succeeds now (real 301s plan generation, no MySQL error); BioQueryAI's Ollama call genuinely connects (real 200 OK, no connection error).

Not fixed here, filed as follow-ups (2 new, separate, real bugs this fix's own E2E testing surfaced):

  1. /app/work/planner and /app/work/bioqueryai aren't shared volumes between workbench and celery-worker — a genuinely-completed task's status file is invisible to the polling endpoint, which lives in a different container. Confirmed live via a real completed Workflow Planner run stuck at PENDING forever from the caller's side.
  2. BioQueryAI's celery worker process SIGSEGV'd right after a successful LLM response, losing the result (WorkerLostError). Circumstantial cause: 2 huge models loaded concurrently + host swap fully exhausted at crash time — not confirmed, dmesg inaccessible in this environment.

🤖 Generated with Claude Code

…atching workbench

Live audit finding (2026-08-31, plugins/bio_agent post-#518 scan):
celery-worker runs the exact same omnibioai-workbench image as
`workbench` (only 2 services in this compose file build from that
image, confirmed by grepping every `context:` line), but was missing
two env vars workbench already has.

- Without OLLAMA_BASE_URL, LLMService fell back to the ollama client's
  own default (127.0.0.1:11434) -- nothing inside this container --
  so every real BioQueryAI analysis Celery task failed immediately
  with "Failed to connect to Ollama" as soon as it reached the LLM
  step.
- Without OMNIBIOAI_MYSQL_PASSWORD, Workflow Planner's MySQL
  workflow-candidate scan (_resolve_mysql_config in
  workflow_planner_service.py) failed with "MySQL password missing".
  Traced the real fallback chain before adding this (not just the two
  var names the error message named): host/port/user/db all already
  resolve correctly via this block's existing DB_HOST and hardcoded
  defaults -- only password had no working fallback.

Verified post-fix: sha256 of all 7 relevant source files (views.py,
5 bio_agent handlers, workflow_planner_service.py) match exactly
between celery-worker and the already-verified workbench/local source.
Real end-to-end BioQueryAI + Workflow Planner submissions confirm the
fix itself works -- Workflow Planner's MySQL scan genuinely succeeds
and produces a real multi-block plan (301s, no MySQL error); BioQueryAI's
Ollama call genuinely connects and returns a real 200 (no connection
error).

Two NEW, separate, real bugs surfaced by getting past this blocker
(not fixed here, filed as follow-ups):
1. Neither `workbench` nor `celery-worker` mounts /app/work/planner or
   /app/work/bioqueryai as a shared volume (unlike /app/work/runs,
   /app/work/objects, etc., which are). Both status-polling endpoints
   (planner_ask_status, bioquery_ask_status) read from that path in
   workbench's own container, but the Celery task that writes the
   completion status file runs in celery-worker's container -- so a
   genuinely-completed task's result is written somewhere the poller
   can never see it. Confirmed live: Workflow Planner's task succeeded
   in celery-worker's log with a full real plan, but polling from
   workbench showed PENDING forever.
2. BioQueryAI's Celery worker process SIGSEGV'd immediately after a
   successful Ollama response, losing the task result via
   WorkerLostError. Circumstantial cause: two large models
   (deepseek-r1:32b ~55GB + llama3.1:70b) loaded concurrently, host
   swap at 15Gi/15Gi (100%) at crash time. Root cause not confirmed --
   dmesg is permission-denied in this environment, so OOM-kill
   correlation could not be directly verified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VxRzmWKquRKGwebL21d6wH
@man4ish

man4ish commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up issues filed for the two new bugs this fix's E2E testing surfaced (both in omnibioai-workbench, deliberately not fixed tonight):

  • #529: Workflow Planner + BioQueryAI never report completion (shared-volume gap)
  • #530: BioQueryAI Celery worker SIGSEGV under concurrent large-model load (root cause unconfirmed)

@man4ish
man4ish merged commit 1c9e43c into main Sep 1, 2026
6 of 7 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.

1 participant