Skip to content

fix: resolve PR #42 review comments - #44

Merged
marek-chmielowski-blurify merged 3 commits into
devfrom
fix/bf-218-review-comments
Jul 31, 2026
Merged

fix: resolve PR #42 review comments#44
marek-chmielowski-blurify merged 3 commits into
devfrom
fix/bf-218-review-comments

Conversation

@marek-chmielowski-blurify

@marek-chmielowski-blurify marek-chmielowski-blurify commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Resolves all 10 unresolved review comments left on #42 (merged without addressing them).

  • Removed superfluous comments that only restated what AGENTS.md/naming already documents (game.ts, admin-player-activity.ts)
  • Deduped GAME_PERFORMANCE_SORT_FIELDS between the contract port and admin-console (import from @openora/core/contracts instead of redeclaring)
  • Added a currency filter to the game-performance report instead of summing bet/win amounts across currencies
  • Rewrote DAU/WAU/MAU to a single LEFT JOIN + FILTER instead of three correlated subqueries per generated day
  • Fixed a retention off-by-one: the registration-day session no longer counts as a return; the window now starts the day after registration
  • Replaced hardcoded snake_case SQL identifiers with Drizzle column references in the retention query
  • Added a TODO documenting that winAmount is never set yet (endRound has no way to report a win), so revenue currently always equals volume
  • Rewrote the DrizzleAdminGameReporting, DrizzleAdminPlayerActivity, and BackofficeService.getGamePerformance test suites against real Postgres instead of mocked query builders/ports

Test plan

  • pnpm verify (types, lint, boundaries, shape, deprecations, unit tests, drift) - green
  • New/rewritten real-Postgres tests cover: DAU/WAU/MAU correctness, retention window fix, currency filter, zero-activity edge cases

…sole

- Remove superfluous restated-in-AGENTS.md comments (game.ts, admin-player-activity.ts)
- Dedupe GAME_PERFORMANCE_SORT_FIELDS between the contract port and admin-console
- Add a currency filter to the game-performance report instead of summing
  cross-currency amounts together
- Rewrite DAU/WAU/MAU to a single LEFT JOIN + FILTER instead of three
  correlated subqueries per generated day
- Fix a retention off-by-one: the registration-day session no longer counts
  as a return, window now starts the day after registration
- Use Drizzle column references instead of hardcoded snake_case identifiers
  in the retention query
- Add a TODO documenting that winAmount is never set yet (endRound has no
  way to report a win), so revenue always equals volume today
- Rewrite the DrizzleAdminGameReporting, DrizzleAdminPlayerActivity, and
  BackofficeService.getGamePerformance test suites against real Postgres
  instead of mocked query builders/ports

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019sDfSQ52GKxqKPsP3k4Uer
agniev-a-hub
agniev-a-hub previously approved these changes Jul 29, 2026

@agniev-a-hub agniev-a-hub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filtering is WARN.

Comment thread packages/core/src/admin-console/service/backoffice.service.ts
Comment thread packages/core/src/casino/gaming/admin-reporting.ts Outdated
Comment thread packages/core/src/iam/adapters/admin-player-activity.ts
Comment thread packages/core/src/casino/gaming/admin-reporting.ts
- fix retention cohort window to anchor on the cohort's calendar day
  instead of the exact registration timestamp, so a user returning the
  next calendar day but under 24h after registering is still counted
- remove now-unused registered_at column from the retention CTE
- remove TODO on winAmount per reviewer request
- document the no-currency-filter mixed-currency sum as intentional

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015cusuRvKBX3sJnFxqfkcPE
@marek-chmielowski-blurify
marek-chmielowski-blurify merged commit 3ab92fe into dev Jul 31, 2026
2 checks passed
@marek-chmielowski-blurify
marek-chmielowski-blurify deleted the fix/bf-218-review-comments branch July 31, 2026 06:15
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.

4 participants