Skip to content

Gate MOCK_MODEL4_CONTRIBUTORS fallback so demo users do not leak into the public milestone funnel #278

Description

@Benjtalkshow

components/bounty-detail/bounty-detail-client.tsx:67 falls back to MOCK_MODEL4_CONTRIBUTORS when the bounty has no contributorProgress:

contributorProgress: bounty?.contributorProgress ?? MOCK_MODEL4_CONTRIBUTORS,

getFullMilestoneData is consumed by both the public MilestoneFunnel (visible to unauthenticated visitors) and the authenticated Model4MaintainerDashboard. A real bounty with no contributors will surface the demo names (Alice, Bob, David) as if they were real participants.

getRealContributors already exists for the public funnel path and returns [] instead of demo data, but any other consumer that calls getFullMilestoneData for public rendering is still exposed.

What to do

  • Audit every call site of getFullMilestoneData and confirm none of them render in a public context. Public-only paths must use getRealContributors
  • Gate the MOCK_MODEL4_CONTRIBUTORS fallback in getFullMilestoneData behind process.env.NODE_ENV === "development" so it only kicks in during local dev
  • Add a brief code comment explaining why

Acceptance criteria

  • In a production build, getFullMilestoneData never returns MOCK_MODEL4_CONTRIBUTORS
  • Public-facing funnel renders an empty contributor list for bounties without contributorProgress
  • Authenticated maintainer and contributor views still see real data when present, empty list otherwise

Files

  • components/bounty-detail/bounty-detail-client.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbugSomething isn't workingfrontendFrontend development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions