Skip to content

AGENTS.md and CODE_STYLE.md 2026 June update#3689

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/purchases-android-guardrails-37b0
Draft

AGENTS.md and CODE_STYLE.md 2026 June update#3689
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/purchases-android-guardrails-37b0

Conversation

@cursor

@cursor cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Analyzed 918 comments across 164 PRs from June 1–30, 2026 in RevenueCat/purchases-android.

Human reviewers (16): AlvaroBrey, JayShortway, MonikaMateska, aboedo, ajpallares, alexrepty, davedelong, facumenzella, fire-at-will, joshdholtz, peterporfy, polmiro, rickvdl, skydoves, tonidero, vegaro

Bots (5): RevenueCat-Danger-Bot, codecov[bot], cursor[bot], emerge-tools[bot], socket-security[bot]

New guidelines added

Guideline Why (PR review frequency)
ForbiddenPublicEnum detekt rule Public enums break binary compatibility; flagged across multiple PRs. 24 existing violations baselined. Same pattern as ForbiddenPublicSealedClass.
Explicit @SerialName for snake_case wire fields Missing annotation caused runtime deserialization bug (PR #3656). No global naming strategy is set, so explicit annotation is mandatory.
Prefer Default/Impl suffix over Type for implementations Flagged by tonidero in PR #3667: "Type naming is not really common in Android".
Log level discipline (Logger.v for polling) Flagged 3× (PRs #3517, #3465, #3535): per-iteration poll output should use verbose, not debug.
Thread safety: atomic check-then-act Flagged 4× in PR #3508 by tonidero: non-atomic read-then-write on shared state needs a single synchronized block.
Prefer Exception over RuntimeException for domain errors Flagged in PR #3575 by tonidero: RuntimeException crashes the app; Exception is for catchable domain errors.

Checklist

  • Unit tests for ForbiddenPublicEnum detekt rule (8 test cases)
  • ./gradlew :detekt-rules:test passes
  • ./gradlew detektAll passes (24 existing public enums baselined)
  • If applicable, create follow-up issues for purchases-ios and hybrids

Test plan

  • Ran ./gradlew :detekt-rules:test — all tests pass (existing + 8 new)
  • Ran ./gradlew detektAll — passes with the updated baseline
  • Verified CLAUDE.md is a symlink to AGENTS.md and picks up changes automatically
Open in Web View Automation 

cursoragent and others added 2 commits July 1, 2026 07:12
- Add custom detekt rule ForbiddenPublicEnum to flag public enum classes
  that break binary compatibility in SDK API surface
- Wire rule in RevenueCatRuleSetProvider and enable in detekt.yml
- Add unit tests for the new rule
- Add Code Style notes to AGENTS.md for June 2026 recurring review themes:
  @SerialName for snake_case fields, naming conventions, log levels,
  thread safety patterns, Exception vs RuntimeException

Co-authored-by: Cesar de la Vega <vegaro@users.noreply.github.com>
Existing public enum classes pre-date the new ForbiddenPublicEnum rule.
Baselined so detektAll only flags newly introduced public enums.

Co-authored-by: Cesar de la Vega <vegaro@users.noreply.github.com>
@vegaro vegaro added the pr:other label Jul 1, 2026 — with Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants