Skip to content

new evals for logging and more - #601

Merged
aantn merged 19 commits into
masterfrom
add-3-new-log-related-evals
Jul 23, 2025
Merged

aantn merged 19 commits into
masterfrom
add-3-new-log-related-evals

Conversation

@aantn

@aantn aantn commented Jul 7, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 7, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This change adds a suite of new test fixtures, manifests, and supporting files for the Holmes system, focusing on Kubernetes log fetching, error handling, namespace resolution, autoscaling confusion, and health check scenarios. It introduces new test cases, Kubernetes manifests, supporting tool output fixtures, and updates to allowed evaluation tags and test markers.

Changes

Files/Paths Change Summary
tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/* Adds manifest, test case, kubectl/tool output, and log-fetching fixtures for error log retrieval from a deployment with errors.
tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/* Adds manifest, test case, and fixtures for log retrieval from a deployment with no error logs.
tests/llm/fixtures/test_ask_holmes/57_wrong_namespace/* Adds manifest, test case, and kubectl/tool output fixtures for simulating a wrong namespace log query scenario.
tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/* Adds manifest, test case, and kubectl/tool output fixtures for a scenario testing KEDA vs HPA autoscaling confusion.
tests/llm/fixtures/test_ask_holmes/65_health_check_followup/* Adds manifest, test case, and kubectl/tool output fixtures for a payment processor health check and follow-up scenario.
tests/llm/utils/constants.py Adds "understanding-real-intent" to allowed evaluation tags.
pyproject.toml Adds a pytest marker for "understanding-real-intent" tests.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Holmes System
    participant Kubernetes Cluster
    participant Toolset/CLI

    User->>Holmes System: Submit log/diagnostic query
    Holmes System->>Kubernetes Cluster: Apply manifest (test setup)
    Holmes System->>Toolset/CLI: Run kubectl/tool command (e.g., get pods, fetch logs)
    Toolset/CLI->>Kubernetes Cluster: Execute command
    Kubernetes Cluster-->>Toolset/CLI: Command output (logs, errors, resource info)
    Toolset/CLI-->>Holmes System: Return command output
    Holmes System->>Holmes System: Analyze output, match expected behavior
    Holmes System->>Kubernetes Cluster: Delete manifest (test teardown)
    Holmes System-->>User: Return answer or error message
Loading

Estimated code review effort

2 (10–30 minutes)

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • moshemorad
  • nherment

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09d348f and 699b892.

📒 Files selected for processing (1)
  • pyproject.toml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pyproject.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks
  • GitHub Check: Pre-commit checks

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@aantn
aantn requested a review from Sheeproid July 7, 2025 20:10
Comment thread tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/manifest.yaml Outdated
Comment thread tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/manifest.yaml Outdated
Comment thread tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/test_case.yaml Outdated

@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: 4

♻️ Duplicate comments (1)
tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/test_case.yaml (1)

1-2: Mismatch between prompt (“last 10 ERROR logs”) and expected output (single line)

The deployment emits five distinct ERROR: lines.
Requesting 10 and then expecting only one line (exact match) risks flaky grading. Either:

  1. Trim the prompt to “show any ERROR log…”, or
  2. Expand expected_output to a multiline block / regex that matches all returned lines.
🧹 Nitpick comments (4)
tests/llm/fixtures/test_ask_holmes/57_fetch_logs_no_namespace_confusion/manifest.yaml (1)

37-38: Consider shortening the sleep to speed-up CI

sleep 300 holds the pod for 5 minutes which is longer than most tests need and can slow down kubectl logs / teardown.
If nothing relies on that length, reduce to e.g. sleep 60.

tests/llm/fixtures/test_ask_holmes/57_fetch_logs_no_namespace_confusion/test_case.yaml (1)

2-3: Make the assertion less brittle – use a regex or contains check

The expected output is a hard-coded full sentence. Any paraphrase (e.g. “deployment video-streamer doesn’t exist in app-57…”) will fail the test even though it is semantically correct. Earlier learnings (#586) warned about this.

Suggestion:

-expected_output: "video-streamer not found in namespace app-57, did you mean namespace test-57?"
+expected_output_regex: ".*video-streamer.*app-57.*test-57.*"

(or switch to a contains_any style check used in other fixtures).

This keeps the test goal (detecting namespace confusion) while allowing wording variations.

tests/llm/fixtures/test_ask_holmes/56_fetch_error_logs_no_errors/test_case.yaml (1)

1-2: Avoid brittle exact-match assertion for “no errors” response

Requiring the model to emit the exact string No ERROR logs found can create false negatives.
Consider asserting that the output contains an indicative phrase or that the list length is zero, rather than strict equality.

tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/test_case_with_timeout.yaml.example (1)

5-5: Document why this file is committed and when to use the 120 s timeout

As an *.example it will never be executed by CI. Add a comment header explaining how/when a developer should copy-rename it, or move it to docs to avoid clutter.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61f01f5 and adad838.

📒 Files selected for processing (7)
  • tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/manifest.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/test_case_with_timeout.yaml.example (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/56_fetch_error_logs_no_errors/manifest.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/56_fetch_error_logs_no_errors/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/57_fetch_logs_no_namespace_confusion/manifest.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/57_fetch_logs_no_namespace_confusion/test_case.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: nherment
PR: robusta-dev/holmesgpt#408
File: holmes/plugins/toolsets/kubernetes_logs.py:90-97
Timestamp: 2025-05-15T05:13:43.169Z
Learning: In the Kubernetes logs toolset for Holmes, both current and previous logs are intentionally fetched and combined for each pod, even though this requires more API calls. This design ensures all logs are captured even when pods restart but retain their name, providing complete diagnostic information.
tests/llm/fixtures/test_ask_holmes/57_fetch_logs_no_namespace_confusion/test_case.yaml (1)
Learnt from: Sheeproid
PR: robusta-dev/holmesgpt#586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.
tests/llm/fixtures/test_ask_holmes/56_fetch_error_logs_no_errors/test_case.yaml (1)
Learnt from: Sheeproid
PR: robusta-dev/holmesgpt#586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.
tests/llm/fixtures/test_ask_holmes/57_fetch_logs_no_namespace_confusion/manifest.yaml (1)
Learnt from: nherment
PR: robusta-dev/holmesgpt#408
File: holmes/plugins/toolsets/kubernetes_logs.py:90-97
Timestamp: 2025-05-15T05:13:43.169Z
Learning: In the Kubernetes logs toolset for Holmes, both current and previous logs are intentionally fetched and combined for each pod, even though this requires more API calls. This design ensures all logs are captured even when pods restart but retain their name, providing complete diagnostic information.
tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/test_case_with_timeout.yaml.example (1)
Learnt from: Sheeproid
PR: robusta-dev/holmesgpt#586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.
tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/test_case.yaml (1)
Learnt from: Sheeproid
PR: robusta-dev/holmesgpt#586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.
tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/manifest.yaml (1)
Learnt from: Sheeproid
PR: robusta-dev/holmesgpt#586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.
tests/llm/fixtures/test_ask_holmes/56_fetch_error_logs_no_errors/manifest.yaml (1)
Learnt from: nherment
PR: robusta-dev/holmesgpt#408
File: holmes/plugins/toolsets/kubernetes_logs.py:90-97
Timestamp: 2025-05-15T05:13:43.169Z
Learning: In the Kubernetes logs toolset for Holmes, both current and previous logs are intentionally fetched and combined for each pod, even though this requires more API calls. This design ensures all logs are captured even when pods restart but retain their name, providing complete diagnostic information.
🪛 Checkov (3.2.334)
tests/llm/fixtures/test_ask_holmes/57_fetch_logs_no_namespace_confusion/manifest.yaml

[MEDIUM] 6-45: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[MEDIUM] 6-45: Minimize the admission of root containers

(CKV_K8S_23)

tests/llm/fixtures/test_ask_holmes/55_fetch_error_logs_with_errors/manifest.yaml

[MEDIUM] 6-45: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[MEDIUM] 6-45: Minimize the admission of root containers

(CKV_K8S_23)

tests/llm/fixtures/test_ask_holmes/56_fetch_error_logs_no_errors/manifest.yaml

[MEDIUM] 6-50: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[MEDIUM] 6-50: Minimize the admission of root containers

(CKV_K8S_23)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks
  • GitHub Check: Pre-commit checks

@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: 0

🧹 Nitpick comments (4)
tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/manifest.yaml (2)

21-51: Harden the test pod with a non-root security context

Even for fixtures it’s good practice to model secure defaults. Running BusyBox as root with privilege escalation enabled conflicts with CKV_K8S_20/23 and may conceal policy regressions.

       containers:
       - name: app-container
         image: busybox:1.35
+        securityContext:
+          runAsNonRoot: true
+          runAsUser: 1000
+          allowPrivilegeEscalation: false
+          readOnlyRootFilesystem: true
         command: ["/bin/sh"]

23-23: Pin the BusyBox image by digest

Floating tags (busybox:1.35) may unexpectedly change and break the deterministic nature of the fixture. Consider pinning to a content-addressable digest (e.g. busybox@sha256:...) to guarantee reproducible tests.

tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/manifest.yaml (2)

21-45: Mirror the security hardening in error-case fixture

Same rationale as the “no-errors” fixture: add an explicit non-root securityContext to keep the test resource compliant with baseline policies.

       containers:
       - name: app-container
         image: busybox:1.35
+        securityContext:
+          runAsNonRoot: true
+          runAsUser: 1000
+          allowPrivilegeEscalation: false
+          readOnlyRootFilesystem: true
         command: ["/bin/sh"]

23-23: Use a digest for the BusyBox image

Pinning the image avoids silent upgrades that could alter log output and invalidate snapshot expectations.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9152a03 and 0636a93.

📒 Files selected for processing (4)
  • tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/manifest.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/manifest.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/test_case.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/test_case.yaml
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: nherment
PR: robusta-dev/holmesgpt#408
File: holmes/plugins/toolsets/kubernetes_logs.py:90-97
Timestamp: 2025-05-15T05:13:43.169Z
Learning: In the Kubernetes logs toolset for Holmes, both current and previous logs are intentionally fetched and combined for each pod, even though this requires more API calls. This design ensures all logs are captured even when pods restart but retain their name, providing complete diagnostic information.
tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/manifest.yaml (1)
Learnt from: nherment
PR: robusta-dev/holmesgpt#408
File: holmes/plugins/toolsets/kubernetes_logs.py:90-97
Timestamp: 2025-05-15T05:13:43.169Z
Learning: In the Kubernetes logs toolset for Holmes, both current and previous logs are intentionally fetched and combined for each pod, even though this requires more API calls. This design ensures all logs are captured even when pods restart but retain their name, providing complete diagnostic information.
tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/manifest.yaml (1)
Learnt from: nherment
PR: robusta-dev/holmesgpt#408
File: holmes/plugins/toolsets/kubernetes_logs.py:90-97
Timestamp: 2025-05-15T05:13:43.169Z
Learning: In the Kubernetes logs toolset for Holmes, both current and previous logs are intentionally fetched and combined for each pod, even though this requires more API calls. This design ensures all logs are captured even when pods restart but retain their name, providing complete diagnostic information.
🪛 Checkov (3.2.334)
tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/manifest.yaml

[MEDIUM] 6-45: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[MEDIUM] 6-45: Minimize the admission of root containers

(CKV_K8S_23)

tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/manifest.yaml

[MEDIUM] 6-50: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[MEDIUM] 6-50: Minimize the admission of root containers

(CKV_K8S_23)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks
  • GitHub Check: Pre-commit checks

@aantn aantn changed the title add a few more logging evals new evals on logging and more Jul 11, 2025

@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: 0

🔭 Outside diff range comments (1)
tests/llm/fixtures/test_ask_holmes/65_health_check_followup/manifest.yaml (1)

24-60: Harden the container with an explicit securityContext.

Checkov surfaced CKV_K8S_20 and CKV_K8S_23: the container currently runs as root and allows privilege escalation. Even in fixtures it’s better to encode secure defaults so copy-pasted samples don’t propagate bad practice.

       containers:
       - name: payment-processor
         image: busybox:1.35
+        securityContext:
+          runAsNonRoot: true
+          runAsUser: 1000
+          allowPrivilegeEscalation: false
+          capabilities:
+            drop: ["ALL"]
+          seccompProfile:
+            type: RuntimeDefault
🧹 Nitpick comments (3)
tests/llm/fixtures/test_ask_holmes/65_health_check_followup/manifest.yaml (1)

41-47: Consider adding liveness / readiness probes instead of a blind infinite loop.

Relying solely on log heartbeats without K8s probes means the Deployment can’t automatically restart misbehaving pods. A minimal HTTP-GET or exec probe on port 8080 (even a dummy /healthz) would keep the fixture realistic and future-proof for health-related evaluations.

tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/manifest.yaml (2)

24-44: Add a basic securityContext to silence container-level security scanners

Checkov flags two medium-severity findings (allowPrivilegeEscalation, run as root).
Even for test fixtures, adding a minimal security context costs almost nothing and keeps CI pipelines green when full-repo scanners are enabled.

       containers:
       - name: invoice-generator
         image: busybox
+        securityContext:
+          runAsNonRoot: true
+          allowPrivilegeEscalation: false
+          capabilities:
+            drop:
+              - ALL
         ports:
         - containerPort: 8080

26-28: Pin the BusyBox image to a digest or specific tag

busybox:latest changes frequently. Pinning avoids test flakiness when the upstream image is updated or removed.

Example:

-        image: busybox
+        image: busybox:1.36.1   # or use a sha256 digest
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f08ca84 and 2dadb5c.

📒 Files selected for processing (12)
  • tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/kubectl_find_resourcepayment-service_pod.txt.AUTOGENERATED (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/kubectl_find_resourceuser-api_pod.txt.AUTOGENERATED (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/kubectl_describedeployment_invoice-generator_invoices-64.txt.AUTOGENERATED (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/kubectl_find_resourceinvoice-generator_deployment.txt.AUTOGENERATED (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/kubectl_get_by_kind_in_namespacescaledobject_invoices-64.txt.AUTOGENERATED (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/manifest.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/kubectl_describepod_payment-processor-598445cb54-xd5s8_production-65.txt.AUTOGENERATED (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/kubectl_get_by_namedeployment_payment-processor_production-65.txt.AUTOGENERATED (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/kubectl_lineage_childrendeployment_payment-processor_production-65.txt.AUTOGENERATED (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/manifest.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/test_case.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (8)
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/kubectl_get_by_namedeployment_payment-processor_production-65.txt.AUTOGENERATED
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/kubectl_get_by_kind_in_namespacescaledobject_invoices-64.txt.AUTOGENERATED
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/kubectl_lineage_childrendeployment_payment-processor_production-65.txt.AUTOGENERATED
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/kubectl_find_resourceinvoice-generator_deployment.txt.AUTOGENERATED
  • tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/kubectl_describedeployment_invoice-generator_invoices-64.txt.AUTOGENERATED
  • tests/llm/fixtures/test_ask_holmes/65_health_check_followup/kubectl_describepod_payment-processor-598445cb54-xd5s8_production-65.txt.AUTOGENERATED
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/llm/fixtures/test_ask_holmes/62_fetch_error_logs_with_errors/kubectl_find_resourcepayment-service_pod.txt.AUTOGENERATED
  • tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/kubectl_find_resourceuser-api_pod.txt.AUTOGENERATED
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: nherment
PR: robusta-dev/holmesgpt#408
File: holmes/plugins/toolsets/kubernetes_logs.py:90-97
Timestamp: 2025-05-15T05:13:43.169Z
Learning: In the Kubernetes logs toolset for Holmes, both current and previous logs are intentionally fetched and combined for each pod, even though this requires more API calls. This design ensures all logs are captured even when pods restart but retain their name, providing complete diagnostic information.
Learnt from: Sheeproid
PR: robusta-dev/holmesgpt#586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.
Learnt from: nherment
PR: robusta-dev/holmesgpt#610
File: .github/workflows/llm-evaluation.yaml:39-42
Timestamp: 2025-07-08T08:45:41.069Z
Learning: The robusta-dev/holmesgpt codebase has comprehensive existing validation for Azure environment variables (AZURE_API_BASE, AZURE_API_KEY, AZURE_API_VERSION) and MODEL in tests/llm/utils/classifiers.py, tests/llm/conftest.py, and holmes/core/llm.py. Don't suggest adding redundant validation logic.
🪛 Checkov (3.2.334)
tests/llm/fixtures/test_ask_holmes/64_keda_vs_hpa_confusion/manifest.yaml

[MEDIUM] 6-45: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[MEDIUM] 6-45: Minimize the admission of root containers

(CKV_K8S_23)

tests/llm/fixtures/test_ask_holmes/65_health_check_followup/manifest.yaml

[MEDIUM] 6-59: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[MEDIUM] 6-59: Minimize the admission of root containers

(CKV_K8S_23)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Pre-commit checks
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks

@aantn aantn changed the title new evals on logging and more new evals for logging and more Jul 11, 2025
@aantn
aantn requested a review from Sheeproid July 13, 2025 11:49
@aantn
aantn enabled auto-merge (squash) July 22, 2025 21:35
@github-actions

Copy link
Copy Markdown
Contributor

Results of HolmesGPT evals

  • ask_holmes: 23/71 test cases were successful, 0 regressions, 42 mock failures
  • investigate: 4/16 test cases were successful, 0 regressions, 10 mock failures
Test suite Test case Status
ask 01: how_many_pods ✅
ask 02: what_is_wrong_with_pod 🔧
ask 03: what_is_the_command_to_port_forward 🔧
ask 04: related_k8s_events 🔧
ask 05: image_version 🔧
ask 06: explain_issue 🔧
ask 07: high_latency 🔧
ask 08: sock_shop_frontend ⚠️
ask 09: crashpod 🔧
ask 10: image_pull_backoff 🔧
ask 11: init_containers 🔧
ask 12: job_crashing 🔧
ask 13: pending_node_selector 🔧
ask 14: pending_resources 🔧
ask 15: failed_readiness_probe 🔧
ask 16: failed_no_toolset_found ✅
ask 17: oom_kill 🔧
ask 18: crash_looping_v2 🔧
ask 19: detect_missing_app_details 🔧
ask 20: long_log_file_search ✅
ask 21: job_fail_curl_no_svc_account ⚠️
ask 22: high_latency_dbi_down 🔧
ask 23: app_error_in_current_logs 🔧
ask 24: misconfigured_pvc ✅
ask 25: misconfigured_ingress_class 🔧
ask 26: multi_container_logs 🔧
ask 27: permissions_error_no_helm_tools ✅
ask 28: permissions_error_helm_tools_enabled 🔧
ask 29: events_from_alert_manager 🔧
ask 30: basic_promql_graph_cluster_memory 🔧
ask 31: basic_promql_graph_pod_memory 🔧
ask 32: basic_promql_graph_pod_cpu 🔧
ask 33: http_latency_graph 🔧
ask 34: memory_graph 🔧
ask 35: tempo 🔧
ask 36: argocd_find_resource 🔧
ask 37: argocd_wrong_namespace 🔧
ask 38: rabbitmq_split_head 🔧
ask 39: failed_toolset ✅
ask 40: disabled_toolset ✅
ask 41: setup_argo ✅
ask 42: dns_issues_result_all_tools 🔧
ask 42: dns_issues_result_new_tools 🔧
ask 42: dns_issues_result_old_tools 🔧
ask 42: dns_issues_steps_new_all_tools 🔧
ask 42: dns_issues_steps_new_tools 🔧
ask 42: dns_issues_steps_old_tools 🔧
ask 43: current_datetime_from_prompt ✅
ask 43: slack_deployment_logs 🔧
ask 44: slack_statefulset_logs 🔧
ask 45: fetch_deployment_logs_simple ✅
ask 46: job_crashing_no_longer_exists 🔧
ask 47: truncated_logs_context_window ⚠️
ask 48: logs_since_thursday 🔧
ask 49: logs_since_last_week 🔧
ask 50: logs_since_specific_date 🔧
ask 51: logs_summarize_errors ✅
ask 52: logs_login_issues ✅
ask 53: logs_find_term ✅
ask 54: not_truncated_when_getting_pods ✅
ask 55: kafka_runbook 🔧
ask 56: kafka_runbook_no_tool ✅
ask 57: wrong_namespace ⚠️
ask 58: counting_pods_by_status ⚠️
ask 59: label_based_counting ✅
ask 60: time_based_filtering ✅
ask 61: exact_match_counting ✅
ask 62: fetch_error_logs_with_errors ✅
ask 63: fetch_error_logs_no_errors ✅
ask 64: keda_vs_hpa_confusion ⚠️
ask 65: health_check_followup 🔧
investigate 01: oom_kill 🔧
investigate 02: crashloop_backoff 🔧
investigate 03: cpu_throttling ✅
investigate 04: image_pull_backoff 🔧
investigate 05: crashpod ✅
investigate 06: job_failure ✅
investigate 07: job_syntax_error 🔧
investigate 08: memory_pressure 🔧
investigate 09: high_latency 🔧
investigate 10: KubeDeploymentReplicasMismatch 🔧
investigate 11: KubePodCrashLooping 🔧
investigate 12: KubePodNotReady 🔧
investigate 13: Watchdog 🔧
investigate 14: tempo 🔧
investigate 15: dns_resolution ⚠️
investigate 16: dns_resolution_no_tool ⚠️

Legend

  • ✅ the test was successful
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🔧 the test failed due to mock data issues (not a code regression)
  • ❌ the test failed and should be fixed before merging the PR

@Sheeproid Sheeproid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

see the comment about the marker

Comment thread tests/llm/utils/constants.py
@aantn
aantn merged commit 27391d2 into master Jul 23, 2025
@aantn
aantn deleted the add-3-new-log-related-evals branch July 23, 2025 14:10
@coderabbitai coderabbitai Bot mentioned this pull request Jul 26, 2025
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.

2 participants