- Move `import os` from inside evaluate_game() to module top-level imports
(lazy imports are only for circular dependency avoidance)
- Add get_or_none idempotency guard before RefractorBoostAudit.create()
inside db.atomic() to prevent IntegrityError on UNIQUE(card_state, tier)
constraint in PostgreSQL when apply_tier_boost is called twice for the
same tier
- Update atomicity test stub to provide card_state/tier attributes for
the new Peewee expression in the idempotency guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>