Skip to content

LCORE-3141: model dumper for conversation summary - #2286

Merged
tisnik merged 2 commits into
lightspeed-core:mainfrom
tisnik:lcore-3141-conversation-summary-model-dump
Jul 29, 2026
Merged

LCORE-3141: model dumper for conversation summary#2286
tisnik merged 2 commits into
lightspeed-core:mainfrom
tisnik:lcore-3141-conversation-summary-model-dump

Conversation

@tisnik

@tisnik tisnik commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Description

LCORE-3141: model dumper for conversation summary

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-3141

Summary by CodeRabbit

  • New Features

    • Added support for selecting the conversation_summary model group when dumping models.
    • The new group outputs the Conversation Summary model schema.
  • Documentation

    • Updated CLI help documentation to include conversation_summary as an available model group.
  • Tests

    • Added coverage verifying model dumping for the new conversation summary group.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@tisnik, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: db0bc133-5e12-4136-be55-f29ef598f896

📥 Commits

Reviewing files that changed from the base of the PR and between 7b72e96 and 9e169f6.

📒 Files selected for processing (3)
  • README.md
  • src/utils/models_dumper.py
  • tests/unit/utils/test_models_dumper.py

Walkthrough

The --dump-models-group CLI option and model dumper now support conversation_summary, with documentation and unit-test coverage for the ConversationSummary schema output.

Changes

Conversation summary model group

Layer / File(s) Summary
CLI group option
README.md, src/lightspeed_stack.py
Documents and accepts conversation_summary as a valid --dump-models-group value.
Model-group routing and validation
src/utils/models_dumper.py, tests/unit/utils/test_models_dumper.py
Routes conversation_summary to conversation_summary_models and verifies that only the ConversationSummary schema is dumped; existing test names are simplified.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Issue 2265 — Updates the same model-group CLI documentation, though it addresses a different aspect of the option.

Possibly related PRs

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding model dumping support for conversation summaries.
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 PASS: Added a constant model group and a direct match branch only; no new loops, N+1 patterns, pagination gaps, or unbounded buffers.
Security And Secret Handling ✅ Passed PASS: The PR only adds a new model-group enum/test coverage; no secrets, auth, injection, or sensitive-data logging/response changes were introduced.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 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: 1

🤖 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 `@tests/unit/utils/test_models_dumper.py`:
- Around line 9582-9590: Strengthen test_dump_models_conversation_summary by
asserting that the dumped schema set is exactly {"ConversationSummary"}, rather
than relying only on check_json_file_content’s presence check. Reuse the
existing filename and expected_schemas values, and ensure any additional dumped
schemas cause the test to fail.
🪄 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 Plus

Run ID: 9c98c9ca-1fba-43a9-b4ae-71c275d6b803

📥 Commits

Reviewing files that changed from the base of the PR and between 2a9c8a7 and 7b72e96.

📒 Files selected for processing (4)
  • README.md
  • src/lightspeed_stack.py
  • src/utils/models_dumper.py
  • tests/unit/utils/test_models_dumper.py
📜 Review details
⏰ Context from checks skipped due to timeout. (12)
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: build-pr
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-7-on-pull-request
⚠️ CI failures not shown inline (1)

GitHub Actions: Python linter / Pylinter: LCORE-3141: model dumper for conversation summary

Conclusion: failure

View job details

##[group]Run uv run pylint src tests
 �[36;1muv run pylint src tests�[0m
 shell: /usr/bin/bash -e {0}
 env:
   UV_PYTHON: 3.12
   VIRTUAL_ENV: /home/runner/work/lightspeed-stack/lightspeed-stack/.venv
   UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
 ##[endgroup]
 ************* Module utils.models_dumper
 src/utils/models_dumper.py:181:0: R0911: Too many return statements (7/6) (too-many-return-statements)
 ------------------------------------
 Your code has been rated at 10.00/10
 ##[error]Process completed with exit code 8.
🧰 Additional context used
📓 Path-based instructions (3)
**/*

📄 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:

  • README.md
  • src/lightspeed_stack.py
  • src/utils/models_dumper.py
  • tests/unit/utils/test_models_dumper.py
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Use absolute imports for internal Python modules.
All modules must begin with descriptive docstrings explaining their purpose.
Use logger = get_logger(__name__) from log.py for module logging.
Use complete type annotations for function parameters and return types.
Use modern union syntax such as str | int; use Optional[Type] for optional values.
Use typing_extensions.Self for model validators.
Functions must use descriptive, action-oriented snake_case names such as get_, validate_, and check_.
Avoid modifying mutable parameters in place; return a new data structure instead.
Use async def for I/O operations and external API calls.
Handle APIConnectionError from Llama Stack.
All classes must have descriptive docstrings and complete type annotations for class attributes; use specific types instead of Any.
Use PascalCase for classes and descriptive standard suffixes such as Configuration, Error/Exception, Resolver, and Interface.
Use ABC and @abstractmethod for abstract interfaces.
Follow Google Python docstring conventions; document all modules, classes, and functions, including Parameters, Returns, Raises, and Attributes sections as applicable.
Never commit secrets or keys; use environment variables for sensitive data.

Files:

  • src/lightspeed_stack.py
  • src/utils/models_dumper.py
  • tests/unit/utils/test_models_dumper.py
tests/unit/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

tests/unit/**/*.py: Use pytest for all unit tests; do not use unittest.
Use conftest.py for shared fixtures, pytest-mock for AsyncMock objects, and pytest.mark.asyncio for asynchronous tests.

Files:

  • tests/unit/utils/test_models_dumper.py
🧠 Learnings (3)
📚 Learning: 2026-06-24T13:45:37.249Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 1971
File: src/utils/markdown_repair.py:31-36
Timestamp: 2026-06-24T13:45:37.249Z
Learning: In the lightspeed-stack repository, docstrings must use the section header name "Parameters:" (not "Args:") for function arguments, even if the project references Google Python docstring conventions. Ensure docstrings follow the project’s established "Parameters:" header format for any documented function parameters.

Applied to files:

  • src/lightspeed_stack.py
  • src/utils/models_dumper.py
  • tests/unit/utils/test_models_dumper.py
📚 Learning: 2026-07-06T15:26:18.398Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 2071
File: src/models/config.py:2416-2422
Timestamp: 2026-07-06T15:26:18.398Z
Learning: In this repo’s Python code under src/**, don’t treat differences in string concatenation style as a style inconsistency when Black has effectively forced (or made clearer) use of explicit `+` string concatenation in multi-line logger/string expressions. If adjacent-literal implicit concatenation is avoided/changed specifically to accommodate Black’s formatting in these call sites, accept the `+` usage and don’t recommend converting it solely for consistency with nearby blocks that use implicit concatenation.

Applied to files:

  • src/lightspeed_stack.py
  • src/utils/models_dumper.py
📚 Learning: 2026-07-17T19:25:05.325Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 2166
File: src/utils/saved_prompts.py:129-157
Timestamp: 2026-07-17T19:25:05.325Z
Learning: For any endpoint that handles saved prompts and calls `src/utils/saved_prompts.py::create_saved_prompt`, treat the endpoint as the validation boundary. Before calling `create_saved_prompt`, validate the incoming saved-prompt name and content, specifically using `validate_saved_prompt_name` and then persist (store) the normalized value it returns. Do not call `create_saved_prompt` with unvalidated/raw name/content.

Applied to files:

  • src/lightspeed_stack.py
  • src/utils/models_dumper.py
🪛 GitHub Actions: Python linter / 0_Pylinter.txt
src/utils/models_dumper.py

[error] 181-181: pylint failed with R0911: Too many return statements (7/6) (too-many-return-statements). Step: "uv run pylint src tests".

🪛 GitHub Actions: Python linter / Pylinter
src/utils/models_dumper.py

[error] 181-181: pylint: R0911: Too many return statements (7/6) (too-many-return-statements)

🔇 Additional comments (4)
README.md (1)

863-864: LGTM!

src/lightspeed_stack.py (1)

31-32: LGTM!

Also applies to: 82-84

src/utils/models_dumper.py (1)

185-186: LGTM!

Also applies to: 206-207

tests/unit/utils/test_models_dumper.py (1)

9509-9539: LGTM!

Also applies to: 9542-9565, 9568-9579

Comment thread tests/unit/utils/test_models_dumper.py
@tisnik
tisnik force-pushed the lcore-3141-conversation-summary-model-dump branch from 7b72e96 to 9e169f6 Compare July 29, 2026 16:15
@tisnik
tisnik merged commit 90db866 into lightspeed-core:main Jul 29, 2026
31 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