Repository navigation
Conversation
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
VikingBot persists chat sessions through
SessionManager, but the public session list, detail, and delete endpoints only consulted the process-local_sessionscatalog. After a restart, the durable JSONL session remained available internally while the API returned an empty list and404for detail and delete.This change makes the existing durable session store the discovery source for the public API. Discovery remains limited to the authenticated principal and OpenAPI channel. It also persists sessions created through
POST /bot/v1/sessions, returns their durable messages, and preserves delete-generation isolation.Issue #6125 includes the source-pinned reproduction. At revision
621b1ddd9945c362464d18482adb1a48df5ee554, one session with two persisted messages survived restart, while list returned zero sessions and detail/delete returned404. The deterministic probe produced the same result in two runs.Human Involvement
Related Issue
Fixes #6125
Type of Change
Changes Made
Testing
Validation completed:
python -m pytest bot/tests/test_openapi_auth.py -q— 47 passedpython -m pytest bot/tests/test_session_portable_paths.py bot/tests/test_openviking_session_retention.py -q— 16 passedruff check bot/vikingbot/channels/openapi.py bot/tests/test_openapi_auth.pyruff format --check bot/vikingbot/channels/openapi.py bot/tests/test_openapi_auth.pygit diff --checkChecklist
Screenshots (if applicable)
Not applicable.
Additional Notes
The implementation reuses the current
SessionManagerstorage and generation markers. It does not introduce a second catalog or storage format.