paper-dynasty-card-creation/docs
Cal Corum cc5f93eb66 Fix critical asterisk regression in player names
CRITICAL BUG FIX: Removed code that was appending asterisks to left-handed
players' names and hash symbols to switch hitters' names in production.

## Changes

### Core Fix (retrosheet_data.py)
- Removed name_suffix code from new_player_payload() (lines 1103-1108)
- Players names now stored cleanly without visual indicators
- Affected 20 left-handed batters in 2005 Live cardset

### New Utility Scripts
- fix_player_names.py: PATCH player names to remove symbols (uses 'name' param)
- check_player_names.py: Verify all players for asterisks/hashes
- regenerate_lefty_cards.py: Update image URLs with cache-busting dates
- upload_lefty_cards_to_s3.py: Fetch fresh cards and upload to S3

### Documentation (CRITICAL - READ BEFORE WORKING WITH CARDS)
- docs/LESSONS_LEARNED_ASTERISK_REGRESSION.md: Comprehensive guide
  * API parameter is 'name' NOT 'p_name'
  * Card generation caching requires timestamp cache-busting
  * S3 keys must not include query parameters
  * Player names only in 'players' table
  * Never append visual indicators to stored data

- CLAUDE.md: Added critical warnings section at top

## Key Learnings
1. API param for player name is 'name', not 'p_name'
2. Cards are cached - use timestamp in ?d= parameter
3. S3 keys != S3 URLs (no query params in keys)
4. Fix data BEFORE generating/uploading cards
5. Visual indicators belong in UI, not database

## Impact
- Fixed 20 player records in production
- Regenerated and uploaded 20 clean cards to S3
- Documented to prevent future regressions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 14:38:04 -06:00
..
arm_rating_scale_reference.md Card Creation Automation 2025-11-23 01:28:33 -06:00
CRITICAL_BUG_FIX_fielder_columns.md Card Creation Automation 2025-11-23 01:28:33 -06:00
formula_weight_comparison.md Card Creation Automation 2025-11-23 01:28:33 -06:00
HOW_TO_USE_ARM_RATINGS.md Card Creation Automation 2025-11-23 01:28:33 -06:00
LESSONS_LEARNED_ASTERISK_REGRESSION.md Fix critical asterisk regression in player names 2025-11-24 14:38:04 -06:00
of_arm_rating_improvement_proposal.md Card Creation Automation 2025-11-23 01:28:33 -06:00
RETROSHEET_ARM_SUMMARY.md Card Creation Automation 2025-11-23 01:28:33 -06:00