Skip to content

Conversation

@radofuchs
Copy link
Contributor

@radofuchs radofuchs commented Oct 16, 2025

Description

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Related Tickets & Documents

  • Related Issue #LCORE-816
  • Closes #LCORE-816

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • New Features
    • Server config now supports shield entries (shield_id, provider_id, provider_shield_id) and vector DB entries include embedding_dimension and provider_id.
  • Bug Fixes
    • Better error handling and responses when dependent services are unreachable.
  • Tests
    • E2E tests expanded to cover shields endpoint, shield structure validation, updated models endpoint checks, and related error scenarios.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

Server configuration adds concrete shield entries and extends vector DB entries with embedding_dimension and provider_id. E2E tests add shield endpoint scenarios and a new step to validate shield response structure; models scenario adjusted to expect an error when llama-stack is unreachable and minor wording edits applied.

Changes

Cohort / File(s) Summary
Server configs
run.yaml, tests/e2e/configs/run-azure.yaml, tests/e2e/configs/run-ci.yaml, tests/e2e/configs/run-rhaiis.yaml
Replace empty server.shields: [] with populated shield objects containing shield_id, provider_id, and provider_shield_id. Add embedding_dimension and provider_id fields to server.vector_dbs entries where present.
E2E feature scenarios
tests/e2e/features/info.feature
Rename models scenario to assert a 500 when llama-stack is unreachable; add two shields endpoint scenarios (success and unreachable error); minor wording change for metrics endpoint step.
E2E step implementations
tests/e2e/features/steps/info.py
Add check_shield_structure(context: Context) to validate JSON shields array, ensure non-empty, locate first item of type shield, and assert provider_id, provider_resource_id, and identifier values. Preserve existing model-structure checks.

Sequence Diagram(s)

sequenceDiagram
  participant TestClient as E2E Test Client
  participant API as Server API
  participant LS as Llama Stack

  rect rgb(248,249,250)
    TestClient->>API: GET /shields
    API->>LS: request shield/provider info
    alt LS reachable
      LS-->>API: shield data (shield_id, provider_id, provider_shield_id, ...)
      API-->>TestClient: 200 + shields array
    else LS unreachable
      LS-->>API: connection error
      API-->>TestClient: 500 + error body
    end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
Shields snug in YAML rows so bright,
Embeddings sized to fit just right.
Tests hop in to check the scene,
I nibble bugs and keep it clean. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "LCORE-816: Add new E2E tests for shields endpoint" accurately reflects the primary focus of the changeset. The modifications include new test scenarios added to info.feature and new test step implementations added to info.py that validate shield endpoint responses. The configuration file changes (run.yaml, run-azure.yaml, run-ci.yaml, run-rhaiis.yaml) are supporting updates to test configurations that enable the E2E tests to function properly by introducing the expected shield structure. The title clearly and specifically communicates the main change from the developer's perspective and aligns with both the stated PR purpose ("Add end-to-end tests for the shields endpoint") and the change type ("End to end tests improvement").
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@radofuchs radofuchs requested a review from tisnik October 16, 2025 13:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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/e2e/features/steps/info.py (1)

61-62: Consider enhancing the docstring.

The docstring could be more informative by including an Args section to document the context parameter, following Google Python docstring style as specified in the coding guidelines.

Apply this diff:

-def check_shield_structure(context: Context) -> None:
-    """Check that the first shield has the correct structure and required fields."""
+def check_shield_structure(context: Context) -> None:
+    """Check that the first shield has the correct structure and required fields.
+    
+    Args:
+        context: Behave context containing the HTTP response to validate.
+    """

As per coding guidelines.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 629b8cf and 3392b17.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • run.yaml (1 hunks)
  • tests/e2e/configs/run-azure.yaml (1 hunks)
  • tests/e2e/configs/run-ci.yaml (1 hunks)
  • tests/e2e/configs/run-rhaiis.yaml (1 hunks)
  • tests/e2e/features/info.feature (2 hunks)
  • tests/e2e/features/steps/info.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All modules start with descriptive module-level docstrings explaining purpose
Use logger = logging.getLogger(name) for module logging after import logging
Define type aliases at module level for clarity
All functions require docstrings with brief descriptions
Provide complete type annotations for all function parameters and return types
Use typing_extensions.Self in model validators where appropriate
Use modern union syntax (str | int) and Optional[T] or T | None consistently
Function names use snake_case with descriptive, action-oriented prefixes (get_, validate_, check_)
Avoid in-place parameter modification; return new data structures instead of mutating arguments
Use appropriate logging levels: debug, info, warning, error with clear messages
All classes require descriptive docstrings explaining purpose
Class names use PascalCase with conventional suffixes (Configuration, Error/Exception, Resolver, Interface)
Abstract base classes should use abc.ABC and @AbstractMethod for interfaces
Provide complete type annotations for all class attributes
Follow Google Python docstring style for modules, classes, and functions, including Args, Returns, Raises, Attributes sections as needed

Files:

  • tests/e2e/features/steps/info.py
tests/e2e/features/steps/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Place behave step definitions under tests/e2e/features/steps/

Files:

  • tests/e2e/features/steps/info.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/**/*.py: Use pytest-mock to create AsyncMock objects for async interactions in tests
Use the shared auth mock constant: MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") in tests

Files:

  • tests/e2e/features/steps/info.py
tests/e2e/features/**/*.feature

📄 CodeRabbit inference engine (CLAUDE.md)

Write E2E tests as Gherkin feature files for behave

Files:

  • tests/e2e/features/info.feature
⏰ 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: build-pr
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)
🔇 Additional comments (8)
tests/e2e/configs/run-azure.yaml (1)

123-125: LGTM!

The shields configuration is properly formatted and correctly references the llama-guard provider defined in the safety providers section.

tests/e2e/configs/run-rhaiis.yaml (1)

126-128: LGTM!

The shields configuration is consistent with other environment configs and properly references the llama-guard provider.

tests/e2e/configs/run-ci.yaml (1)

134-136: LGTM!

The shields configuration is properly formatted and consistent across all environment configurations.

tests/e2e/features/steps/info.py (1)

40-57: LGTM!

The variable rename from gpt_model to llm_model improves clarity and better reflects the function's purpose of validating any LLM model structure, not just GPT models.

tests/e2e/features/info.feature (3)

40-40: LGTM!

The scenario title now accurately reflects that it tests the error case when llama-stack is unreachable, improving test documentation clarity.


50-54: LGTM!

The new scenario for testing the shields endpoint follows the established pattern and properly validates both the response status and structure.


57-65: LGTM!

The error handling scenario for the shields endpoint is well-structured and maintains consistency with other error scenarios in the feature file.

run.yaml (1)

134-136: LGTM!

The shields configuration is properly formatted and aligns with the llama-guard provider defined in the safety providers section.

Copy link
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
tests/e2e/features/steps/info.py (2)

85-85: Fix copy-paste error in assertion message.

The assertion message references "LLM model" but should reference "shield".

Apply this diff:

-    assert found_shield is not None, "No LLM model found in response"
+    assert found_shield is not None, "No shield found in response"

88-88: Fix copy-paste error in assertion message.

The assertion message incorrectly states "type should be 'model'" when it should state "type should be 'shield'".

Apply this diff:

-    assert found_shield["type"] == "shield", "type should be 'model'"
+    assert found_shield["type"] == "shield", "type should be 'shield'"
🧹 Nitpick comments (1)
tests/e2e/features/environment.py (1)

24-45: Consider parameterizing hostname and port.

The function hardcodes hostname="localhost" and port=8080. While this likely matches your test setup, consider:

  1. Using the same configuration values that tests will use (e.g., from environment variables or a config file)
  2. Accepting these as parameters with defaults

This would improve flexibility if you need to test against different environments.

Apply this diff to parameterize the function:

-def _fetch_models_from_service(hostname: str = "localhost", port: int = 8080) -> dict:
+def _fetch_models_from_service(hostname: str = "localhost", port: int = 8080) -> dict:
     """Query /v1/models endpoint and return first LLM model.
+    
+    Args:
+        hostname: Service hostname (default: localhost)
+        port: Service port (default: 8080)
 
     Returns:
         Dict with model_id and provider_id, or empty dict if unavailable

Note: The function signature already has default parameters, so this is just a documentation improvement unless you want to read these from the environment.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3392b17 and 64f9602.

📒 Files selected for processing (10)
  • tests/e2e/features/conversations.feature (1 hunks)
  • tests/e2e/features/environment.py (1 hunks)
  • tests/e2e/features/info.feature (2 hunks)
  • tests/e2e/features/query.feature (3 hunks)
  • tests/e2e/features/steps/common_http.py (2 hunks)
  • tests/e2e/features/steps/conversation.py (2 hunks)
  • tests/e2e/features/steps/info.py (1 hunks)
  • tests/e2e/features/steps/llm_query_response.py (4 hunks)
  • tests/e2e/features/streaming_query.feature (3 hunks)
  • tests/e2e/utils/utils.py (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tests/e2e/features/conversations.feature
🧰 Additional context used
📓 Path-based instructions (4)
tests/e2e/features/**/*.feature

📄 CodeRabbit inference engine (CLAUDE.md)

Write E2E tests as Gherkin feature files for behave

Files:

  • tests/e2e/features/query.feature
  • tests/e2e/features/streaming_query.feature
  • tests/e2e/features/info.feature
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All modules start with descriptive module-level docstrings explaining purpose
Use logger = logging.getLogger(name) for module logging after import logging
Define type aliases at module level for clarity
All functions require docstrings with brief descriptions
Provide complete type annotations for all function parameters and return types
Use typing_extensions.Self in model validators where appropriate
Use modern union syntax (str | int) and Optional[T] or T | None consistently
Function names use snake_case with descriptive, action-oriented prefixes (get_, validate_, check_)
Avoid in-place parameter modification; return new data structures instead of mutating arguments
Use appropriate logging levels: debug, info, warning, error with clear messages
All classes require descriptive docstrings explaining purpose
Class names use PascalCase with conventional suffixes (Configuration, Error/Exception, Resolver, Interface)
Abstract base classes should use abc.ABC and @AbstractMethod for interfaces
Provide complete type annotations for all class attributes
Follow Google Python docstring style for modules, classes, and functions, including Args, Returns, Raises, Attributes sections as needed

Files:

  • tests/e2e/features/steps/info.py
  • tests/e2e/utils/utils.py
  • tests/e2e/features/steps/common_http.py
  • tests/e2e/features/steps/llm_query_response.py
  • tests/e2e/features/steps/conversation.py
  • tests/e2e/features/environment.py
tests/e2e/features/steps/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Place behave step definitions under tests/e2e/features/steps/

Files:

  • tests/e2e/features/steps/info.py
  • tests/e2e/features/steps/common_http.py
  • tests/e2e/features/steps/llm_query_response.py
  • tests/e2e/features/steps/conversation.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/**/*.py: Use pytest-mock to create AsyncMock objects for async interactions in tests
Use the shared auth mock constant: MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") in tests

Files:

  • tests/e2e/features/steps/info.py
  • tests/e2e/utils/utils.py
  • tests/e2e/features/steps/common_http.py
  • tests/e2e/features/steps/llm_query_response.py
  • tests/e2e/features/steps/conversation.py
  • tests/e2e/features/environment.py
🧬 Code graph analysis (3)
tests/e2e/features/steps/common_http.py (1)
tests/e2e/utils/utils.py (1)
  • replace_placeholders (147-160)
tests/e2e/features/steps/llm_query_response.py (1)
tests/e2e/utils/utils.py (1)
  • replace_placeholders (147-160)
tests/e2e/features/steps/conversation.py (1)
tests/e2e/utils/utils.py (1)
  • replace_placeholders (147-160)
⏰ 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). (2)
  • GitHub Check: e2e_tests (ci)
  • GitHub Check: e2e_tests (azure)
🔇 Additional comments (9)
tests/e2e/features/steps/common_http.py (1)

174-177: LGTM! Placeholder preprocessing enables dynamic test data.

The placeholder substitution is correctly applied before JSON parsing, with a defensive fallback to "{}". This enables test assertions to reference runtime-detected model and provider values.

tests/e2e/features/query.feature (1)

45-45: LGTM! Consistent parameterization across scenarios.

The placeholder usage for {MODEL} and {PROVIDER} is consistent across request payloads and expected error responses, enabling runtime-based test parameterization.

Also applies to: 79-79, 84-84, 92-92, 102-102

tests/e2e/features/steps/conversation.py (1)

113-116: LGTM! Consistent placeholder preprocessing pattern.

The implementation mirrors the pattern used in other step files, correctly replacing placeholders before parsing the expected conversation data.

tests/e2e/features/streaming_query.feature (1)

54-54: LGTM! Parameterization aligns with other feature files.

Placeholder usage is consistent with the pattern established in query.feature, covering both request payloads and expected validation errors.

Also applies to: 67-72, 79-79, 88-88

tests/e2e/features/info.feature (1)

50-65: LGTM! Shields endpoint coverage is comprehensive.

The new scenarios for the shields endpoint mirror the existing patterns for the models endpoint, including both success and error cases. The error handling scenario ensures proper behavior when llama-stack is unreachable.

tests/e2e/features/steps/llm_query_response.py (1)

28-32: LGTM! Consistent placeholder preprocessing with helpful debug output.

The placeholder replacement is correctly applied across all three step functions before JSON parsing. The added debug print statements will help troubleshoot test failures.

Also applies to: 43-47, 66-73

tests/e2e/features/environment.py (1)

53-63: Fallback aligns with test configuration. The fallback model gpt-4-turbo/openai is already defined in your e2e configs; no updates required.

tests/e2e/utils/utils.py (1)

147-160: No issues: replace_placeholders is safe to use after before_all. Context attributes (default_model, default_provider) are set unconditionally in the before_all hook, so no changes required.

tests/e2e/features/steps/info.py (1)

30-66: LGTM! Good generalization to runtime-discovered defaults.

The refactored model structure validation correctly finds the first LLM model and validates it against runtime-discovered default model and provider from context. The logic, assertions, and error messages are clear and appropriate.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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 (1)
tests/e2e/features/steps/info.py (1)

91-99: Consider using context variables for shield provider values.

The provider_id (line 92) and identifier (line 98) are hardcoded, which reduces test flexibility compared to check_model_structure that uses context.default_provider. If shield provider configuration changes, these hardcoded values would require code updates.

Consider adding shield-specific context variables (e.g., context.default_shield_provider) in environment.py and using them here, similar to how model validation works.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8f8273 and da4bbc5.

📒 Files selected for processing (1)
  • tests/e2e/features/steps/info.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All modules start with descriptive module-level docstrings explaining purpose
Use logger = logging.getLogger(name) for module logging after import logging
Define type aliases at module level for clarity
All functions require docstrings with brief descriptions
Provide complete type annotations for all function parameters and return types
Use typing_extensions.Self in model validators where appropriate
Use modern union syntax (str | int) and Optional[T] or T | None consistently
Function names use snake_case with descriptive, action-oriented prefixes (get_, validate_, check_)
Avoid in-place parameter modification; return new data structures instead of mutating arguments
Use appropriate logging levels: debug, info, warning, error with clear messages
All classes require descriptive docstrings explaining purpose
Class names use PascalCase with conventional suffixes (Configuration, Error/Exception, Resolver, Interface)
Abstract base classes should use abc.ABC and @AbstractMethod for interfaces
Provide complete type annotations for all class attributes
Follow Google Python docstring style for modules, classes, and functions, including Args, Returns, Raises, Attributes sections as needed

Files:

  • tests/e2e/features/steps/info.py
tests/e2e/features/steps/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Place behave step definitions under tests/e2e/features/steps/

Files:

  • tests/e2e/features/steps/info.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/**/*.py: Use pytest-mock to create AsyncMock objects for async interactions in tests
Use the shared auth mock constant: MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") in tests

Files:

  • tests/e2e/features/steps/info.py
⏰ 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: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)
  • GitHub Check: build-pr
🔇 Additional comments (2)
tests/e2e/features/steps/info.py (2)

68-76: LGTM! Function signature and initial validation are correct.

The step definition follows behave conventions with proper type annotations and docstring. The initial JSON and shields field validation logic is sound.


78-85: LGTM! Shield finding logic is correct.

The loop correctly filters shields by type and safely handles missing fields with .get(). The assertion message properly references "shield" (previous issue was addressed).

@radofuchs radofuchs force-pushed the LCORE_816_shields_e2e_tests branch from da4bbc5 to 324c286 Compare October 17, 2025 07:58
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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)
run.yaml (1)

134-153: Consider aligning shield and LLM model for consistency.

The shield's provider_shield_id references gpt-3.5-turbo (line 137), while the LLM model is gpt-4-turbo (line 150). While this configuration is syntactically valid and demonstrates flexibility, the E2E test validation in tests/e2e/features/steps/info.py expects the shield's provider_resource_id to match the default LLM model.

For consistency with the E2E test expectations and to serve as a clearer example configuration, consider using the same model ID for both.

Apply this diff to align the configurations:

-    provider_shield_id: "gpt-3.5-turbo"  # Model to use for safety checks
+    provider_shield_id: "gpt-4-turbo"  # Model to use for safety checks
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between da4bbc5 and 324c286.

📒 Files selected for processing (6)
  • run.yaml (1 hunks)
  • tests/e2e/configs/run-azure.yaml (1 hunks)
  • tests/e2e/configs/run-ci.yaml (1 hunks)
  • tests/e2e/configs/run-rhaiis.yaml (1 hunks)
  • tests/e2e/features/info.feature (2 hunks)
  • tests/e2e/features/steps/info.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/e2e/configs/run-ci.yaml
🧰 Additional context used
📓 Path-based instructions (4)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: All modules start with descriptive module-level docstrings explaining purpose
Use logger = logging.getLogger(name) for module logging after import logging
Define type aliases at module level for clarity
All functions require docstrings with brief descriptions
Provide complete type annotations for all function parameters and return types
Use typing_extensions.Self in model validators where appropriate
Use modern union syntax (str | int) and Optional[T] or T | None consistently
Function names use snake_case with descriptive, action-oriented prefixes (get_, validate_, check_)
Avoid in-place parameter modification; return new data structures instead of mutating arguments
Use appropriate logging levels: debug, info, warning, error with clear messages
All classes require descriptive docstrings explaining purpose
Class names use PascalCase with conventional suffixes (Configuration, Error/Exception, Resolver, Interface)
Abstract base classes should use abc.ABC and @AbstractMethod for interfaces
Provide complete type annotations for all class attributes
Follow Google Python docstring style for modules, classes, and functions, including Args, Returns, Raises, Attributes sections as needed

Files:

  • tests/e2e/features/steps/info.py
tests/e2e/features/steps/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Place behave step definitions under tests/e2e/features/steps/

Files:

  • tests/e2e/features/steps/info.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

tests/**/*.py: Use pytest-mock to create AsyncMock objects for async interactions in tests
Use the shared auth mock constant: MOCK_AUTH = ("mock_user_id", "mock_username", False, "mock_token") in tests

Files:

  • tests/e2e/features/steps/info.py
tests/e2e/features/**/*.feature

📄 CodeRabbit inference engine (CLAUDE.md)

Write E2E tests as Gherkin feature files for behave

Files:

  • tests/e2e/features/info.feature
⏰ 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: build-pr
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)
🔇 Additional comments (4)
tests/e2e/configs/run-azure.yaml (1)

123-131: LGTM! Shield configuration is consistent with model setup.

The shield configuration correctly references the Azure model gpt-4o-mini, which is also defined in the models section, ensuring consistency between the shield and inference providers.

tests/e2e/features/steps/info.py (1)

68-99: LGTM! Shield validation logic is comprehensive and well-structured.

The function properly validates the shield structure by checking JSON validity, field presence, and specific shield attributes. The validation approach mirrors the existing check_model_structure function, maintaining consistency across the test suite.

tests/e2e/features/info.feature (1)

50-54: LGTM! Shield endpoint test scenario is well-structured.

The scenario follows the established pattern for endpoint testing and correctly uses the new shield structure validation step.

tests/e2e/configs/run-rhaiis.yaml (1)

126-140: LGTM! Shield and model configuration is properly aligned.

The shield configuration correctly references meta-llama/Llama-3.1-8B-Instruct, which is defined as an LLM model in the configuration, ensuring consistency between safety and inference providers.



Scenario: Check if models endpoint is working
Scenario: Check if models endpoint reports error when llama-stack in unreachable
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix grammar error in scenario title.

The scenario title contains a grammar error: "llama-stack in unreachable" should be "llama-stack is unreachable".

Apply this diff:

-  Scenario: Check if models endpoint reports error when llama-stack in unreachable
+  Scenario: Check if models endpoint reports error when llama-stack is unreachable
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Scenario: Check if models endpoint reports error when llama-stack in unreachable
Scenario: Check if models endpoint reports error when llama-stack is unreachable
🤖 Prompt for AI Agents
In tests/e2e/features/info.feature around line 40, the scenario title contains a
grammar mistake ("llama-stack in unreachable"); change the word "in" to "is" so
the line reads "Scenario: Check if models endpoint reports error when
llama-stack is unreachable" and save the file.

And The body of the response has proper shield structure


Scenario: Check if shields endpoint reports error when llama-stack in unreachable
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix grammar error in scenario title.

The scenario title contains the same grammar error: "llama-stack in unreachable" should be "llama-stack is unreachable".

Apply this diff:

-  Scenario: Check if shields endpoint reports error when llama-stack in unreachable
+  Scenario: Check if shields endpoint reports error when llama-stack is unreachable
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Scenario: Check if shields endpoint reports error when llama-stack in unreachable
Scenario: Check if shields endpoint reports error when llama-stack is unreachable
🤖 Prompt for AI Agents
In tests/e2e/features/info.feature around line 57, the scenario title has a
grammar mistake "llama-stack in unreachable"; update the scenario line to read
"Scenario: Check if shields endpoint reports error when llama-stack is
unreachable" so the verb is correct.

Copy link
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

@tisnik tisnik merged commit 6feb4e3 into lightspeed-core:main Oct 17, 2025
18 of 20 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 29, 2025
18 tasks
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