Skip to content

feat(orb): installation registry from Orb App install events - #1299

Merged
JSONbored merged 1 commit into
mainfrom
feat/orb-installation-registry
Jun 25, 2026
Merged

feat(orb): installation registry from Orb App install events#1299
JSONbored merged 1 commit into
mainfrom
feat/orb-installation-registry

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Second piece of the central Gittensory Orb GitHub App (#1255) — maintains a new orb_github_installations registry (migration 0064) from the verified /v1/orb/webhook installation lifecycle events (created / new_permissions_accepted / suspend / unsuspend / deleted). This is the registry that onboarding + the token-broker (later PRs) read to know which installations exist and who owns them.

  • registered=0 by default — the manual-onboarding gate (Mirror-style; an install is recorded but not trusted until a human opts it in).
  • The upsert runs synchronously in the receiver, before recording the webhook event, so a failed registry write → error + 500 → GitHub redelivers.

Now based on main (the webhook receiver #1293 merged). (Supersedes #1295, which GitHub auto-closed when #1293's branch was deleted — same code, rebased.)

Validation

  • npm run test:ci green; 100% branch coverage on installations.ts + the webhook.ts changes.

Advances #1255.

@dosubot dosubot Bot added the size:M label Jun 25, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.14%. Comparing base (a40febb) to head (f50c611).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1299   +/-   ##
=======================================
  Coverage   95.14%   95.14%           
=======================================
  Files         179      180    +1     
  Lines       20124    20143   +19     
  Branches     7239     7243    +4     
=======================================
+ Hits        19147    19166   +19     
  Misses        386      386           
  Partials      591      591           
Files with missing lines Coverage Δ
src/orb/installations.ts 100.00% <100.00%> (ø)
src/orb/webhook.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Second piece of the central Gittensory Orb GitHub App (#1255). Maintains
orb_github_installations (migration 0064) from the verified /v1/orb/webhook
`installation` lifecycle events — one row per install of the shared Orb App, recording
account + repository_selection and the suspend/unsuspend/deleted lifecycle. This is the
registry onboarding + the token-broker (later PRs) read to know which installations
exist and who owns them.

- registered=0 by default — the Mirror-style manual-onboarding gate (an install is
  RECORDED but not trusted/active until a human opts it in), mirroring #1274.
- The upsert runs synchronously in the receiver, BEFORE recording the webhook event, so a
  failed registry write is flipped to "error" + 500 and GitHub redelivers (the dedup guard
  only suppresses non-error rows). No-op for every non-installation event.

Additive; stacked on #1293 (the webhook receiver). installation_repositories repo-delta
tracking and PR-outcome processing are follow-ups.

Advances #1255.
@JSONbored
JSONbored force-pushed the feat/orb-installation-registry branch from 130ecf0 to f50c611 Compare June 25, 2026 02:50
@JSONbored
JSONbored merged commit 645cae6 into main Jun 25, 2026
19 checks passed
@JSONbored
JSONbored deleted the feat/orb-installation-registry branch June 25, 2026 02:54
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