Skip to content

fix(marketplace): close RI Marketplace poller gaps (pending rows with a listing id, superseded listings, deployment coverage) #1494

Open

Description

@IAmJSD

Problem

The RI Marketplace listing poller from #1289 (the backend slice of #27) leaves gaps where a sale is never recorded:

  1. A pending row that has a real listing id is never polled. A listing saved as pending (AWS gave no status when it was created) that already has a listing_id is never selected by the poll, so it never becomes active and any sale on it is never recorded. This state existed before feat(marketplace): poll RI Marketplace listings and record proceeds and AWS fee (backend slice of #27) #1289.
  2. A sale on a listing that has already been replaced is lost. If a listing sells partially and CUDly then records it as ended under a newer listing id before a poll sees the sale, the earlier listing's proceeds are never recorded. This is the same class as the "known window" documented in feat(marketplace): poll RI Marketplace listings and record proceeds and AWS fee (backend slice of #27) #1289, where a listing is cancelled before its first poll.
  3. The poll doesn't run on every deployment. It runs inside the hourly finalize_revocations task, so it doesn't run on Fargate or CloudFormation deployments where that task isn't scheduled, and switching that task off also stops the poll.

Before exposing proceeds in the API or UI

Acceptance criteria

  • Pending rows with a listing id are polled and move to active or to a terminal state.
  • A listing replaced by a newer one still gets its final settlement recorded.
  • The poll runs on every supported deployment target, or the docs say where it doesn't.

Refs #27, #1289

Activity

  1. IAmJSD commented on Oct 26, 2026

    @IAmJSD
    CollaboratorAuthor

    Claiming: working on this

  2. self-assigned this
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions