Skip to content

Refactor/remove vestigial user scoping#103

Merged
asiniscalchi merged 4 commits into
mainfrom
refactor/remove-vestigial-user-scoping
Jun 12, 2026
Merged

Refactor/remove vestigial user scoping#103
asiniscalchi merged 4 commits into
mainfrom
refactor/remove-vestigial-user-scoping

Conversation

@asiniscalchi

Copy link
Copy Markdown
Owner

No description provided.

asiniscalchi and others added 4 commits June 12, 2026 06:31
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>
@asiniscalchi asiniscalchi merged commit 33da773 into main Jun 12, 2026
2 checks passed
@asiniscalchi asiniscalchi deleted the refactor/remove-vestigial-user-scoping branch June 12, 2026 06:53
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