Refactor/remove vestigial user scoping#103
Merged
Merged
Conversation
The per-tenant database is the user boundary since migration 0012, so the user_id parameters threaded through EmbeddingIndex::search_for_user, PendingEmbeddingCounter, SearchService, DailyReviewSearchService, and SemanticJournalSearcher were accepted and ignored. Remove them and rename search_for_user to search, folding the test-only short-form search into the renamed method. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d tools Tenant identity is resolved at the HTTP layer (bearer token selects the isolated database), so the UserContext carried through every analyzer service, tool dispatch, and the MCP server was constructed once with a constant and never read. Remove the type and its threading, and update the stale module docs that described loopback-only serving. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, and workers Remove the user_id parameters and struct fields that were populated with a constant and never read: DailyReview, WeeklyReview, DailyReviewSignal, the failure structs, the runner traits, the signal backfill candidates, JournalConversation, and the per-command handlers. Also fix two weekly-review CHECK-constraint tests that inserted a user_id column dropped by migration 0012 — they passed because the INSERT failed on the missing column, not the constraint under test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…USER_ID IncomingMessage and JournalCommandRequest carried a user_id that every adapter filled with the SINGLE_USER_ID constant and nothing read. With the per-tenant database as the user boundary, remove the field, the constant, and the test plumbing that threaded fake user ids around. Also fix a weekly-review UNIQUE-constraint test that inserted the user_id column dropped by migration 0012 and passed for the wrong reason. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
No description provided.