- data.get("cards") → data.get("items") to match list endpoint response
- formula_value → current_value (API field name)
- card_type from top-level → track.card_type (nested in track object)
- Add limit=500 param so API returns all cards instead of default 10
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Mark CRITICAL missing endpoint gap as resolved (database PR #173 merged)
- Add REF-API-06 through REF-API-10 covering the new GET /refractor/cards
list endpoint (team filter, card_type, tier, progress, pagination)
- Update prerequisites, execution checklist, and time estimates
- Total test cases: 87 (was 82)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sections 7-8 (game simulation, tier-up notifications) are marked as
manual testing by Cal — impractical to automate via Playwright.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
82-case in-app test plan for Playwright automation covering /refractor status,
tier badges, post-game hooks, tier-up notifications, and edge cases.
Preflight script for quick deploy verification via curl.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the logging-only stub in logic_gameplay.py with the real
notify_tier_completion from helpers/refractor_notifs.py. Tier-up
events now send Discord embeds instead of just logging.
- Import notify_tier_completion from helpers.refractor_notifs
- Remove 16-line stub function and redundant inline logging
- Update tests: verify real embed-sending behavior, replace
bug-documenting T1-5 diagnostic with shape validation guards
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mock routing in _patch_db_get and _failing_db_get still checked for
"evolution/cards/" after the production endpoint was renamed, causing
all badge-presence assertions to pass vacuously (evo_state=None).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces type=registry cache (which causes 400 errors from Docker Hub
due to stale buildx builders) with type=local backed by a named Docker
volume on the runner. Adds cache rotation step to prevent unbounded growth.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allows deploying to dev environment by pushing a "dev" tag.
Dev tags build with :dev Docker tag instead of :production.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Change `evolution/evaluate-game/` API call to `refractor/evaluate-game/` in
complete_game() hook (was calling the wrong endpoint path)
- Update all test assertions in test_complete_game_hook.py to match the
corrected endpoint path and update docstrings to "refractor" naming
- Remove helpers/evolution_notifs.py and tests/test_evolution_notifications.py
from this PR — they belong to PR #112 (WP-14 tier notifications). The
notify_tier_completion stub in logic_gameplay.py remains as the WP-14
integration target.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename helpers/evolution_notifs.py -> helpers/refractor_notifs.py
- Rename tests/test_evolution_notifications.py -> tests/test_refractor_notifs.py
- Delete utilities/evolution_notifications.py (replaced by helpers/refractor_notifs.py)
- Update TIER_NAMES to canonical names: Base Card, Base Chrome, Refractor, Gold Refractor, Superfractor
- Update T4 embed title from "FULLY EVOLVED!" to "SUPERFRACTOR!"
- Update FOOTER_TEXT from "Paper Dynasty Evolution" to "Paper Dynasty Refractor"
- Update non-max tier embed title from "Evolution Tier Up!" to "Refractor Tier Up!"
- Add discord.abc.Messageable type annotation to notify_tier_completion channel param
- Update all test assertions to match new tier names and strings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update module docstring: replace evolution/cards with refractor/cards,
drop old tier names (Unranked/Initiate/Rising/Ascendant/Evolved), add
correct tier names (Base Card/Base Chrome/Refractor/Gold Refractor/
Superfractor)
- Fix API call: db_get("evolution/cards") → db_get("refractor/cards")
- Add TIER_BADGES dict {1:"[BC]", 2:"[R]", 3:"[GR]", 4:"[SF]"}
- Update format_refractor_entry to prepend badge label for T1-T4 (T0 has
no badge)
- Add TestTierBadges test class (11 tests) asserting badge values and
presence in formatted output
- Update test_player_name_in_output to accommodate badge-prefixed bold name
Dead utilities/evolution_notifications.py has no source file on this branch
(WP-14/PR #112 already delivered the replacement).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
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>
Renames tests/test_card_embed_evolution.py to tests/test_card_embed_refractor.py
and updates the module-level docstring to use "Refractor tier progression" /
"Refractor API" instead of "evolution progress" / "evolution API".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace branch/PR-triggered Docker builds with tag-only triggers.
Images are now built only when a CalVer tag is pushed
(git tag YYYY.M.BUILD && git push origin YYYY.M.BUILD).
- Remove calver, docker-tags, and gitea-tag reusable actions
- Add inline version extraction from tag ref
- Keep existing build cache config
- Update CLAUDE.md versioning and CI/CD sections
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- TIER_BADGES dict moved from inside get_card_embeds() to module level
- Unknown tiers now show no badge instead of silently promoting to [SF]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tier badges shifted to match updated spec:
T1=[BC] Base Chrome, T2=[R] Refractor, T3=[GR] Gold Refractor, T4=[SF] Superfractor
T0 (Base Card) shows no badge. All 11 tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Badge labels: [R] Refractor, [GR] Gold Refractor, [SF] Superfractor, [SF★] fully evolved
- Fix broken {e} log format strings (restore `as e` + add f-string prefix)
- Restore ruff.toml from main (branch had stripped global config)
- Update all test assertions for new badge names (11/11 pass)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove global F841/F401 suppression; scope to legacy directories via
per-file-ignores so new files outside those paths get full enforcement
- Add per-file-ignores covering all 26 pre-existing violations that
currently block the pre-commit hook (E711/E713/E721/E722/F811/F821)
- Keep global ignores only for genuine project patterns:
F403/F405 (star imports in __init__.py), E712 (SQLModel ORM ==),
F541 (1000+ legacy f-strings, cosmetic, deferred cleanup)
- Add .gitea/workflows/ruff-lint.yml — ruff check on every PR to main,
so violations are caught before merge even if hook was bypassed
Closes#108
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
db_get returns None on API errors. Added None guard and fixed
dupe count math to use max(0, count - 1) instead of ternary
that produced -1 dupes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix 1 (closes#19): Complete the migration of daily_checkin to
discord.Interaction. Remove greeting = assignments and TODO comment;
replace await greeting.edit(...) with await interaction.edit_original_response(...).
Fix 2 (closes#23): Implement paperdex dupe detection in get_card_embeds().
Query cards API by player_id + team_id and display a 'Dupes' field on the
embed showing how many duplicate copies the team owns.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The players/random API endpoint only accepts min_rarity and max_rarity,
not rarity. The previous fix silently did nothing because FastAPI ignores
unknown query parameters.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>