Paper Dynasty Discord - Discord bot for card game
Go to file
Cal Corum b34dcc390c
All checks were successful
Ruff Lint / lint (pull_request) Successful in 22s
test: add comprehensive refractor test cases (T1-5 through T3-5)
Implements all gap tests identified by PO agents across three existing
test files. No new files created — tests added to existing modules.

T1-5 (test_refractor_notifs): Expose WP-14 integration bug — minimal
stub dict {player_id, old_tier, new_tier} causes KeyError in
build_tier_up_embed because player_name/track_name use bare dict access.
Documents the bug contract so WP-14 implementers know what to fix.

T1-6 (test_refractor_commands): Divergence tripwire — imports TIER_NAMES
from both cogs.refractor and helpers.refractor_notifs and asserts deep
equality. Will fail the moment the two copies fall out of sync.

T1-7 (test_card_embed_refractor): TIER_BADGES format contract — asserts
that wrapping helpers.main badge values in brackets produces cogs.refractor
badge values (e.g. "BC" -> "[BC]") for all tiers.

T2-7 (test_refractor_notifs): notify_tier_completion with None channel
must not raise — the try/except absorbs AttributeError from None.send().

T2-8 (test_refractor_commands): All-T4 apply_close_filter returns empty
list. Documents intended behaviour for tier=4 + progress="close" combo.

T3-2 (test_refractor_commands): Malformed API response handling —
format_refractor_entry must use fallbacks ("Unknown", 0) for missing keys.

T3-3 (test_refractor_commands): Progress bar boundary precision — 1/100,
99/100, 0/100, and negative current values.

T3-4 (test_refractor_commands): RP formula label — card_type="rp" shows
"IP+K" (previously only "sp" was tested).

T3-5 (test_refractor_commands): Unknown card_type falls back to raw string
as the formula label without crashing.

112 tests pass (23 new, 89 pre-existing).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 08:59:18 -05:00
.gitea/workflows ci: switch buildx cache from registry to local volume 2026-03-23 21:16:08 -05:00
.githooks feat: add /resend_scout admin command and pre-commit hooks 2026-03-09 10:39:08 -05:00
.plans Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
.vscode Catchup commit 2025-07-22 09:22:19 -05:00
cogs Merge branch 'main' into ai/paper-dynasty-database#76 2026-03-23 20:11:17 +00:00
command_logic fix: rename evolution/ to refractor/ endpoint and remove misplaced notifs module 2026-03-23 15:22:25 -05:00
discord_ui fix: use money endpoint for scout token wallet deduction 2026-03-16 12:23:33 -05:00
helpers fix: update evolution/cards endpoint to refractor/cards (#113) 2026-03-24 00:19:23 -05:00
in_game fix: batch cleanup — dead code, bare excepts, empty stubs (#25, #32, #37, #38) 2026-03-22 23:23:09 -05:00
migrations Update cache refresh logic to replace vs delete 2025-02-23 22:50:58 -06:00
tests test: add comprehensive refractor test cases (T1-5 through T3-5) 2026-03-24 08:59:18 -05:00
utilities fix: rename evolution to refractor terminology, fix tier names 2026-03-23 15:12:59 -05:00
.dockerignore fix: exclude utilities/supabase.py from production Docker image (#41) 2026-03-04 23:01:49 -06:00
.gitignore fix: add explicit .gitignore entry for service-creds.json (#40) 2026-03-03 12:36:26 -06:00
alembic.ini Added base alembic config 2024-10-11 16:42:15 -05:00
api_calls.py fix: batch cleanup — dead code, bare excepts, empty stubs (#25, #32, #37, #38) 2026-03-22 23:23:09 -05:00
CLAUDE.md ci: switch to tag-based Docker builds 2026-03-23 10:46:55 -05:00
constants.py Fix Athletics Team Choice pack KeyError 2026-01-04 16:20:05 -06:00
db_calls_gameplay.py fix: pack rarity targeting, StratGame methods, HR detection (#20 #21 #22) 2026-03-22 23:31:16 -05:00
deploy.sh Add HTTP health check endpoint for container monitoring 2025-11-12 14:44:53 -06:00
DEPLOYMENT.md Catchup files 2025-11-11 13:22:06 -06:00
dice.py fix: unpack range() objects in pitcher error rating checks 2026-02-11 15:33:37 -06:00
Dockerfile chore: pin all Python dependency versions (#82) 2026-03-10 02:03:17 -05:00
exceptions.py Implement play locking to prevent concurrent command processing 2026-02-03 23:13:40 -06:00
gauntlets.py Add API timeout/retry logic and fix get_team_by_owner for PostgreSQL 2026-01-31 15:52:14 -06:00
health_server.py Implement play locking to prevent concurrent command processing 2026-02-03 23:13:40 -06:00
help_text.py S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06:00
LICENSE Initial commit 2020-07-07 13:56:19 -05:00
manual_pack_distribution.py S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06:00
notify_restart.py Update restart notification message to be more accurate 2026-02-03 23:29:51 -06:00
paperdynasty.py refactor: rename Evolution to Refractor system 2026-03-23 08:48:31 -05:00
play_lock.py Fix circular import by moving play lock functions to separate module 2026-02-04 09:33:37 -06:00
PRODUCTION_COGS.md DOCS: Add production cogs documentation for future reference 2025-11-10 09:46:11 -06:00
pytest.ini Catchup commit 2025-07-22 09:22:19 -05:00
random_content.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
requirements-dev.txt chore: pin all Python dependency versions (#82) 2026-03-10 02:03:17 -05:00
requirements.txt chore: pin all Python dependency versions (#82) 2026-03-10 02:03:17 -05:00
ruff.toml refactor: rename Evolution badges to Refractor tier names 2026-03-23 08:50:11 -05:00
search_utils.py Catchup commit 2025-07-22 09:22:19 -05:00
utils.py CLAUDE: Fix get_roster_sheet() to handle both dict and Team objects 2025-11-10 09:11:37 -06:00
VERSION Update VERSION 2026-02-11 21:35:13 +00:00