Drop the circle tables nobody reads - #190
Open
eastriverlee wants to merge 1 commit into
Open
Conversation
Migration 014 created circle, person_circle, resource_access_rule and mattermost_circle_link. The circle table has never had an INSERT or a SELECT anywhere in this repository, and person_circle had one writer: a copy from itself onto a new person ID, which moved rows nothing put there. resource_access_rule and mattermost_circle_link are named only by the migration that made them. An empty table with a plausible name is worse than no table. Somebody looked at circle and circle_member today and asked for them to be filled, which would have changed nothing, because what actually decides a person's circles is policy.json and the person.circles column projected from it. Those stay, as does graphiti_namespace.scope_circle_id. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
eastriverlee
force-pushed
the
chore/drop-the-circle-tables-nobody-reads
branch
from
August 26, 2026 06:33
8928b23 to
9859e3f
Compare
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.
Migration 014 created four tables. Searching this repository for each:
circleperson_circleresource_access_rulemattermost_circle_linkcanonicalizePersonCircleswas that one writer: it copiedperson_circlerows to a canonical person ID and deleted the old ones. It moved rows nothing had put there. It was the last statement ofcanonicalizePersonReferences, whose other twelve touch live tables; removing it leaves those alone.An empty table with a plausible name is worse than no table. Today someone read these, found them empty, and asked for them to be filled — which would have changed nothing, because a person's circles are decided by
policy.jsonand theperson.circlescolumn projected from it. That column stays, and so doesgraphiti_namespace.scope_circle_id, which is read and written.tests/integration/is untouched: the existing assertion reads the text of migration 014, which this change does not edit, so it keeps passing.go build ./...,go vet ./internal/store/...,go test ./internal/store/...— 13 pass.🤖 Generated with Claude Code