Skip to content

Remove workload health feature and related artifacts - #1270

Closed
aantn wants to merge 3 commits into
masterfrom
codex/linear-mention-rob-97-remove-workload-health-endpoint-ah-r
Closed

aantn wants to merge 3 commits into
masterfrom
codex/linear-mention-rob-97-remove-workload-health-endpoint-ah-r

Conversation

@aantn

@aantn aantn commented Dec 30, 2025 •

Copy link
Copy Markdown
Collaborator

Summary

  • remove workload health API endpoints, prompts, and data models
  • delete workload health tests, fixtures, and eval plumbing; update eval guidance mapping
  • refresh docs and safety prompt coverage to exclude the deprecated workload health feature

Testing

  • pytest tests/test_server_endpoints.py tests/core/test_prompt.py tests/test_ai_safety_prompt.py (fails: ModuleNotFoundError: pytest_shared_session_scope)

Codex Task

Summary by CodeRabbit

Release Notes

  • Removals
    • Removed /api/workload_health_check endpoint
    • Removed /api/workload_health_chat endpoint
    • Updated API documentation to reflect removed endpoints

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Codex <codex@openai.com>
@coderabbitai

coderabbitai Bot commented Dec 30, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This PR removes the entire workload health feature from Holmes, including two API endpoints (/api/workload_health_check and /api/workload_health_chat), all associated data models, conversation message builders, Jinja2 prompt templates, test fixtures, and test suites. The removal spans documentation, core logic, server routing, and comprehensive test coverage.

Changes

Cohort / File(s) Summary
API Documentation
docs/reference/http-api.md
Removed workload health API endpoint documentation; updated overview to remove workload health references
Core Models & Persistence
holmes/core/models.py, holmes/core/supabase_dal.py
Removed WorkloadHealthRequest, WorkloadHealthInvestigationResult, WorkloadHealthChatRequest models and workload_health_structured_output JSON schema; removed get_workload_issues() method from SupabaseDal
Conversation Logic
holmes/core/conversations.py
Removed build_workload_health_chat_messages() function and associated import of WorkloadHealthChatRequest
Prompt Templates
holmes/plugins/prompts/kubernetes_workload_*.jinja2
Deleted kubernetes_workload_ask.jinja2 and kubernetes_workload_chat.jinja2 template files
Server Routing
server.py
Removed /api/workload_health_check and /api/workload_health_chat endpoints with all request handling, processing, and error pathways
Test Configuration & Utilities
tests/llm/conftest.py, tests/llm/utils/test_case_utils.py, tests/llm/utils/mock_dal.py, tests/llm/utils/reporting/github_reporter.py
Removed workload health test type from LLM_TEST_TYPES; deleted HealthCheckTestCase class and workload health test case loading logic; removed workload health counters and reporting from GitHub reporter; removed get_workload_issues() mock from MockSupabaseDal
Test Fixtures
tests/llm/fixtures/test_workload_health/01_crashpod/*
Deleted all test fixture files (issue_data.json, kubectl_describe.txt, kubectl_get_by_kind_in_namespace.txt, kubectl_logs_all_containers.txt, resource_instructions.json, test_case.yaml, workload_health_request.json)
Test Suites & Coverage
tests/llm/test_workload_health.py, tests/test_server_endpoints.py, tests/core/test_prompt.py, tests/test_ai_safety_prompt.py
Deleted entire test_workload_health.py suite; removed workload health endpoint tests; removed workload health prompt tests and model references

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • Sheeproid
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Remove workload health feature and related artifacts' clearly and accurately describes the main change: a comprehensive removal of the workload health feature across the codebase, including APIs, models, tests, and documentation.

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Signed-off-by: Codex <codex@openai.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
tests/llm/conftest.py (1)

49-49: Remove unused LLM_TEST_TYPES constant.

This constant is not used anywhere in the codebase. The is_llm_test() function uses hardcoded checks instead of referencing it. Remove the constant to eliminate dead code.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7110f2d and e1a1e06.

📒 Files selected for processing (21)
  • docs/reference/http-api.md
  • evals_per_branch.json
  • holmes/core/conversations.py
  • holmes/core/models.py
  • holmes/plugins/prompts/kubernetes_workload_ask.jinja2
  • holmes/plugins/prompts/kubernetes_workload_chat.jinja2
  • server.py
  • tests/core/test_prompt.py
  • tests/llm/conftest.py
  • tests/llm/fixtures/test_workload_health/01_crashpod/issue_data.json
  • tests/llm/fixtures/test_workload_health/01_crashpod/kubectl_describe.txt
  • tests/llm/fixtures/test_workload_health/01_crashpod/kubectl_get_by_kind_in_namespace.txt
  • tests/llm/fixtures/test_workload_health/01_crashpod/kubectl_logs_all_containers.txt
  • tests/llm/fixtures/test_workload_health/01_crashpod/resource_instructions.json
  • tests/llm/fixtures/test_workload_health/01_crashpod/test_case.yaml
  • tests/llm/fixtures/test_workload_health/01_crashpod/workload_health_request.json
  • tests/llm/test_workload_health.py
  • tests/llm/utils/reporting/github_reporter.py
  • tests/llm/utils/test_case_utils.py
  • tests/test_ai_safety_prompt.py
  • tests/test_server_endpoints.py
💤 Files with no reviewable changes (16)
  • tests/llm/fixtures/test_workload_health/01_crashpod/kubectl_logs_all_containers.txt
  • tests/llm/fixtures/test_workload_health/01_crashpod/kubectl_get_by_kind_in_namespace.txt
  • tests/llm/fixtures/test_workload_health/01_crashpod/issue_data.json
  • server.py
  • tests/llm/fixtures/test_workload_health/01_crashpod/resource_instructions.json
  • holmes/plugins/prompts/kubernetes_workload_chat.jinja2
  • tests/test_ai_safety_prompt.py
  • holmes/core/models.py
  • tests/llm/fixtures/test_workload_health/01_crashpod/workload_health_request.json
  • holmes/core/conversations.py
  • tests/test_server_endpoints.py
  • tests/llm/fixtures/test_workload_health/01_crashpod/kubectl_describe.txt
  • holmes/plugins/prompts/kubernetes_workload_ask.jinja2
  • tests/core/test_prompt.py
  • tests/llm/test_workload_health.py
  • tests/llm/fixtures/test_workload_health/01_crashpod/test_case.yaml
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

When writing documentation in the docs/ directory, always add a blank line between a header/bold text and a list, otherwise MkDocs won't render the list properly

Files:

  • docs/reference/http-api.md
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: Use Ruff for formatting and linting (configured in pyproject.toml)
Type hints required (mypy configuration in pyproject.toml)
ALWAYS place Python imports at the top of the file, not inside functions or methods

Files:

  • tests/llm/conftest.py
  • tests/llm/utils/reporting/github_reporter.py
  • tests/llm/utils/test_case_utils.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Tests: match source structure under tests/

Files:

  • tests/llm/conftest.py
  • tests/llm/utils/reporting/github_reporter.py
  • tests/llm/utils/test_case_utils.py
🔇 Additional comments (5)
tests/llm/conftest.py (3)

52-59: LGTM! Test type filtering correctly updated.

The function now properly filters for only the remaining test types (test_ask_holmes and test_investigate), correctly excluding workload health tests.


877-878: LGTM! Documentation accurately reflects the changes.

The comment has been correctly updated to reference only the remaining test types.


49-59: This review comment does not match the provided code snippet.

The code at lines 49-59 of tests/llm/conftest.py defines LLM_TEST_TYPES and is_llm_test() function, which are unrelated to workload health. Additionally, searching the codebase found no workload_health or WorkloadHealth references, making this verification request moot. Either the code snippet or file/line references are incorrect.

Likely an incorrect or invalid review comment.

tests/llm/utils/test_case_utils.py (1)

17-17: LGTM! Import correctly updated.

The removal of WorkloadHealthRequest from the imports is correct and aligns with the broader removal of workload health functionality from the codebase.

tests/llm/utils/reporting/github_reporter.py (1)

112-112: Workload health regression tracking correctly removed.

The change cleanly removes workload_health_regressions from the regression count calculation. The function now correctly sums only the two active test types (ask_holmes_regressions and investigate_regressions), matching the function's logic which processes only "ask_holmes" and "investigate" test results. Verification confirms no stale references to workload_health remain in the codebase.


## Overview
The HolmesGPT API provides endpoints for automated investigations, workload health checks, and conversational troubleshooting. This document describes each endpoint, its purpose, request fields, and example usage.
The HolmesGPT API provides endpoints for automated investigations and conversational troubleshooting. This document describes each endpoint, its purpose, request fields, and example usage.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

wc -l docs/reference/http-api.md

Repository: HolmesGPT/holmesgpt

Length of output: 93


🏁 Script executed:

head -50 docs/reference/http-api.md | cat -n

Repository: HolmesGPT/holmesgpt

Length of output: 1976


🏁 Script executed:

# Check for markdown formatting issues (headers followed by lists without blank lines)
rg -n '^#+\s|^\*\s|^-\s|^\d+\.\s' docs/reference/http-api.md | head -30

Repository: HolmesGPT/holmesgpt

Length of output: 1293


🏁 Script executed:

# Check for headers/bold text followed directly by lists without blank line
# Pattern: lines starting with # or ** followed by lines starting with - or *
python3 << 'EOF'
with open('docs/reference/http-api.md', 'r') as f:
    lines = f.readlines()

issues = []
for i in range(len(lines) - 1):
    current_line = lines[i].rstrip()
    next_line = lines[i + 1].rstrip()
    
    # Check if current line is a header or bold text
    is_header = current_line.startswith('#')
    is_bold = '**' in current_line
    
    # Check if next line is a list item (with content, not blank)
    is_list_item = next_line.strip().startswith('-') or next_line.strip().startswith('*') or (next_line.strip() and next_line.strip()[0].isdigit() and '.' in next_line)
    
    if (is_header or is_bold) and is_list_item and next_line.strip():
        issues.append((i + 1, current_line, i + 2, next_line))

if issues:
    print("Found markdown formatting violations (header/bold followed directly by list):")
    for line_num, current, next_num, next_content in issues:
        print(f"\nLine {line_num}: {current[:80]}")
        print(f"Line {next_num}: {next_content[:80]}")
else:
    print("No markdown formatting violations found (headers/bold properly separated from lists)")
EOF

Repository: HolmesGPT/holmesgpt

Length of output: 149


🏁 Script executed:

# Run the verification script from the review comment
# Verify no stale references to removed workload health endpoints

# Search documentation files for references to removed endpoints
echo "Checking documentation files..."
rg -n --type=md -C2 'workload_health_check|workload_health_chat' docs/

# Search Python code comments for references to removed endpoints
echo -e "\nChecking Python code comments..."
rg -n --type=py -C2 '/api/workload_health'

# Search for any remaining "workload health" or "workload_health" references in docs
echo -e "\nChecking for general workload health references in docs..."
rg -n --type=md 'workload.?health' docs/

Repository: HolmesGPT/holmesgpt

Length of output: 188


🏁 Script executed:

# Check for markdown formatting violations more efficiently
rg -n '^(#{1,6}\s|[*_]{2}[^*_]+[*_]{2})' docs/reference/http-api.md | head -40

Repository: HolmesGPT/holmesgpt

Length of output: 1589


🏁 Script executed:

# For each header or bold, check if the next non-empty line is a list
python3 << 'EOF'
with open('docs/reference/http-api.md', 'r') as f:
    lines = f.readlines()

violations = []
for i in range(len(lines)):
    current = lines[i].rstrip()
    # Check if it's a header
    if current.startswith('#'):
        # Look for next non-empty line
        j = i + 1
        while j < len(lines) and not lines[j].strip():
            j += 1
        
        if j < len(lines):
            next_line = lines[j].rstrip()
            # Check if next non-empty line is a list item
            stripped = next_line.strip()
            if stripped.startswith('-') or stripped.startswith('*') or (stripped and stripped[0].isdigit() and '.' in stripped.split()[0]):
                # There should be a blank line between header and list
                if i + 1 == j:  # No blank line
                    violations.append((i+1, current[:60], j+1, next_line[:60]))

if violations:
    print("Markdown formatting violations found:")
    for line_num, header, list_line, list_content in violations:
        print(f"Line {line_num}: {header}")
        print(f"  -> Line {list_line}: {list_content}")
        print()
else:
    print("✓ No violations found - all headers/bold text properly separated from lists")
EOF

Repository: HolmesGPT/holmesgpt

Length of output: 673


🏁 Script executed:

# More precise check for violations: headers/bold followed directly by actual list items
python3 << 'EOF'
import re

with open('docs/reference/http-api.md', 'r') as f:
    lines = f.readlines()

violations = []
for i in range(len(lines) - 1):
    current = lines[i].rstrip()
    next_line = lines[i + 1].rstrip()
    next_stripped = next_line.strip()
    
    # Check if current line is header or contains bold text
    is_header = current.startswith('#')
    has_bold = '**' in current and not current.startswith('#')
    
    # Check if NEXT line (immediately after) is a list item
    is_list = (next_stripped.startswith('-') or 
               next_stripped.startswith('*') or
               (next_stripped and re.match(r'^\d+\.', next_stripped)))
    
    if (is_header or has_bold) and is_list and next_stripped:
        violations.append((i+1, current[:70], i+2, next_line[:70]))

if violations:
    print("Found violations (header/bold directly followed by list):")
    for line_num, header, list_line, list_content in violations:
        print(f"\nLine {line_num}: {header}")
        print(f"Line {list_line}: {list_content}")
else:
    print("✓ No violations found")
EOF

Repository: HolmesGPT/holmesgpt

Length of output: 821


🏁 Script executed:

# Also check the specific area around line 4 mentioned in the review
sed -n '1,15p' docs/reference/http-api.md | cat -n

Repository: HolmesGPT/holmesgpt

Length of output: 737


Add blank lines between headers/bold text and lists to comply with MkDocs rendering requirements.

The file violates the markdown formatting guideline at multiple locations. Headers and bold text must be separated from lists by a blank line, but the following sections have direct adjacency:

  • Line 46-47: ### /api/chat (POST) → **Description:** (followed by content)
  • Line 85-86: ### /api/investigate (POST) → **Description:**
  • Line 145-146: ### /api/stream/investigate (POST) → **Description:**
  • Line 198-199: ### /api/issue_chat (POST) → **Description:**
  • Line 211-212: **investigation_result** object: → - result (string, optional)...
  • Line 248-249: ### /api/model (GET) → **Description:**

Add blank lines after each header and bold section header to ensure proper MkDocs rendering.

🤖 Prompt for AI Agents
In docs/reference/http-api.md around the indicated lines (46-47, 85-86, 145-146,
198-199, 211-212, 248-249) the headers and bold section headers are immediately
followed by list content which breaks MkDocs rendering; fix by inserting a
single blank line after each affected header or bolded line so there is an empty
line between the header/bold text and the following list/content (i.e., add one
newline after those specific lines).

Comment thread evals_per_branch.json Outdated
Signed-off-by: Codex <codex@openai.com>
@netlify

netlify Bot commented Jan 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for holmes-docs ready!

Name Link
🔨 Latest commit 2d88e8d
🔍 Latest deploy log https://app.netlify.com/projects/holmes-docs/deploys/696de63974804f0008a94de3
😎 Deploy Preview https://deploy-preview-1270--holmes-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@aantn

aantn commented Jan 19, 2026

Copy link
Copy Markdown
Collaborator Author

@aantn aantn closed this Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant