Skip to content

[DBIP] Validate offer reference category matches listing category #1946

Description

@jaasieldelgado131

Summary

Some listing rows reference an !offer: slug that exists in references/offers/, but the offer is defined under a different category file than the listing that consumes it. This can make category-specific exports silently hydrate an offer from the wrong schema.

Evidence

Local CSV scan on current main found these concrete mismatches:

listing row listing category referenced offer offer category
listings/all-networks/analytics.csv:2 analytics.csv !offer:arkham references/offers/explorers.csv
listings/all-networks/platforms.csv:19 platforms.csv !offer:sequence references/offers/wallets.csv
listings/specific-networks/avalanche/analytics.csv:2 analytics.csv !offer:arkham references/offers/explorers.csv
listings/specific-networks/filecoin/analytics.csv:19 analytics.csv !offer:starboard references/offers/explorers.csv

Why this matters

Each listing CSV has category-specific columns. If an analytics listing hydrates an explorer offer, or a platform listing hydrates a wallet offer, downstream JSON consumers can receive fields that look valid but belong to another category schema.

Proposed guardrail

Add a validation rule for listing rows that use !offer:<slug>:

  1. Resolve the slug in references/offers/**/*.csv.
  2. Compare the referenced offer file name with the listing file name.
  3. Fail validation when they differ, unless an explicit cross-category alias/exception file is introduced.

This keeps the check narrow and avoids blocking plain text rows that do not use !offer:.

Reward address

Public ERC-20 address for the DBIP reward, if approved:

0xb43d90BB4E22A43D77e9bfbc2f1CA826ec1CaBF1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions