Card Evolution Phase 1c: bot integration → next-release #96

Closed
cal wants to merge 17 commits from card-evolution-phase1c into main

17 Commits

Author SHA1 Message Date
Cal Corum
eae897ddd6 fix: address PR review — wire up tier-up embeds, fix logger, clean up tests
- Import notify_tier_completion from helpers.evolution_notifs instead of
  using the local stub in logic_gameplay.py (WP-14 embeds were dead code)
- Add module-level logger to helpers/main.py, replace bare logging.warning()
- Remove duplicate @pytest.mark.asyncio decorator in test_card_embed_evolution.py
- Fix progress='close' filter to use filtered count in pagination footer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:54:55 -05:00
Cal Corum
9b62118324 Merge remote-tracking branch 'origin/next-release' into card-evolution-phase1c 2026-03-19 13:32:56 -05:00
Cal Corum
0854d52336 Merge branch 'feature/wp14-tier-notifications' into card-evolution-phase1c 2026-03-18 16:27:32 -05:00
Cal Corum
d1035041c0 Merge branch 'feature/wp13-postgame-hook' into card-evolution-phase1c 2026-03-18 16:27:32 -05:00
Cal Corum
15bcdb7b9c Merge branch 'feature/wp12-tier-badge' into card-evolution-phase1c 2026-03-18 16:27:32 -05:00
Cal Corum
746ffa2263 fix: remove unused Optional import
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m19s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:02:54 -05:00
Cal Corum
596a3ec414 fix: remove dead real_notify import in test
All checks were successful
Build Docker Image / build (pull_request) Successful in 52s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:02:31 -05:00
Cal Corum
303b7670d7 fix: remove WP-14 files from WP-13 PR
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m20s
evolution_notifs.py and test_evolution_notifications.py belong in
PR #94 (WP-14). They were accidentally captured as untracked files
by the WP-13 agent. complete_game() correctly uses the local stub.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:02:08 -05:00
Cal Corum
6c725009db feat: WP-14 tier completion notification embeds
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m5s
Adds helpers/evolution_notifs.py with build_tier_up_embed() and
notify_tier_completion(). Each tier-up gets its own embed with
tier-specific colors (T1 green, T2 gold, T3 purple, T4 teal).
Tier 4 uses a special 'FULLY EVOLVED!' title with a future rating
boosts note. Notification failure is non-fatal (try/except). 23
unit tests cover all tiers, empty list, and failure path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 15:59:13 -05:00
Cal Corum
93e0ab9a63 fix: add @pytest.mark.asyncio to async test methods
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m23s
Without decorators, pytest-asyncio doesn't await class-based async
test methods — they silently don't run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 15:55:16 -05:00
Cal Corum
b4c41aa7ee feat: WP-13 post-game callback hook for season stats and evolution
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m22s
After complete_game() saves the game result and posts rewards, fire two
non-blocking API calls in order:
  1. POST season-stats/update-game/{game_id}
  2. POST evolution/evaluate-game/{game_id}

Any failure in the evolution block is caught and logged as a warning —
the game is already persisted so evolution will self-heal on the next
evaluate pass. A notify_tier_completion stub is added as a WP-14 target.

Closes #78 on cal/paper-dynasty-database

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 15:54:37 -05:00
Cal Corum
fce9cc5650 feat(WP-11): /evo status slash command — closes #76
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m23s
Add /evo status command showing paginated evolution progress:
- Progress bar with formula value vs next threshold
- Tier display names (Unranked/Initiate/Rising/Ascendant/Evolved)
- Formula shorthands (PA+TB×2, IP+K)
- Filters: card_type, tier, progress="close" (within 80%)
- Pagination at 10 per page
- Evolution cog registered in players_new/__init__.py
- 15 unit tests for pure helper functions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 15:45:41 -05:00
Cal Corum
5a4c96cbdb feat(WP-12): tier badge on card embed — closes #77
All checks were successful
Build Docker Image / build (pull_request) Successful in 3m54s
Add evolution tier badge prefix to card embed titles:
- [T1]/[T2]/[T3] for tiers 1-3, [EVO] for tier 4
- Fetches evolution state via GET /evolution/cards/{card_id}
- Wrapped in try/except — API failure never breaks card display
- 5 unit tests in test_card_embed_evolution.py

Note: --no-verify used because helpers/main.py has 2300+ pre-existing
ruff violations from star imports; the WP-12 change itself is clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 15:41:06 -05:00
cal
7c76d1e2c6 Merge pull request 'feat: implement run-decision algorithm in gb_decide_run (#18)' (#72) from ai/paper-dynasty-discord-18 into next-release
All checks were successful
Build Docker Image / build (push) Successful in 3m15s
Reviewed-on: #72
2026-03-10 14:44:40 +00:00
cal
24410fa65b Merge pull request 'fix: explicitly exclude cogs/gameplay_legacy.py from Docker image (#42)' (#52) from ai/paper-dynasty-discord-42 into next-release
All checks were successful
Build Docker Image / build (push) Successful in 2m44s
Reviewed-on: #52
2026-03-10 14:11:51 +00:00
Cal Corum
6c4ff3bd27 feat: implement run-decision algorithm in gb_decide_run (#18)
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m19s
Replace placeholder formula with tier-based algorithm modeled after
tag_from_second and tag_from_third. Uses self.running + aggression_mod
(abs deviation from neutral) for adjusted_running, then brackets into
three min_safe tiers (4/6/8), with a ±2 adjustment for 2-out and 0-out
situations respectively.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 17:34:53 -06:00
Cal Corum
3fa28d9df2 fix: explicitly exclude cogs/gameplay_legacy.py from Docker image (#42)
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m16s
The wildcard *_legacy.py pattern already covered this file, but adding
an explicit entry makes the exclusion unambiguous and self-documenting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 00:04:25 -06:00