Skip to content

IMPL-A-05: Build atomic FIFO invitation link allocation and booking onboarding gating #129

@Mestryx-dev

Description

@Mestryx-dev

Summary

Implement the backend/data model and booking integration for THP-managed invitation links with atomic FIFO allocation and automatic consumption on click.

Technical scope

  • DB table for invitation links (URL, status, added_by, created_at, consumed_at, consumed_by/session marker)
  • Admin API endpoints to add/list/update links (global admin permissions)
  • Atomic FIFO allocation endpoint:
    • pick oldest available
    • mark as used in the same transaction
    • return link for redirect
  • Booking onboarding integration:
    • CTA requests invite link via endpoint
    • redirect to returned link
    • if no available links => fallback redirect to standard Gnosis onboarding
  • Runtime invalid-link handling:
    • mark invalid and retry next available (bounded retries)

Constraints

  • Prevent double assignment under concurrent clicks
  • Keep full traceability of added_by
  • Preserve compatibility with existing booking flow

Validation checklist

  • Concurrent allocation test demonstrates no duplicate assignment
  • FIFO order verified across multiple links
  • Empty pool path redirects to standard Gnosis onboarding
  • Admin can inspect who added links and current statuses

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    alphaAlpha phase backlog (post-MVP)implementationWork from closed DIVlayer:alphaAlpha phase (board Layer L4 alias)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions