Card Evolution Phase 1c: Bot Integration → next-release #95

Merged
cal merged 21 commits from card-evolution-phase1c into next-release 2026-03-18 21:28:59 +00:00
Owner

Summary

Merges Card Evolution Phase 1c bot integration into next-release for dev Docker deployment.

  • WP-11: /evo status slash command with progress bars and filters
  • WP-12: Tier badge on card embed titles ([T1]/[T2]/[T3]/[EVO])
  • WP-13: Post-game callback hook (season stats + evolution evaluation)
  • WP-14: Tier completion notification embeds with tier-specific colors
## Summary Merges Card Evolution Phase 1c bot integration into next-release for dev Docker deployment. - **WP-11**: `/evo status` slash command with progress bars and filters - **WP-12**: Tier badge on card embed titles ([T1]/[T2]/[T3]/[EVO]) - **WP-13**: Post-game callback hook (season stats + evolution evaluation) - **WP-14**: Tier completion notification embeds with tier-specific colors
cal added 21 commits 2026-03-18 21:27:45 +00:00
fix: support packs with >5 cards in scout view
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m17s
970aef760a
Spread scout buttons across multiple rows (5 per row) instead of
all on row 0. Cap at 25 buttons (Discord max) using the last 25 cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reviewed-on: #79
When a user exceeds their 2/day scout token limit, they are now offered
a button to purchase an extra token for 200₼ instead of being blocked.
Updates /scout-tokens message to mention the purchase option.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
message.edit(view=self) re-registers the view in discord.py's ViewStore,
resetting the 30-minute timeout timer. Scouted packs never showed
"Scout Window Closed" because each scout pushed the timeout further out.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: handle db_patch failure in buy scout token flow
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m20s
db15993b02
Wrap the wallet deduction in try/except so a failed db_patch immediately
stops the view and shows an error, instead of leaving it open for 30s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge pull request 'enhance/scouting' (#81) from enhance/scouting into main
All checks were successful
Build Docker Image / build (push) Successful in 1m21s
eb17b17dd4
Reviewed-on: #81
chore: pin all Python dependency versions (#82)
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m52s
9d279cd038
Pin all requirements.txt deps to exact versions sourced from production
container. Move pytest/pytest-asyncio to new requirements-dev.txt. Pin
Dockerfile base image from python:3.12-slim to python:3.12.13-slim.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reviewed-on: #83
fix: use money endpoint for scout token wallet deduction
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m24s
7e406f1a06
db_patch with wallet param was silently ignored by the API — wallet
mutations require the dedicated teams/{id}/money/{amount} endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reviewed-on: #90
feat(WP-12): tier badge on card embed — closes #77
All checks were successful
Build Docker Image / build (pull_request) Successful in 3m54s
5a4c96cbdb
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>
feat(WP-11): /evo status slash command — closes #76
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m23s
fce9cc5650
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>
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
b4c41aa7ee
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>
fix: add @pytest.mark.asyncio to async test methods
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m23s
93e0ab9a63
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>
feat: WP-14 tier completion notification embeds
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m5s
6c725009db
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>
fix: remove WP-14 files from WP-13 PR
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m20s
303b7670d7
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>
fix: remove dead real_notify import in test
All checks were successful
Build Docker Image / build (pull_request) Successful in 52s
596a3ec414
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: remove unused Optional import
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m19s
746ffa2263
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cal merged commit f497b59c0f into next-release 2026-03-18 21:28:59 +00:00
cal deleted branch card-evolution-phase1c 2026-03-18 21:28:59 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-discord#95
No description provided.