965e015709
Known Pitfalls (new subsection): - HARD BAN: git checkout -- <file>, git restore, git reset (per AGENTS.md Critical Anti-Patterns; destroyed user in-progress edits twice on 2026-06-07; concrete 2026-06-10 incident: mma_tier_usage_reset_fix regression) Live_gui Test Fragility (2 new subsections): - Anti-pattern: push_event + time.sleep(N) + assert is a race. Fix: poll-until-state-visible with bounded retries. 5+ tests affected in 2026-06-10 batch-green wave. - Async setters need poll-for-state. mma_state_update and rag_* setters dispatch to _pending_gui_tasks queue; the setter returns before the GUI render loop processes the task. Assert immediately = race. Fix: poll via get_value with bounded retry.