You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If it is a core feature, I have added thorough tests.
Testing
uv run make verify
uv run pytest tests/unit/app/endpoints/test_conversations_v2.py
uv run pytest tests/integration/test_rh_identity_integration.py (v2 list path)
uv run pytest tests/integration/endpoints/test_compaction_conversations_api.py
Confirm OpenAPI: no /v1/conversations routes in docs/devel_doc/openapi.json
Optional e2e: features/conversation_cache_v2.feature (v1 conversations.feature may still target removed API—follow-up if CI runs it against this branch)
Summary by CodeRabbit
API Changes
Removed the deprecated v1 Conversations endpoints for listing, retrieving, deleting, and updating conversations. The v2 Conversations API remains available.
Updated the published API specification to no longer include the v1 endpoints or their associated schemas.
Tests
Updated integration checks to use the v2 Conversations API.
No actionable comments were generated in the recent review.
Walkthrough
The PR removes the deprecated /v1/conversations routes and their OpenAPI declarations. It updates test configuration and coverage to use /v2/conversations, and removes tests and fixtures that referenced the v1 endpoints.
Changes
Conversation API retirement
Layer / File(s)
Summary
Remove v1 routes and registration src/app/endpoints/conversations_v1.py, src/app/routers.py, src/app/main.py
The v1 endpoint module, its /v1 router registration, and its OpenAPI tag are removed.
Identity integration tests request /v2/conversations and require status 200. Compaction tests are narrowed to the v2 API, and the test configuration adds a SQLite conversation cache.
Remove v1 test references tests/integration/conftest.py, tests/integration/endpoints/test_conversations_v1_integration.py, tests/integration/test_openapi_json.py, tests/unit/app/endpoints/test_conversations.py, tests/unit/app/test_routers.py, tests/unit/utils/test_pending_turn.py
V1 endpoint tests and OpenAPI checks are removed. Router tests and fixtures no longer reference the v1 endpoint. The router count expectation changes from 25 to 24.
lightspeed-core/lightspeed-stack#3332: Changes the /v2/conversations list response contract, which this PR retains as the v1 replacement and tests through identity integration.
lightspeed-core/lightspeed-stack#3319: Removes v1 conversation scenarios and migrates them to v2, addressing the same v1 API retirement in end-to-end tests.
The PR removes the deprecated /v1/conversations endpoints and moves test coverage to the unchanged /v2/conversations API. No concrete defect was found. The one remaining item is that optional end-to-end feature files may still reference the removed v1 routes, which is worth a quick check if CI runs them.
Pre-merge checks: 6
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "LCORE-4762: Remove v1/conversations endpoints" matches the main change. The PR removes the deprecated /v1/conversations REST API, its handler module, router registration, OpenAPI paths and …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Performance And Algorithmic Complexity
PR #3339 removes the deprecated /v1/conversations API. The diff is almost entirely deletions: src/app/endpoints/conversations_v1.py (-608), its router registration in src/app/routers.py (-2), th…
Security And Secret Handling
Security and Secret Handling check: PASS. PR #3339 (asimurka, remove-v1/conversations → main) is almost entirely deletions. It removes the v1 conversations handler (`src/app/endpoints/conversations_v1…
Full details: Title check
Explanation
The title "LCORE-4762: Remove v1/conversations endpoints" matches the main change. The PR removes the deprecated /v1/conversations REST API, its handler module, router registration, OpenAPI paths and schemas, and the v1-focused tests. The ticket prefix is extra context but does not hurt clarity.
Full details: Performance And Algorithmic Complexity
Explanation
PR #3339 removes the deprecated /v1/conversations API. The diff is almost entirely deletions: src/app/endpoints/conversations_v1.py (-608), its router registration in src/app/routers.py (-2), the OpenAPI tag in src/app/main.py (-7), and the v1 OpenAPI paths and schemas (-1104). The added lines are limited to test and configuration changes. The added source/test lines include a SQLite conversation_cache YAML block, a /v2/conversations status assertion, a router-count change from 25 to 24, and test docstrings. None adds a loop, nested iteration, per-item API or DB call, regex compilation, cache, buffer, list operation, or endpoint. Checked against the criteria: 1. O(n^2)+ algorithms: none added. 2. N+1 patterns: none added. The removed v1 list and get handlers are not replaced by new per-item queries. 3. Expensive work in loops: none added. 4. Unbounded growth: no new cache, watcher, or buffer. The SQLite conversation cache appears only in test config, with a /tmp path. 5. Missing pagination: no new List endpoint. The v2 list endpoint is unchanged. Any pagination gap there predates this PR. Removing an endpoint reduces the API surface. It does not add a performance regression. The check passes.
Full details: Security And Secret Handling
Explanation
Security and Secret Handling check: PASS. PR #3339 (asimurka, remove-v1/conversations → main) is almost entirely deletions. It removes the v1 conversations handler (src/app/endpoints/conversations_v1.py), its router mount under /v1, its OpenAPI tag, its OpenAPI paths and schemas, and the v1 tests. Checks against the five criteria: 1. Secrets: No hardcoded secrets or plaintext token logging in the added lines. The only addition is a test-config SQLite conversation_cache at /tmp/rh-identity-conversation-cache.db in tests/configuration/rh-identity-config.yaml. This is not a credential. 2. Auth/authz: The remaining /v2/conversations router mount (src/app/routers.py line 69) is unchanged. Removing the v1 endpoints drops routes rather than adding unauthenticated ones. No new endpoint is added. 3. Injection: No new query, command, or path handling is added. 4. Data leakage: No new response fields or log statements are added. The integration test changes only tighten expectations from 200 or 404 to 200. 5. K8s/RH secrets: No Kubernetes Secret or RH secret manifests are changed. Residual note: the features/conversations.feature e2e file may still target the removed v1 API (per the PR description). This is a functional follow-up, not a security violation in the changed code.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Simplify code
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Recent review details
Context from checks skipped due to timeout: 16
GitHub Check: E2E: ci / authorized
GitHub Check: E2E: ci / skills
GitHub Check: E2E: ci / mcp
GitHub Check: E2E: ci / other
GitHub Check: E2E: ci / rbac
GitHub Check: E2E: ci / shields
GitHub Check: E2E: ci / default
GitHub Check: Red Hat Konflux / lightspeed-core-0-8-enterprise-contract / lightspeed-stack-0-8
GitHub Check: Red Hat Konflux / rag-content-0-8-e2e-tests / lightspeed-stack-0-8
GitHub Check: Red Hat Konflux / lightspeed-stack-0-8-e2e-tests / lightspeed-stack-0-8
Source excerpt: **Required**: Use pytest for all unit and integration tests Source excerpt: **Forbidden**: Do not use unittest - pytest is the standard for this project Source excerpt: **Coverage**: Unit tests require 60% coverage, integrat...
Source excerpt: **Required**: Use pytest for all unit and integration tests Source excerpt: **Forbidden**: Do not use unittest - pytest is the standard for this project Source excerpt: **Mocking**: `pytest-mock` for AsyncMock objects
The stated premise is contradicted. The SQLite cache creates its tables when it is connected, and the v2 list handler triggers that connection before it queries the cache. Fresh-database requests in test_rh_identity_integration.py do not depend on application lifespan startup for schema creation.
asimurka
changed the title
Remove v1/conversations endpoints
LCORE-4762: Remove v1/conversations endpoints
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes the deprecated
/v1/conversationsREST API from Lightspeed Core Stack.conversations_v1handler and unregisters its router.docs/devel_doc/openapi.json(v1 conversation paths and schemas removed).tests/configuration/rh-identity-config.yamlso identity integration exercisesGET /v2/conversationswith conversation cache.Clients: use
/v2/conversationsfor list, get, update topic, and delete. V2 remains cache-backed; behavior for those endpoints is unchanged in this PR.Type of change
pyproject.toml+uv.lock]requirements.*.txtfor Konflux]Tools used to create PR
Related Tickets & Documents
Checklist before requesting a review
Testing
uv run make verifyuv run pytest tests/unit/app/endpoints/test_conversations_v2.pyuv run pytest tests/integration/test_rh_identity_integration.py(v2 list path)uv run pytest tests/integration/endpoints/test_compaction_conversations_api.py/v1/conversationsroutes indocs/devel_doc/openapi.jsonfeatures/conversation_cache_v2.feature(v1conversations.featuremay still target removed API—follow-up if CI runs it against this branch)Summary by CodeRabbit