Skip to content

fix(data): reconcile symbiosis-2025 bounty amounts & names (#28)#51

Merged
sacha-l merged 1 commit intodevelopfrom
fix/bounty-amounts-reconciliation-28
Apr 22, 2026
Merged

fix(data): reconcile symbiosis-2025 bounty amounts & names (#28)#51
sacha-l merged 1 commit intodevelopfrom
fix/bounty-amounts-reconciliation-28

Conversation

@sacha-l
Copy link
Copy Markdown
Collaborator

@sacha-l sacha-l commented Apr 22, 2026

Closes #28.

Stacked on #50 — target base is fix/plata-mia-bounties-27 while that PR is open so the diff stays clean. Once #50 merges to develop, I'll rebase this PR and retarget to develop.

Summary

Changes applied to prod

Project Before After
ObraClara Polkadot main track / $2,500 IDEA-THON main track / $4,000
Kleo Protocol Polkadot main track / $2,500 SHIP-A-THON main track / $4,000
OpenArkiv Polkadot main track / $2,500 SHIP-A-THON main track / $4,000
Chiri App Kusama bounty / $2,500 Kusama / $500
Unblind for Polkadot Kusama bounty / $2,500 Kusama / $1,500
Infinite conspiracy Kusama bounty / $2,500 Kusama / $3,000
Siphon Protocol Hyperbridge bounty / $2,500 Hyperbridge / $1,500
The People's Vote xx Network bounty / $2,500 xx Network / $3,000
GhostMesh xx Network bounty / $2,500 xx Network / $2,000
Carbon Smart Meter (no bounty row) xx Network / $250

Files in this PR

  • server/scripts/reconcile-bounty-amounts-supabase.js — new. CSV-driven general reconciliation with --dry-run, idempotent, scoped safety rules:
    • Never deletes a row. Wrong data stays visible.
    • Never auto-mutates a project with > 1 bounty rows (protects Plata Mia's shape from future cohorts).
    • SKIPs projects where expected shape is multi-row (those use the per-project Plata Mia pattern instead).
    • Supports --hackathon=<id> flag; Phase 1 only has symbiosis-2025 registered in CSV_PATHS.
  • server/migration-data/prizes-symbiosis-2025.csv — two corrections to the source-of-truth from the screenshot:
    • Siphon → Siphon Protocol (DB project name), amount $500 → $1,500
    • Carbon Smart Meter amount null → $250 (legibly confirmed out-of-band)
  • client/src/lib/mockWinners.ts — mirrors every prod change so Vercel preview mock mode matches prod.
  • docs/improvement-backlog.md — two new entries: missing per-bounty CSVs for synergy-2025 / symmetry-2024, and the 5 missing Marketing-track projects.

Test plan

  • --dry-run — showed 9 UPDATE + 1 INSERT + 5 SKIP.
  • Real run — all 10 mutations applied cleanly; no errors.
  • Post-fix --dry-run — 11 NOOP + 5 SKIP + 0 pending (idempotent ✓).
  • Visual check on /admin WinnersTable for the 10 affected projects — human reviewer walks through once deployed. WinnersTable.tsx:547 already iterates the array; rendering is unchanged.
  • Spot-check via API for 2–3 projects: e.g. GET /api/m2-program/obraclara-98b0e9 should show "bountyPrize": [{ "name": "IDEA-THON main track", "amount": 4000, ... }].

Not in scope

  • synergy-2025 and symmetry-2024 reconciliation. Those events have only a Total Prize (USDC) column in payouts.csv, not per-bounty detail. Added a backlog entry asking for the same-shape spreadsheets from WebZero.
  • Adding the 5 missing Marketing-track projects. They'd need project-level metadata (name, description, team wallets, categories) beyond what's in the prize CSV. Logged for follow-up.
  • totalPaid[].bountyName references. The payment-history bountyName fields on ObraClara / Kleo / OpenArkiv / Chiri App / etc. still reference the old bounty names ("Kusama bounty" etc.). Payment records are a different layer — preserving the name at time-of-payment is arguably correct (audit trail). Not touched here; not logged as a concern unless fix(data): split Plata Mia's concatenated bountyPrize row (#27) #50 or ops: verify / restore fix-bounty-amounts-supabase.js (bounty amounts may not match source-of-truth CSV) #28 reviews say otherwise.
  • Siphon Protocol vs Siphon rename on the projects.project_name side — the DB has "Siphon Protocol"; we updated the CSV to match. Nothing on the DB rename side.

Related

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stadium Ready Ready Preview, Comment Apr 22, 2026 9:29am

Cross-referenced prod bounty_prizes against the symbiosis-2025
source-of-truth CSV and applied 10 corrections (9 UPDATE + 1 INSERT).
5 projects skipped (entire project record missing — logged for
follow-up). Plata Mia (already correct from #27) was a NOOP.

Changes applied to prod:

UPDATEs (wrong names and/or amounts):
  - ObraClara:             "Polkadot main track" $2500  → "IDEA-THON main track"  $4000
  - Kleo Protocol:         "Polkadot main track" $2500  → "SHIP-A-THON main track" $4000
  - OpenArkiv:             "Polkadot main track" $2500  → "SHIP-A-THON main track" $4000
  - Chiri App:             "Kusama bounty"       $2500  → "Kusama"                 $500
  - Unblind for Polkadot:  "Kusama bounty"       $2500  → "Kusama"                 $1500
  - Infinite conspiracy:   "Kusama bounty"       $2500  → "Kusama"                 $3000
  - Siphon Protocol:       "Hyperbridge bounty"  $2500  → "Hyperbridge"            $1500
  - The People's Vote:     "xx Network bounty"   $2500  → "xx Network"             $3000
  - GhostMesh:             "xx Network bounty"   $2500  → "xx Network"             $2000

INSERT (row was missing):
  - Carbon Smart Meter:    (nothing)                    → "xx Network"             $250

SKIPs (project records missing from `projects` table, logged in backlog):
  Right of the DOTty, Khoj, Pointillism, Connected by the Dots,
  Crypto Therapy | Polkadot.

Changes in this commit:
- server/scripts/reconcile-bounty-amounts-supabase.js (new) — general
  CSV-driven reconciliation with --dry-run, idempotent, safety rules
  (never delete, never auto-mutate multi-row projects, skip when
  expected shape is multi-row — those use the Plata Mia pattern).
- server/migration-data/prizes-symbiosis-2025.csv — source-of-truth
  corrections: Siphon → Siphon Protocol (project name in DB); Siphon
  amount 500 → 1500; Carbon Smart Meter amount null → 250 (the xx
  Network row that wasn't fully legible in the original screenshot).
- client/src/lib/mockWinners.ts — mirrors every prod change (9 updates
  + 1 insertion) so Vercel preview mock mode matches prod.
- docs/improvement-backlog.md — two new entries: per-bounty source-of-
  truth CSVs missing for synergy-2025 / symmetry-2024; five symbiosis
  marketing-track winners missing from projects table entirely.

Out of scope:
- synergy-2025 and symmetry-2024 reconciliation (no per-bounty CSV
  exists for those events; payouts.csv only has total prize).
- Missing marketing-track projects (needs project-level metadata, not
  just bounty data; separate follow-up issue).
- Payment history bountyName fields in totalPaid still reference old
  names ("Kusama bounty" etc.) — payments are a separate layer; out
  of scope for #28 which is about bounty-prize rows specifically.

Verification:
- Dry-run showed 9 UPDATE + 1 INSERT + 5 SKIP.
- Real run applied all 10 mutations successfully.
- Post-fix dry-run shows 11 NOOP + 5 SKIP + 0 pending changes
  (idempotent).
@sacha-l sacha-l force-pushed the fix/bounty-amounts-reconciliation-28 branch from 4e44e52 to a33fc00 Compare April 22, 2026 09:29
@sacha-l sacha-l changed the base branch from fix/plata-mia-bounties-27 to develop April 22, 2026 09:29
@sacha-l sacha-l marked this pull request as ready for review April 22, 2026 09:31
@sacha-l sacha-l merged commit aa4671e into develop Apr 22, 2026
2 checks passed
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.

ops: verify / restore fix-bounty-amounts-supabase.js (bounty amounts may not match source-of-truth CSV)

1 participant