Skip to content

refactor: move installation repositories to subcollection (Firestore 1 MiB limit) #455

@mschilling

Description

@mschilling

Context

GitHubInstallation.repositories is stored as an inline array on the installation document. For large GitHub orgs with hundreds or thousands of repos, this can exceed Firestore's 1 MiB per-document limit, causing silent write failures.

Identified in multi-model AI review of PR #452.

Current model

installations/{id}
  repositories: [{ id, name, fullName, private }, ...]  // unbounded array

Proposed model

installations/{id}
  repositoryCount: number
  // ... other fields

installations/{id}/repos/{repoId}
  name: string
  fullName: string
  private: boolean

Impact

  • Not urgent for early adoption (personal accounts have <50 repos typically)
  • Becomes relevant for org-wide installations at Framna
  • Requires changes to: types, repository, event handler, API controller, frontend service

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to existing feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions