Skip to content

fix(cleanup): purge dead endpoints and add skip markers - #805

Merged
jonahgabriel merged 2 commits into
mainfrom
jonahgabriel/omn-4829-dead-endpoint-purge-infra
Mar 13, 2026
Merged

jonahgabriel merged 2 commits into
mainfrom
jonahgabriel/omn-4829-dead-endpoint-purge-infra

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Mar 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • OMN-4839 (T2-D): Skip Ollama tests when OLLAMA_BASE_URL unset (decommissioned)
  • OMN-4840 (T2-E): Make LLM embedding URL env-var-driven, fix qwen-72b → qwen-embedding alias
  • OMN-4841 (T2-F): Fix redeploy/preflight test hardcoded port 29092 → env-var with 19092 default
  • OMN-4842 (T2-G): Fix e2e compose KAFKA_PORT default 29092 → 19092
  • OMN-4843 (T2-H): Remove stale 192.168.86.200 historical comment
  • OMN-4844 (T2-I): Skip LLM_VISION_URL perf tests when endpoint unavailable

Test Plan

  • grep -rn "29092" tests/redeploy/ docker/docker-compose.e2e.yml returns zero (except Redpanda advertise-addr which is expected)
  • grep -n "qwen-72b" src/ returns zero
  • pre-commit run --all-files passes

Part of Epic: OMN-4829 (Ollama / Dead-Endpoint Purge)

Summary by CodeRabbit

  • New Features

    • Added LLM endpoint health monitoring to enable proactive system health tracking
  • Improvements

    • LLM endpoint configuration now supports environment variables for flexible deployment scenarios
  • Chores

    • Updated infrastructure configuration and test setup for improved deployment handling

@jonahgabriel
jonahgabriel enabled auto-merge March 13, 2026 00:57
@coderabbitai

coderabbitai Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

These changes update Kafka port mapping from 29092 to 19092, centralize the LLM endpoint health topic constant, refactor LLM endpoint configuration to be environment-driven, skip vision SLO tests conditionally, and remove outdated comments. Most changes involve infrastructure configuration and code organization.

Changes

Cohort / File(s) Summary
Kafka Bootstrap Port Updates
docker/docker-compose.e2e.yml, tests/redeploy/test_pipeline_smoke.sh, tests/redeploy/test_preflight.sh
Changed Kafka external listener host port mapping and bootstrap server defaults from 29092 to 19092 across Docker and shell test scripts.
LLM Endpoint Health Topic Centralization
src/omnibase_infra/event_bus/topic_constants.py, src/omnibase_infra/services/service_llm_endpoint_health.py
Moved TOPIC_LLM_ENDPOINT_HEALTH constant from service module to centralized topic constants module; updated imports and added to wiring health monitoring group.
LLM Endpoint Configuration
src/omnibase_infra/services/service_llm_endpoint_health.py
Changed endpoint configuration from hardcoded "qwen-72b" to "qwen-embedding" with URL now driven by LLM_EMBEDDING_URL environment variable (fallback: http://192.168.86.200:8100).
Database Handler Comment Cleanup
src/omnibase_infra/handlers/registration_storage/handler_registration_storage_postgres.py
Removed historical note about IP aliasing and external reference; retained documentation of column aliasing in query mapping.
Vision SLO Test Conditional Skip
tests/performance/test_llm_endpoint_slo.py
Added class-level skip decorator to TestVisionSlo; test suite skips when LLM_VISION_URL environment variable is not configured.

Poem

🐰 A rabbit hops through Kafka's streams,
Ports now dance in cleaner dreams!
Topics centralized, configs freed,
Environment variables plant the seed—
Health checks hop, vision tests skip with care,
Infrastructure flourishes in the spring air! 🌱

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objectives: purging dead endpoints (port 29092 → 19092, qwen-72b → qwen-embedding, removing stale comments) and adding skip markers (Vision SLO, Ollama tests).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jonahgabriel/omn-4829-dead-endpoint-purge-infra
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docker/docker-compose.e2e.yml`:
- Line 112: The advertised Kafka external address is using the container port
(29092) while the host mapping uses the KAFKA_PORT variable; change the
advertised listener to use the same host port variable so clients receive a
reachable address. Replace the hardcoded "localhost:29092" value in the Kafka
advertised listeners/advertised.listeners or KAFKA_ADVERTISED_LISTENERS setting
with "localhost:${KAFKA_PORT:-19092}" (matching the port mapping
"${KAFKA_PORT:-19092}:29092") so the advertised external port aligns with the
host port mapping.

In `@tests/redeploy/test_pipeline_smoke.sh`:
- Line 124: The env assignment using bash -c with nested quoting for
KAFKA_BOOTSTRAP_SERVERS is triggering SC2027; replace the "bash -c" wrapper and
inline environment assignment (the KAFKA_BOOTSTRAP_SERVERS=... token) by using
the env prefix (exporting the variable for the command) rather than nested
quotes, and ensure you append "2>&1" to the command invocation so stderr is
redirected into stdout for check_output; update the line that sets
KAFKA_BOOTSTRAP_SERVERS and any other similar env assignments to follow this
pattern.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: de9f8c9b-ed76-4808-a261-91812582d3ee

📥 Commits

Reviewing files that changed from the base of the PR and between 7ba7796 and 4f712e7.

⛔ Files ignored due to path filters (1)
  • src/omnibase_infra/enums/generated/enum_omnibase_infra_topic.py is excluded by !**/generated/**
📒 Files selected for processing (8)
  • docker/docker-compose.e2e.yml
  • src/omnibase_infra/event_bus/topic_constants.py
  • src/omnibase_infra/handlers/registration_storage/handler_registration_storage_postgres.py
  • src/omnibase_infra/services/service_llm_endpoint_health.py
  • tests/performance/test_llm_endpoint_slo.py
  • tests/redeploy/test_pipeline_smoke.sh
  • tests/redeploy/test_preflight.sh
  • tests/unit/nodes/node_llm_embedding_effect/handlers/test_handler_embedding_ollama.py

Comment thread docker/docker-compose.e2e.yml
Comment thread tests/redeploy/test_pipeline_smoke.sh
…e (OMN-4840)

Move TOPIC_LLM_ENDPOINT_HEALTH from a local string in
service_llm_endpoint_health.py to event_bus/topic_constants.py and
import it, fixing the Arch Invariants raw-topic-literal check.
Regenerate topic enums to stay in sync.
@jonahgabriel
jonahgabriel force-pushed the jonahgabriel/omn-4829-dead-endpoint-purge-infra branch from e887eca to e058078 Compare March 13, 2026 15:23

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
tests/redeploy/test_pipeline_smoke.sh (1)

122-128: ⚠️ Potential issue | 🟡 Minor

Nested quoting issue in bash -c block (previously flagged).

The double quotes around ${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092} on line 124 break out of the outer bash -c "..." string, causing the variable to be expanded by the outer shell rather than inside the subshell. This triggers Shellcheck SC2027 and can cause issues if the variable contains spaces or special characters.

The previous review already suggested refactoring to use env instead of bash -c for cleaner variable passing:

🔧 Suggested fix using `env`
 check_output "Issue4: bus tunnel check skippable (no PREFLIGHT FAILED)" "PREFLIGHT OK: ENABLE_ENV_SYNC_PROBE" \
-  bash -c "
-    OMNI_HOME='/tmp' \
-    KAFKA_BOOTSTRAP_SERVERS="${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092}" \
-    POSTGRES_PASSWORD='test' \
-    ENABLE_ENV_SYNC_PROBE='true' \
-      bash '${REPO_ROOT}/scripts/preflight-check.sh' --skip-tunnel-check 2>&1
-  "
+  env \
+    OMNI_HOME="/tmp" \
+    KAFKA_BOOTSTRAP_SERVERS="${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092}" \
+    POSTGRES_PASSWORD="test" \
+    ENABLE_ENV_SYNC_PROBE="true" \
+    bash "${REPO_ROOT}/scripts/preflight-check.sh" --skip-tunnel-check 2>&1

,

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/redeploy/test_pipeline_smoke.sh` around lines 122 - 128, The current
bash -c block expands ${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092} in the outer
shell due to nested quoting; replace the bash -c approach with an env-based
invocation so environment variables are passed safely into the subshell when
calling the preflight script (invoke env to set OMNI_HOME,
KAFKA_BOOTSTRAP_SERVERS, POSTGRES_PASSWORD, ENABLE_ENV_SYNC_PROBE and then run
bash '${REPO_ROOT}/scripts/preflight-check.sh' --skip-tunnel-check), ensuring
variable expansion happens inside the executed process and avoiding nested-quote
issues flagged by ShellCheck SC2027.
🧹 Nitpick comments (1)
src/omnibase_infra/services/service_llm_endpoint_health.py (1)

210-214: Verify if the hardcoded IP in the docstring should be updated.

The PR objective OMN-4843 mentions removing stale 192.168.86.200 historical references. While this is a docstring example (not runtime code), having a decommissioned IP in documentation may cause confusion. Consider updating the example to use a placeholder like http://llm-embedding.local:8100 or referencing the environment variable pattern.

📝 Suggested docstring update
         config = ModelLlmEndpointHealthConfig(
             endpoints={
                 "coder-14b": "http://192.168.86.201:8000",
-                "qwen-embedding": os.getenv("LLM_EMBEDDING_URL", "http://192.168.86.200:8100"),
+                "qwen-embedding": os.getenv("LLM_EMBEDDING_URL", "http://localhost:8100"),
             },
             probe_interval_seconds=30.0,
         )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/omnibase_infra/services/service_llm_endpoint_health.py` around lines 210
- 214, The docstring/example in the ModelLlmEndpointHealthConfig endpoints
mapping contains stale hardcoded IPs (e.g., "http://192.168.86.201:8000" and the
historical "192.168.86.200") which can confuse readers; update the example to
use a neutral placeholder or environment-variable pattern (for example
"http://llm-coder.local:8000" and "http://llm-embedding.local:8100" or reference
os.getenv usage) so the entry for "coder-14b" and "qwen-embedding" shows a
non-decommissioned, clearly-example URL or the env var pattern instead of the
old 192.168.86.* addresses.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@tests/redeploy/test_pipeline_smoke.sh`:
- Around line 122-128: The current bash -c block expands
${KAFKA_BOOTSTRAP_SERVERS:-localhost:19092} in the outer shell due to nested
quoting; replace the bash -c approach with an env-based invocation so
environment variables are passed safely into the subshell when calling the
preflight script (invoke env to set OMNI_HOME, KAFKA_BOOTSTRAP_SERVERS,
POSTGRES_PASSWORD, ENABLE_ENV_SYNC_PROBE and then run bash
'${REPO_ROOT}/scripts/preflight-check.sh' --skip-tunnel-check), ensuring
variable expansion happens inside the executed process and avoiding nested-quote
issues flagged by ShellCheck SC2027.

---

Nitpick comments:
In `@src/omnibase_infra/services/service_llm_endpoint_health.py`:
- Around line 210-214: The docstring/example in the ModelLlmEndpointHealthConfig
endpoints mapping contains stale hardcoded IPs (e.g.,
"http://192.168.86.201:8000" and the historical "192.168.86.200") which can
confuse readers; update the example to use a neutral placeholder or
environment-variable pattern (for example "http://llm-coder.local:8000" and
"http://llm-embedding.local:8100" or reference os.getenv usage) so the entry for
"coder-14b" and "qwen-embedding" shows a non-decommissioned, clearly-example URL
or the env var pattern instead of the old 192.168.86.* addresses.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cb37024c-2c75-405f-9c9b-075ec33313cd

📥 Commits

Reviewing files that changed from the base of the PR and between 4f712e7 and e058078.

⛔ Files ignored due to path filters (1)
  • src/omnibase_infra/enums/generated/enum_omnibase_infra_topic.py is excluded by !**/generated/**
📒 Files selected for processing (7)
  • docker/docker-compose.e2e.yml
  • src/omnibase_infra/event_bus/topic_constants.py
  • src/omnibase_infra/handlers/registration_storage/handler_registration_storage_postgres.py
  • src/omnibase_infra/services/service_llm_endpoint_health.py
  • tests/performance/test_llm_endpoint_slo.py
  • tests/redeploy/test_pipeline_smoke.sh
  • tests/redeploy/test_preflight.sh
✅ Files skipped from review due to trivial changes (1)
  • src/omnibase_infra/handlers/registration_storage/handler_registration_storage_postgres.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • docker/docker-compose.e2e.yml
  • tests/performance/test_llm_endpoint_slo.py

@jonahgabriel
jonahgabriel added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 2ba3265 Mar 13, 2026
36 checks passed
@jonahgabriel
jonahgabriel deleted the jonahgabriel/omn-4829-dead-endpoint-purge-infra branch March 13, 2026 15:47
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