Skip to content

Drop the circle tables nobody reads - #190

Open
eastriverlee wants to merge 1 commit into
mainfrom
chore/drop-the-circle-tables-nobody-reads
Open

Drop the circle tables nobody reads#190
eastriverlee wants to merge 1 commit into
mainfrom
chore/drop-the-circle-tables-nobody-reads

Conversation

@eastriverlee

Copy link
Copy Markdown
Contributor

Migration 014 created four tables. Searching this repository for each:

table who reads it who writes it
circle nobody nobody
person_circle nobody one copy from itself onto a new person ID
resource_access_rule nobody nobody
mattermost_circle_link nobody nobody

canonicalizePersonCircles was that one writer: it copied person_circle rows to a canonical person ID and deleted the old ones. It moved rows nothing had put there. It was the last statement of canonicalizePersonReferences, 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.json and the person.circles column projected from it. That column stays, and so does graphiti_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

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
eastriverlee force-pushed the chore/drop-the-circle-tables-nobody-reads branch from 8928b23 to 9859e3f Compare August 26, 2026 06:33
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