Skip to content

feat(linked-roles): Hermes worker, Turso authdb, post-instance publish - #44

Draft
owens1127 wants to merge 4 commits into
mainfrom
feat/discord-linked-roles
Draft

feat(linked-roles): Hermes worker, Turso authdb, post-instance publish#44
owens1127 wants to merge 4 commits into
mainfrom
feat/discord-linked-roles

Conversation

@owens1127

Copy link
Copy Markdown
Contributor

Summary

Implements the RaidHub-Services side of Discord linked roles (Option A): Hermes consumes discord_role_metadata_sync, reads Turso for Discord OAuth + Postgres for clears, PUTs Discord application role connection metadata.

Key changes

  • New queue worker + lib/services/discordlinkedroles (publish after new instance, sync handler).
  • lib/database/authdb: Turso client with retry backoff; Redis read-through for destiny→Bungie only (no Discord tokens in Redis).
  • Shared HermesOutboundHTTPRetryDelay with subscription delivery.
  • discord_lr_* Prometheus metrics; DISCORD_LINKED_ROLES_* env.

Related PRs

  • Web-App: feat/discord-linked-roles (BFF + OAuth + tRPC)
  • API: feat/discord-linked-roles-api (internal enqueue + Rabbit)
  • raidhub-discord: feat/linked-account-cache-and-user-jwt (optional; slash / cache)

Docs

Canonical PRD lives outside this repo (umbrella docs/); duplicate copies removed from Services tree.

Merge order

See umbrella LINKED_ROLES_EXECUTION.md: merge after API + Website ship OAuth/header contract, or gate with DISCORD_LINKED_ROLES_ENABLED.

Made with Cursor

owens1127 and others added 4 commits May 3, 2026 21:15
Add DISCORD_LINKED_ROLES.md (full PRD + Part VII ship spec) and
LINKED_ROLES_EXECUTION.md (branch names, PR1 Website / PR2 Services,
feature-flag dependency). Link from ARCHITECTURE overview.

Branch: feat/discord-linked-roles
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ublish

- discord_role_metadata_sync consumer: Turso Discord row + Postgres clears sum, Discord PUT, UpdateSyncOutcome.
- Producer PublishAfterNewInstance from instance_storage orchestrator (per Bungie, all Destiny ids).
- lib/database/authdb: Turso pool with retry backoff; Redis read-through for destiny→bungie only (no OAuth in Redis).
- Shared HermesOutboundHTTPRetryDelay with subscription_delivery.
- Prometheus discord_lr_* metrics. Env DISCORD_LINKED_ROLES_*.

Remove duplicate PRD copies from this repo (canonical docs live in Raid-Hub umbrella docs).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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