Skip to content

fix(installation): case-insensitive repo removal and normalize PK#127

Open
Yurii214 wants to merge 1 commit into
entrius:testfrom
Yurii214:fix/120-case-insensitive-removal
Open

fix(installation): case-insensitive repo removal and normalize PK#127
Yurii214 wants to merge 1 commit into
entrius:testfrom
Yurii214:fix/120-case-insensitive-removal

Conversation

@Yurii214
Copy link
Copy Markdown

Fixes #120

Summary

  • Add shared normalizeRepoFullName() / validateRepoFullName() utility
  • Webhook installation_repositories.added stores lowercase canonical PK
  • Webhook installation_repositories.removed clears rows case-insensitively
  • Admin register/backfill paths normalize via shared validator
  • Log a warning when removal updates zero rows (previously silent no-op)

Why

GitHub repo identity is case-insensitive, but PostgreSQL PK lookups are not.
Admin registration could create owner/repo while webhooks stored Owner/Repo,
so uninstall events returned HTTP 202 while leaving registered=true.

Test plan

  • npm run lint passes
  • npm run build passes

…trius#120)

Centralize repo full-name validation/normalization and use lowercase
canonical keys on webhook insert paths. Removal events now clear rows
via case-insensitive match and log when no row is updated.

Fixes entrius#120

Co-authored-by: Cursor <cursoragent@cursor.com>
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 24, 2026
@Yurii214 Yurii214 changed the title ix(installation): case-insensitive repo removal and normalize PK fix(installation): case-insensitive repo removal and normalize PK May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Critical] Silent uninstall failure — data ingestion continues after app removal due to case-sensitive PK match

2 participants