Skip to content

feat: GitHub App connect, follows, webhooks and reconcile - #115

Merged
flexdinesh merged 1 commit into
github-pr-contractfrom
github-pr-app
Oct 25, 2026
Merged

flexdinesh merged 1 commit into
github-pr-contractfrom
github-pr-app

Conversation

@flexdinesh

@flexdinesh flexdinesh commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Stack 2/4: GitHub App connect, follows, webhooks and reconcile.

  • Behavior owner and resulting change: new internal/github (wire adapter: app JWT, installation tokens, OAuth web flow, REST, webhook HMAC/payloads) and internal/githubsync (rules: per-account connect, sealed user tokens, follows, delivery dedupe, coalesced refresh intent, startup reconcile and Resync). reviewstore persists it; remoteserver composes routes.
  • Contracts/invariants affected; local/remote implications: remote only; enabled only when every DIFFX_SERVER_GITHUB_* is set (partial config fails startup listing missing vars; secrets env-only). Webhook is public and HMAC-authenticated; OAuth callback runs before SameOrigin and is bound to the starting account's session; management routes need a browser session + CSRF. Access = GitHub user ∩ installation, rechecked on list/follow/resync and lazily after 8h before delivery.
  • Validation results; remaining risks: mise run check passes. Service tests on the real store with a fake GitHub (dedupe mutation-checked). Real binary: forged webhook 401, signed 202, redelivery recorded once; anonymous 401, no CSRF 403. Not yet run against real GitHub.
  • Intentional architecture/design changes and rationale: new modules recorded in docs/architecture.md; docs/system.md "GitHub pull requests". Added Disconnect route.
  • UI evidence: n/a (UI in 4/4).

- internal/github: app JWT, installation tokens, OAuth, REST, webhook parsing
- internal/githubsync: account-bound OAuth, sealed tokens, follow access
  rules, delivery dedupe, coalesced refresh intent, reconcile and resync
- schema 12 integration tables; session-only management routes
- DIFFX_SERVER_GITHUB_* config, all-or-nothing, secrets env-only
@flexdinesh
flexdinesh added this pull request to stack #118 October 25, 2026 05:19
@flexdinesh
flexdinesh marked this pull request as ready for review October 25, 2026 06:32
@flexdinesh
flexdinesh merged commit 296d6d3 into main Oct 25, 2026
2 checks passed
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