Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I'm Not on the DEV Team. I Still Debugged Their Missing Badges From Public Code. (And My First Test Was Wrong.)

Описание и применение

Баг в системе выдачи бейджей DEV, связанный с несоответствием slug‑ов, отсутствием сообщения благодарности и отсутствием идемпотентности, исправлен. Теперь пользователи, сделавшие четыре и более PR, получают бейдж 4x‑commit‑club с благодарностью и без дублирования.

Задача

Multi‑commit contributor badges were never awarded because badge slugs in production did not match the hard‑coded constants, context messages were omitted, and idempotency was missing.

Результат

Badge awarding logic corrected; users now receive multi‑commit badges with proper thank‑you messages and no duplicate notifications.

Рабочий процесс

  • 1. Observe missing badge after merging 4 PRs.
  • 2. Inspect BadgeAwardWorker schedule and GitHub API to confirm contributions.
  • 3. Open award_contributor_from_github.rb and compare single vs multi‑commit logic.
  • 4. Identify three bugs: silent slug drops, missing context messages, missing idempotency guard.
  • 5. Create Issue #24114 and PR #24113 to fix the service.
  • 6. Review PR with OpenHands, confirm diagnosis and fix logging.
  • 7. Merge PR, badge awarded, thank‑you message displayed.

Доказательства

Each key in BADGE_SLUGS is resolved via Badge.id_for_slug(slug). If a slug in the production badges table doesn't match the hardcoded constant, id_for_slug returns nil.

Источник

Even when a multi-commit badge was created, it omitted rewarding_context_message_markdown: msg.

Источник

create_badges_for_user called BadgeAchievement.create on every hourly run instead of .where(...).first_or_create(...).

Источник

  • Дата записи: 2026-10-24T19:11:21.992Z