Skip to content

LCORE-2933: Cleanup #2#2173

Merged
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-2933-cleanup-2
Jul 19, 2026
Merged

LCORE-2933: Cleanup #2#2173
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-2933-cleanup-2

Conversation

@tisnik

@tisnik tisnik commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Description

LCORE-2933: Cleanup #2

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
  • Benchmarks improvement

Tools used to create PR

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-2933

Summary by CodeRabbit

  • Documentation
    • Added developer documentation for the Query and Streaming Query endpoints, including request-flow diagrams.
    • Updated API and testing navigation links.
    • Added comprehensive guides for unit, integration, and end-to-end testing.
    • Added an indexed list of end-to-end test scenarios.
    • Documented test execution, configuration, conventions, troubleshooting, and best practices.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 51729815-077e-4717-a8f1-ba242187ee14

📥 Commits

Reviewing files that changed from the base of the PR and between f70cc89 and 3e4431b.

⛔ Files ignored due to path filters (4)
  • docs/devel_doc/conversation_history.svg is excluded by !**/*.svg
  • docs/devel_doc/core2llama-stack_interface.png is excluded by !**/*.png
  • docs/devel_doc/query_endpoint.svg is excluded by !**/*.svg
  • docs/devel_doc/streaming_query_endpoint.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • docs/README.md
  • docs/devel_doc/query_endpoint.md
  • docs/devel_doc/query_endpoint.puml
  • docs/devel_doc/streaming_query_endpoint.md
  • docs/devel_doc/streaming_query_endpoint.puml
  • docs/index.md
  • docs/testing/e2e_scenarios.md
  • docs/testing/e2e_testing.md
  • docs/testing/testing.md
📜 Recent review details
⏰ Context from checks skipped due to timeout. (13)
  • GitHub Check: Pyright
  • GitHub Check: Pylinter
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: build-pr
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
🧰 Additional context used
📓 Path-based instructions (1)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Files:

  • docs/devel_doc/query_endpoint.md
  • docs/devel_doc/streaming_query_endpoint.puml
  • docs/devel_doc/streaming_query_endpoint.md
  • docs/devel_doc/query_endpoint.puml
  • docs/index.md
  • docs/README.md
  • docs/testing/e2e_scenarios.md
  • docs/testing/testing.md
  • docs/testing/e2e_testing.md
🪛 LanguageTool
docs/devel_doc/streaming_query_endpoint.md

[grammar] ~1-~1: Ensure spelling is correct
Context: # Streaming auery endpoint Streaming query endpoint

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/testing/testing.md

[grammar] ~33-~33: Use a hyphen to join words.
Context: ...it tests followed by integration and end to end tests can be started by using the fo...

(QB_NEW_EN_HYPHEN)


[grammar] ~138-~138: Use a hyphen to join words.
Context: ...k/tree/main/tests/integration) ## End to end tests End to end tests are based on...

(QB_NEW_EN_HYPHEN)


[grammar] ~140-~140: Use a hyphen to join words.
Context: ...integration) ## End to end tests End to end tests are based on [Behave](https://...

(QB_NEW_EN_HYPHEN)

docs/testing/e2e_testing.md

[style] ~120-~120: To elevate your writing, try using an alternative expression here.
Context: ... is in tests/e2e/test_list.txt. Order matters for execution. - *Excluding scenarios...

(MATTERS_RELEVANT)


[style] ~209-~209: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ..., RHIdentity, Feedback, MCP. - **before_scenario**: Skips scenarios for @skip`...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~220-~220: Consider using the synonym “brief” (= concise, using a few words, not lasting long) to strengthen your wording.
Context: ...ests/e2e/configuration/README.md` for a short description of each config. --- ## Fe...

(QUICK_BRIEF)


[style] ~274-~274: Try using a synonym here to strengthen your writing.
Context: ... | Background: then Given The service is started locally | | **S...

(GIVE_PROVIDE)

🪛 markdownlint-cli2 (0.23.0)
docs/testing/testing.md

[warning] 81-81: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/testing/e2e_testing.md

[warning] 36-36: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 68-68: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🛑 Comments failed to post (9)
docs/devel_doc/streaming_query_endpoint.md (1)

1-1: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix typographical error in the heading.

The word "auery" should be corrected to "query".

📝 Proposed fix
-# Streaming auery endpoint
+# Streaming query endpoint
📝 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.

# Streaming query endpoint
🧰 Tools
🪛 LanguageTool

[grammar] ~1-~1: Ensure spelling is correct
Context: # Streaming auery endpoint Streaming query endpoint

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/devel_doc/streaming_query_endpoint.md` at line 1, Correct the
typographical error in the document heading by changing “auery” to “query.”

Source: Linters/SAST tools

docs/devel_doc/streaming_query_endpoint.puml (1)

10-10: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the endpoint path in the diagram.

The actual endpoint path defined in the codebase is /streaming_query, rather than /stream_query.

📝 Proposed fix
-Client->>Endpoint: HTTP POST /stream_query
+Client->>Endpoint: HTTP POST /streaming_query
📝 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.

Client->>Endpoint: HTTP POST /streaming_query
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/devel_doc/streaming_query_endpoint.puml` at line 10, Update the HTTP
POST endpoint label in the streaming query diagram from /stream_query to
/streaming_query, matching the path defined by the implementation.
docs/testing/e2e_testing.md (3)

38-38: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the README path shown in the directory tree.

This file is docs/testing/e2e_testing.md, but the comment points readers to docs/e2e_testing.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/e2e_testing.md` at line 38, Correct the README directory-tree
comment to reference docs/testing/e2e_testing.md instead of the nonexistent
docs/e2e_testing.md, preserving the existing pointer description.

173-183: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the implemented @skip-in-server-mode tag.

tests/e2e/features/environment.py skips scenarios with this tag, but the guide only documents @skip-in-library-mode. Add the server-mode behavior to the tag table and hook summary so authors do not misconfigure mode-specific scenarios.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/e2e_testing.md` around lines 173 - 183, Update the Scenario Tags
table and related hook summary in the e2e testing guide to document the
implemented `@skip-in-server-mode` tag, including that scenarios using it are
skipped when E2E_DEPLOYMENT_MODE=server. Keep the existing `@skip-in-library-mode`
documentation unchanged and clearly distinguish the two deployment modes.

224-247: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the E2E feature inventories synchronized.

The two indexes disagree with the documented suite: proxy.feature is missing from the guide’s feature table, while mcp.feature is missing from the scenario index.

  • docs/testing/e2e_testing.md#L224-L247: add proxy.feature to the feature-file table, or explicitly define why it is excluded.
  • docs/testing/e2e_scenarios.md#L119-L127: add a linked mcp.feature section with its scenarios.
📍 Affects 2 files
  • docs/testing/e2e_testing.md#L224-L247 (this comment)
  • docs/testing/e2e_scenarios.md#L119-L127
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/e2e_testing.md` around lines 224 - 247, The E2E feature
inventories are out of sync. In docs/testing/e2e_testing.md, add proxy.feature
to the feature-file table or explicitly document its exclusion; in
docs/testing/e2e_scenarios.md, add a linked mcp.feature section listing its
scenarios, keeping both indexes aligned with the documented suite.
docs/testing/testing.md (4)

44-46: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the duplicated word in the test command list.

Line [45] says integration tests tests, which makes the documented command list look unfinished.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/testing.md` around lines 44 - 46, Update the description for the
make test-integration command in the test command list to remove the duplicated
“tests,” leaving a concise “Run integration tests” description.

64-72: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Clarify that only unittest.mock is used.

The guide says the “unittest framework” is used for mocking, then advises not to mix pytest and unittest modules. This is contradictory and may lead authors to use unittest.TestCase; document unittest.mock specifically instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/testing.md` around lines 64 - 72, Update the Unit tests section
to state that only unittest.mock is used for mocking and patching, not the
broader unittest framework or unittest.TestCase. Keep the existing pytest
guidance and warning against mixing pytest with unittest modules consistent with
this clarification.

194-207: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Capture stdout and stderr in one capsys.readouterr() call.

readouterr() clears both buffers. The second call at Line [206] therefore cannot verify the stderr produced alongside the stdout captured at Line [204].

Proposed fix
-    captured_out = capsys.readouterr().out
-    assert captured_out == "Output printed by foobar function"
-    captured_err = capsys.readouterr().err
+    captured = capsys.readouterr()
+    assert captured.out == "Output printed by foobar function"
+    captured_err = captured.err
     assert captured_err == ""
📝 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.

#### Checking what was printed and logged to stdout or stderr by the tested code

It is possible to capture stdout and stderr by using standard fixture `capsys`:

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/testing.md` around lines 194 - 207, Update the test example
around capsys.readouterr() to call it once, store the returned capture, and
assert both stdout and stderr from that same result. Preserve the existing
expected output and empty-error assertions.

210-216: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Remove the unmatched mock_load_dotenv parameter.

patch.dict does not inject a mock argument, so the documented test will make pytest search for a nonexistent mock_load_dotenv fixture.

Proposed fix
 `@patch.dict`(os.environ, {"LOG_LEVEL": "INFO"})
-def test_logger_show_message_flag(mock_load_dotenv, capsys):
+def test_logger_show_message_flag(capsys):
📝 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.

Capturing logs:

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/testing.md` around lines 210 - 216, Remove the unmatched
mock_load_dotenv parameter from the test_logger_show_message_flag example; keep
the `@patch.dict` environment override and the test body unchanged.
🔇 Additional comments (14)
docs/devel_doc/query_endpoint.md (1)

1-4: LGTM!

docs/devel_doc/query_endpoint.puml (1)

1-43: LGTM!

docs/testing/testing.md (3)

1-43: LGTM!


51-63: LGTM!


76-192: LGTM!

docs/testing/e2e_testing.md (5)

1-36: LGTM!


40-106: LGTM!


123-168: LGTM!


184-223: LGTM!


250-359: LGTM!

docs/testing/e2e_scenarios.md (2)

1-118: LGTM!


129-189: LGTM!

docs/README.md (1)

87-90: LGTM!

Also applies to: 107-111

docs/index.md (1)

94-96: LGTM!

Also applies to: 114-118


Walkthrough

New query and streaming endpoint documentation, complete testing guides, an end-to-end scenario index, and updated navigation links are added under docs/.

Changes

Documentation updates

Layer / File(s) Summary
Endpoint documentation
docs/devel_doc/query_endpoint.*, docs/devel_doc/streaming_query_endpoint.*
Adds endpoint pages and PlantUML diagrams covering query processing, streaming events, persistence, caching, and error branches.
Testing guides
docs/testing/testing.md, docs/testing/e2e_testing.md, docs/testing/e2e_scenarios.md
Documents test commands, test layers, Behave execution, configuration, tags, Gherkin conventions, scenario authoring, feature coverage, and troubleshooting.
Documentation navigation
docs/README.md, docs/index.md
Adds endpoint links and updates testing links to the dedicated testing pages and scenario index.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is generic and doesn't describe the documentation changes, so it isn't clear what was updated. Rename it to mention the main documentation updates, such as adding Query/Streaming query docs and refreshed testing pages.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Performance And Algorithmic Complexity ✅ Passed Docs-only changes; no executable code or API logic was altered, and no O(n^2), N+1, unbounded growth, or pagination issues appear in the diff.
Security And Secret Handling ✅ Passed PR only updates docs; no hardcoded secrets, auth gaps, injection paths, sensitive leaks, or K8s Secret/OwnerReference issues appear in the modified files.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/devel_doc/streaming_query_endpoint.md`:
- Line 1: Correct the typographical error in the document heading by changing
“auery” to “query.”

In `@docs/devel_doc/streaming_query_endpoint.puml`:
- Line 10: Update the HTTP POST endpoint label in the streaming query diagram
from /stream_query to /streaming_query, matching the path defined by the
implementation.

In `@docs/testing/e2e_testing.md`:
- Line 38: Correct the README directory-tree comment to reference
docs/testing/e2e_testing.md instead of the nonexistent docs/e2e_testing.md,
preserving the existing pointer description.
- Around line 173-183: Update the Scenario Tags table and related hook summary
in the e2e testing guide to document the implemented `@skip-in-server-mode` tag,
including that scenarios using it are skipped when E2E_DEPLOYMENT_MODE=server.
Keep the existing `@skip-in-library-mode` documentation unchanged and clearly
distinguish the two deployment modes.
- Around line 224-247: The E2E feature inventories are out of sync. In
docs/testing/e2e_testing.md, add proxy.feature to the feature-file table or
explicitly document its exclusion; in docs/testing/e2e_scenarios.md, add a
linked mcp.feature section listing its scenarios, keeping both indexes aligned
with the documented suite.

In `@docs/testing/testing.md`:
- Around line 44-46: Update the description for the make test-integration
command in the test command list to remove the duplicated “tests,” leaving a
concise “Run integration tests” description.
- Around line 64-72: Update the Unit tests section to state that only
unittest.mock is used for mocking and patching, not the broader unittest
framework or unittest.TestCase. Keep the existing pytest guidance and warning
against mixing pytest with unittest modules consistent with this clarification.
- Around line 194-207: Update the test example around capsys.readouterr() to
call it once, store the returned capture, and assert both stdout and stderr from
that same result. Preserve the existing expected output and empty-error
assertions.
- Around line 210-216: Remove the unmatched mock_load_dotenv parameter from the
test_logger_show_message_flag example; keep the `@patch.dict` environment override
and the test body unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 51729815-077e-4717-a8f1-ba242187ee14

📥 Commits

Reviewing files that changed from the base of the PR and between f70cc89 and 3e4431b.

⛔ Files ignored due to path filters (4)
  • docs/devel_doc/conversation_history.svg is excluded by !**/*.svg
  • docs/devel_doc/core2llama-stack_interface.png is excluded by !**/*.png
  • docs/devel_doc/query_endpoint.svg is excluded by !**/*.svg
  • docs/devel_doc/streaming_query_endpoint.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • docs/README.md
  • docs/devel_doc/query_endpoint.md
  • docs/devel_doc/query_endpoint.puml
  • docs/devel_doc/streaming_query_endpoint.md
  • docs/devel_doc/streaming_query_endpoint.puml
  • docs/index.md
  • docs/testing/e2e_scenarios.md
  • docs/testing/e2e_testing.md
  • docs/testing/testing.md
📜 Review details
⏰ Context from checks skipped due to timeout. (13)
  • GitHub Check: Pyright
  • GitHub Check: Pylinter
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: build-pr
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
🧰 Additional context used
📓 Path-based instructions (1)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Files:

  • docs/devel_doc/query_endpoint.md
  • docs/devel_doc/streaming_query_endpoint.puml
  • docs/devel_doc/streaming_query_endpoint.md
  • docs/devel_doc/query_endpoint.puml
  • docs/index.md
  • docs/README.md
  • docs/testing/e2e_scenarios.md
  • docs/testing/testing.md
  • docs/testing/e2e_testing.md
🪛 LanguageTool
docs/devel_doc/streaming_query_endpoint.md

[grammar] ~1-~1: Ensure spelling is correct
Context: # Streaming auery endpoint Streaming query endpoint

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/testing/testing.md

[grammar] ~33-~33: Use a hyphen to join words.
Context: ...it tests followed by integration and end to end tests can be started by using the fo...

(QB_NEW_EN_HYPHEN)


[grammar] ~138-~138: Use a hyphen to join words.
Context: ...k/tree/main/tests/integration) ## End to end tests End to end tests are based on...

(QB_NEW_EN_HYPHEN)


[grammar] ~140-~140: Use a hyphen to join words.
Context: ...integration) ## End to end tests End to end tests are based on [Behave](https://...

(QB_NEW_EN_HYPHEN)

docs/testing/e2e_testing.md

[style] ~120-~120: To elevate your writing, try using an alternative expression here.
Context: ... is in tests/e2e/test_list.txt. Order matters for execution. - *Excluding scenarios...

(MATTERS_RELEVANT)


[style] ~209-~209: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ..., RHIdentity, Feedback, MCP. - **before_scenario**: Skips scenarios for @skip`...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~220-~220: Consider using the synonym “brief” (= concise, using a few words, not lasting long) to strengthen your wording.
Context: ...ests/e2e/configuration/README.md` for a short description of each config. --- ## Fe...

(QUICK_BRIEF)


[style] ~274-~274: Try using a synonym here to strengthen your writing.
Context: ... | Background: then Given The service is started locally | | **S...

(GIVE_PROVIDE)

🪛 markdownlint-cli2 (0.23.0)
docs/testing/testing.md

[warning] 81-81: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/testing/e2e_testing.md

[warning] 36-36: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 68-68: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (14)
docs/devel_doc/query_endpoint.md (1)

1-4: LGTM!

docs/devel_doc/query_endpoint.puml (1)

1-43: LGTM!

docs/testing/testing.md (3)

1-43: LGTM!


51-63: LGTM!


76-192: LGTM!

docs/testing/e2e_testing.md (5)

1-36: LGTM!


40-106: LGTM!


123-168: LGTM!


184-223: LGTM!


250-359: LGTM!

docs/testing/e2e_scenarios.md (2)

1-118: LGTM!


129-189: LGTM!

docs/README.md (1)

87-90: LGTM!

Also applies to: 107-111

docs/index.md (1)

94-96: LGTM!

Also applies to: 114-118

@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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/devel_doc/streaming_query_endpoint.md`:
- Line 1: Correct the typographical error in the document heading by changing
“auery” to “query.”

In `@docs/devel_doc/streaming_query_endpoint.puml`:
- Line 10: Update the HTTP POST endpoint label in the streaming query diagram
from /stream_query to /streaming_query, matching the path defined by the
implementation.

In `@docs/testing/e2e_testing.md`:
- Line 38: Correct the README directory-tree comment to reference
docs/testing/e2e_testing.md instead of the nonexistent docs/e2e_testing.md,
preserving the existing pointer description.
- Around line 173-183: Update the Scenario Tags table and related hook summary
in the e2e testing guide to document the implemented `@skip-in-server-mode` tag,
including that scenarios using it are skipped when E2E_DEPLOYMENT_MODE=server.
Keep the existing `@skip-in-library-mode` documentation unchanged and clearly
distinguish the two deployment modes.
- Around line 224-247: The E2E feature inventories are out of sync. In
docs/testing/e2e_testing.md, add proxy.feature to the feature-file table or
explicitly document its exclusion; in docs/testing/e2e_scenarios.md, add a
linked mcp.feature section listing its scenarios, keeping both indexes aligned
with the documented suite.

In `@docs/testing/testing.md`:
- Around line 44-46: Update the description for the make test-integration
command in the test command list to remove the duplicated “tests,” leaving a
concise “Run integration tests” description.
- Around line 64-72: Update the Unit tests section to state that only
unittest.mock is used for mocking and patching, not the broader unittest
framework or unittest.TestCase. Keep the existing pytest guidance and warning
against mixing pytest with unittest modules consistent with this clarification.
- Around line 194-207: Update the test example around capsys.readouterr() to
call it once, store the returned capture, and assert both stdout and stderr from
that same result. Preserve the existing expected output and empty-error
assertions.
- Around line 210-216: Remove the unmatched mock_load_dotenv parameter from the
test_logger_show_message_flag example; keep the `@patch.dict` environment override
and the test body unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 51729815-077e-4717-a8f1-ba242187ee14

📥 Commits

Reviewing files that changed from the base of the PR and between f70cc89 and 3e4431b.

⛔ Files ignored due to path filters (4)
  • docs/devel_doc/conversation_history.svg is excluded by !**/*.svg
  • docs/devel_doc/core2llama-stack_interface.png is excluded by !**/*.png
  • docs/devel_doc/query_endpoint.svg is excluded by !**/*.svg
  • docs/devel_doc/streaming_query_endpoint.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • docs/README.md
  • docs/devel_doc/query_endpoint.md
  • docs/devel_doc/query_endpoint.puml
  • docs/devel_doc/streaming_query_endpoint.md
  • docs/devel_doc/streaming_query_endpoint.puml
  • docs/index.md
  • docs/testing/e2e_scenarios.md
  • docs/testing/e2e_testing.md
  • docs/testing/testing.md
📜 Review details
🔇 Additional comments (14)
docs/devel_doc/query_endpoint.md (1)

1-4: LGTM!

docs/devel_doc/query_endpoint.puml (1)

1-43: LGTM!

docs/testing/testing.md (3)

1-43: LGTM!


51-63: LGTM!


76-192: LGTM!

docs/testing/e2e_testing.md (5)

1-36: LGTM!


40-106: LGTM!


123-168: LGTM!


184-223: LGTM!


250-359: LGTM!

docs/testing/e2e_scenarios.md (2)

1-118: LGTM!


129-189: LGTM!

docs/README.md (1)

87-90: LGTM!

Also applies to: 107-111

docs/index.md (1)

94-96: LGTM!

Also applies to: 114-118

🛑 Comments failed to post (9)
docs/devel_doc/streaming_query_endpoint.md (1)

1-1: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix typographical error in the heading.

The word "auery" should be corrected to "query".

📝 Proposed fix
-# Streaming auery endpoint
+# Streaming query endpoint
📝 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.

# Streaming query endpoint
🧰 Tools
🪛 LanguageTool

[grammar] ~1-~1: Ensure spelling is correct
Context: # Streaming auery endpoint Streaming query endpoint

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/devel_doc/streaming_query_endpoint.md` at line 1, Correct the
typographical error in the document heading by changing “auery” to “query.”

Source: Linters/SAST tools

docs/devel_doc/streaming_query_endpoint.puml (1)

10-10: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the endpoint path in the diagram.

The actual endpoint path defined in the codebase is /streaming_query, rather than /stream_query.

📝 Proposed fix
-Client->>Endpoint: HTTP POST /stream_query
+Client->>Endpoint: HTTP POST /streaming_query
📝 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.

Client->>Endpoint: HTTP POST /streaming_query
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/devel_doc/streaming_query_endpoint.puml` at line 10, Update the HTTP
POST endpoint label in the streaming query diagram from /stream_query to
/streaming_query, matching the path defined by the implementation.
docs/testing/e2e_testing.md (3)

38-38: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the README path shown in the directory tree.

This file is docs/testing/e2e_testing.md, but the comment points readers to docs/e2e_testing.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/e2e_testing.md` at line 38, Correct the README directory-tree
comment to reference docs/testing/e2e_testing.md instead of the nonexistent
docs/e2e_testing.md, preserving the existing pointer description.

173-183: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the implemented @skip-in-server-mode tag.

tests/e2e/features/environment.py skips scenarios with this tag, but the guide only documents @skip-in-library-mode. Add the server-mode behavior to the tag table and hook summary so authors do not misconfigure mode-specific scenarios.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/e2e_testing.md` around lines 173 - 183, Update the Scenario Tags
table and related hook summary in the e2e testing guide to document the
implemented `@skip-in-server-mode` tag, including that scenarios using it are
skipped when E2E_DEPLOYMENT_MODE=server. Keep the existing `@skip-in-library-mode`
documentation unchanged and clearly distinguish the two deployment modes.

224-247: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the E2E feature inventories synchronized.

The two indexes disagree with the documented suite: proxy.feature is missing from the guide’s feature table, while mcp.feature is missing from the scenario index.

  • docs/testing/e2e_testing.md#L224-L247: add proxy.feature to the feature-file table, or explicitly define why it is excluded.
  • docs/testing/e2e_scenarios.md#L119-L127: add a linked mcp.feature section with its scenarios.
📍 Affects 2 files
  • docs/testing/e2e_testing.md#L224-L247 (this comment)
  • docs/testing/e2e_scenarios.md#L119-L127
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/e2e_testing.md` around lines 224 - 247, The E2E feature
inventories are out of sync. In docs/testing/e2e_testing.md, add proxy.feature
to the feature-file table or explicitly document its exclusion; in
docs/testing/e2e_scenarios.md, add a linked mcp.feature section listing its
scenarios, keeping both indexes aligned with the documented suite.
docs/testing/testing.md (4)

44-46: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the duplicated word in the test command list.

Line [45] says integration tests tests, which makes the documented command list look unfinished.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/testing.md` around lines 44 - 46, Update the description for the
make test-integration command in the test command list to remove the duplicated
“tests,” leaving a concise “Run integration tests” description.

64-72: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Clarify that only unittest.mock is used.

The guide says the “unittest framework” is used for mocking, then advises not to mix pytest and unittest modules. This is contradictory and may lead authors to use unittest.TestCase; document unittest.mock specifically instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/testing.md` around lines 64 - 72, Update the Unit tests section
to state that only unittest.mock is used for mocking and patching, not the
broader unittest framework or unittest.TestCase. Keep the existing pytest
guidance and warning against mixing pytest with unittest modules consistent with
this clarification.

194-207: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Capture stdout and stderr in one capsys.readouterr() call.

readouterr() clears both buffers. The second call at Line [206] therefore cannot verify the stderr produced alongside the stdout captured at Line [204].

Proposed fix
-    captured_out = capsys.readouterr().out
-    assert captured_out == "Output printed by foobar function"
-    captured_err = capsys.readouterr().err
+    captured = capsys.readouterr()
+    assert captured.out == "Output printed by foobar function"
+    captured_err = captured.err
     assert captured_err == ""
📝 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.

#### Checking what was printed and logged to stdout or stderr by the tested code

It is possible to capture stdout and stderr by using standard fixture `capsys`:

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/testing.md` around lines 194 - 207, Update the test example
around capsys.readouterr() to call it once, store the returned capture, and
assert both stdout and stderr from that same result. Preserve the existing
expected output and empty-error assertions.

210-216: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Remove the unmatched mock_load_dotenv parameter.

patch.dict does not inject a mock argument, so the documented test will make pytest search for a nonexistent mock_load_dotenv fixture.

Proposed fix
 `@patch.dict`(os.environ, {"LOG_LEVEL": "INFO"})
-def test_logger_show_message_flag(mock_load_dotenv, capsys):
+def test_logger_show_message_flag(capsys):
📝 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.

Capturing logs:

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing/testing.md` around lines 210 - 216, Remove the unmatched
mock_load_dotenv parameter from the test_logger_show_message_flag example; keep
the `@patch.dict` environment override and the test body unchanged.

@tisnik
tisnik merged commit 05a32a4 into lightspeed-core:main Jul 19, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant