Skip to content

Conversation

@onmete
Copy link
Contributor

@onmete onmete commented Oct 17, 2025

Description

Drop obsolete query_is_valid. It is a compatibility item for OLS, but has no use for that.

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 #
  • Closes #

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

  • Documentation

    • Updated transcript data structure documentation to reflect simplified schema.
  • Refactor

    • Streamlined transcript storage by removing validation flag parameter from query handling and storage layers.
  • Tests

    • Updated unit tests to align with revised transcript storage interface across query and streaming endpoints.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

This PR removes the query_is_valid parameter from the transcript storage pipeline, including the function signature in store_transcript, all call sites across query and streaming endpoints, test fixtures, and documentation. The removal is applied consistently throughout the codebase without altering other functionality.

Changes

Cohort / File(s) Summary
Documentation
docs/user_data_collection.md
Removed query_is_valid field from the documented JSON schema for transcript data structure.
Core Utility
src/utils/transcripts.py
Removed query_is_valid parameter from store_transcript function signature, its docstring, and the stored data dictionary.
Endpoint Implementations
src/app/endpoints/query.py, src/app/endpoints/streaming_query.py
Removed query_is_valid=True argument from store_transcript call sites in query and streaming response generation flows.
Unit Tests
tests/unit/app/endpoints/test_query.py, tests/unit/app/endpoints/test_streaming_query.py, tests/unit/utils/test_transcripts.py
Removed query_is_valid parameter from store_transcript calls and assertions; updated mock/expected transcript payloads to exclude the field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

The changes follow a consistent, homogeneous pattern of parameter removal across multiple files. Logic remains unchanged; only function signatures, call sites, and test assertions are updated.

Possibly related PRs

  • lightspeed-core/lightspeed-stack#380: Also modifies the transcript storage API by adding model_id/provider_id parameters to store_transcript and its call sites—directly related to this PR's parameter refactoring.
  • lightspeed-core/lightspeed-stack#404: Previously introduced store_transcript/TurnSummary structure that included query_is_valid; this PR removes that parameter as a follow-up refactor.

Suggested reviewers

  • manstis
  • tisnik

Poem

🐰 A parameter departs with grace,
Query validity leaves no trace,
Transcripts lighter, cleaner still,
Simplified by developer's skill,
Hop along to simpler ways! ✨

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 "Drop obsolete query_is_valid" directly and accurately describes the main change across the entire changeset. The title is concise, specific, and clearly conveys that the query_is_valid parameter and field are being removed from multiple files including the data schema, function signatures, and tests. The terminology is appropriate for developers, and the title avoids vague language or unnecessary noise. A teammate scanning commit history would immediately understand that this PR removes the now-obsolete query_is_valid feature.
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

📜 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 fb58570 and 537e07b.

📒 Files selected for processing (7)
  • docs/user_data_collection.md (0 hunks)
  • src/app/endpoints/query.py (0 hunks)
  • src/app/endpoints/streaming_query.py (0 hunks)
  • src/utils/transcripts.py (0 hunks)
  • tests/unit/app/endpoints/test_query.py (0 hunks)
  • tests/unit/app/endpoints/test_streaming_query.py (0 hunks)
  • tests/unit/utils/test_transcripts.py (0 hunks)
💤 Files with no reviewable changes (7)
  • docs/user_data_collection.md
  • src/utils/transcripts.py
  • tests/unit/utils/test_transcripts.py
  • tests/unit/app/endpoints/test_query.py
  • tests/unit/app/endpoints/test_streaming_query.py
  • src/app/endpoints/streaming_query.py
  • src/app/endpoints/query.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: build-pr
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)

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.

@onmete onmete closed this Oct 31, 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.

1 participant