claude-memory/graph/fixes/fix-pitchingcardratingsmodel-xcheck-defaults-must-be-zeroed-2d7046.md
2026-02-25 16:27:03 -06:00

19 lines
1.4 KiB
Markdown

---
id: 2d704690-8790-4f67-bf0d-1bd1e50460a9
type: fix
title: "Fix: PitchingCardRatingsModel xcheck defaults must be zeroed in new_ratings"
tags: [paper-dynasty, card-creation, pitchers, card_builder, xcheck, pitchingcardratingsmodel, defaults, bug]
importance: 0.7
confidence: 0.8
created: "2026-02-25T22:26:54.035955+00:00"
updated: "2026-02-25T22:27:03.950479+00:00"
relations:
- target: 09bb95a5-2b2f-43e5-93a6-6b96b881461f
type: RELATED_TO
direction: outgoing
strength: 0.8
edge_id: d6768246-fb91-4568-b69c-00eafef8d6ea
---
## Problem\nPitchingCardRatingsModel has non-zero default values for xcheck fields:\n- xcheck_p=1.0, xcheck_c=3.0, xcheck_1b=2.0, xcheck_2b=6.0, xcheck_3b=3.0\n- xcheck_ss=7.0, xcheck_lf=2.0, xcheck_cf=3.0, xcheck_rf=2.0\n\nWhen creating the tracking new_ratings object in build_pitcher_full_cards(), if these are not explicitly zeroed, the accumulated xcheck values will be wrong (seeded with defaults instead of starting from 0).\n\n## Fix: Always Initialize Explicitly\n```python\nnew_ratings = PitchingCardRatingsModel(\n pitchingcard_id=data.pitchingcard_id,\n pit_hand=data.pit_hand, vs_hand=vs_hand,\n hard_rate=data.hard_rate, med_rate=data.med_rate, soft_rate=data.soft_rate,\n xcheck_p=0.0, xcheck_c=0.0, xcheck_1b=0.0, xcheck_2b=0.0,\n xcheck_3b=0.0, xcheck_ss=0.0, xcheck_lf=0.0, xcheck_cf=0.0, xcheck_rf=0.0\n)\n```\n\n## Location\npitchers/card_builder.py → build_pitcher_full_cards()