fix(history): require auth and scope entries per user#954
Open
saurabhhhcodes wants to merge 1 commit into
Open
fix(history): require auth and scope entries per user#954saurabhhhcodes wants to merge 1 commit into
saurabhhhcodes wants to merge 1 commit into
Conversation
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.
Summary\n- require JWT authentication on the legacy /history routes\n- persist user_id on flat-file history rows and migrate existing SQLite files safely\n- filter list/search/delete operations by the authenticated user\n- add regression coverage for unauthenticated access and cross-user read/search/delete isolation\n\nFixes #952\n\n## Validation\n- uv run --with-requirements backend/requirements.txt python -m py_compile backend/app/routers/history.py backend/app/services/database.py backend/tests/test_history.py\n- direct async SQLite smoke test for save/list/search/delete user isolation\n- uv run --with-requirements backend/requirements.txt python -m pytest backend/tests/test_history.py -q (blocked locally during collection by missing system libmagic imported by upload_file.py)\n- uv run --with-requirements backend/requirements.txt python -m pytest backend/tests/test_auth_endpoints.py -q (same local libmagic blocker)