Skip to content

Inbound follow records are tied to mutable usernames instead of immutable user IDs #491

@Ridanshi

Description

@Ridanshi

Summary

Inbound follow tracking uses mutable usernames as relationship identifiers.

Username changes can break relationship consistency and historical analytics.

Affected Files

  • follow.ts
  • analytics.ts
  • schema.prisma

Root Cause

Follow relationships reference usernames rather than immutable user identifiers.

When usernames change, historical records become disconnected from the current account identity.

Reproduction

  1. Follow a user.
  2. Rename the followed account.
  3. Inspect inbound follow records.
  4. Observe inconsistencies between historical records and current account identity.

Expected Behavior

Follow relationships should remain stable regardless of username changes.

Actual Behavior

Username changes affect relationship consistency.

Why This Is Difficult To Detect

The issue only appears after account renames.

Most follow testing uses static usernames.

Production Impact

  • Broken analytics
  • Inconsistent relationship tracking
  • Historical data corruption
  • Identity ambiguity

Suggested Fix

Store immutable user IDs rather than mutable usernames.

Severity

Medium-High

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions