feat(ingest): installation sync — the app install now creates repo rows
4 months ago
Authored
grim- contracts: installation.created/deleted + installation-repositories.
added/removed kinds (installation + repositories payload, no base repo);
RepoScopedEvent/InstallationEvent helpers; repoExternalId on repo events
- forge-github: normalize installation + installation_repositories; first
SELF-CAPTURED fixture (our live install delivery) + octokit variants
- db: syncInstallationRepos (upsert, re-add clears removed_at),
removeInstallation (soft delete), listActiveRepos
- worker: installation kinds sync repos and stop (no run/check/comment);
lazy repo upsert for unknown repos on change requests
- web: /rules lists active repos; event feed renders installation kinds
- integration: install ⇒ row ⇒ /rules-visible; uninstall ⇒ soft delete;
lazy upsert
Parentf695b75
20 files changed
- DECISIONS.md+22−0
- all-summaries.md+26−0
- apps/web/src/components/events/event-row.tsx+8−1
- apps/web/src/lib/rules.functions.ts+2−2
- apps/worker/src/ai/generate.ts+2−2
- apps/worker/src/context.ts+2−2
- apps/worker/src/jobs/process-event.ts+64−4
- apps/worker/src/jobs/resume-run.ts+11
−2
apps/worker/src/jobs/run-workflows.ts+3−3apps/worker/src/process-event.integration.test.ts+119−0packages/contracts/src/events.ts+51−1packages/db/src/services/events.ts+1−1packages/db/src/services/repos.ts+72−0packages/forge-github/fixtures/PROVENANCE.md+4−0packages/forge-github/fixtures/installation.created.json+96−0packages/forge-github/fixtures/installation.deleted.json+71−0packages/forge-github/fixtures/installation_repositories.added.json+82−0packages/forge-github/fixtures/installation_repositories.removed.json+76−0packages/forge-github/src/webhook/normalize.ts+93−0packages/forge-github/src/webhook/webhook.test.ts+61−0