bug: Active game session desync, badge template resolution, and XP race conditions
还没有人认领这个 Issue。
- #2653 来自 @rajatsurana19 —— 已关闭,未合并
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
调研方向
The report names generate_badge, award_xp, update_opening_progress, and the game state views, but gives no file paths or test names. Start by locating those entry points and reading the linked closed pull request #2653 to see the status of the proposed fixes. Done means each of the five reported failures has a regression test and the affected behavior passes.
由索引模型根据 Issue 内容生成。
描述
Describe the Bug
During codebase security and testing analysis, multiple issues were confirmed:
- Active game state desync: For authenticated users, views (valid_moves, check_promotion, get_state, offer_draw) only query session['game'], returning empty legal moves and broken draw offers.
- Badge download crash: generate_badge uses an incorrect template directory path, resulting in FileNotFoundError on badge downloads.
- Progression race condition: award_xp updates XP without atomic transaction and row locking, causing lost progress under concurrent requests.
- Type error in opening trainer: update_opening_progress returns None instead of a tuple when user is None.
- Email sender fallback: Hardcoded EMAIL_HOST_USER causes failure in environments where only DEFAULT_FROM_EMAIL is set.
Steps to Reproduce
- Log in as an authenticated user, make a move, and call /api/valid-moves/ (returns empty moves).
- Unlock an achievement and call /achievement//download/ (raises FileNotFoundError).
Proposed Solution
I have already developed and verified minimal fixes with full test coverage on my fork, passing all 351 Django and Selenium tests, Flake8, and Bandit SAST.
I would like to work on this. Please assign this issue to me (@rajatsurana19) so I can submit the Pull Request.
- 主要语言
- Python
- 星标
- 140
- 派生
- 513
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Checkora/Checkora 的其他 Issue
-
[Bug]: AI Opening Book reply fails silently due to KeyError on move_history coordinates in ai_move未关闭bug GSSoC
难度 1/5 1 小时以内 新手友好度 88/100
-
enhancement GSSoC
难度 2/5 1-3 小时 新手友好度 68/100
-
[UI/UX] Missing hover effect on Resume and Pause buttons可能重新可做 @ishitadutta2 于 75 天前认领,目前没有进行中的 PR。 未关闭bug enhancement frontend good first issue GSSoC
难度 2/5 1-3 小时 新手友好度 72/100
-
fix(engine): cap move_history at 300 entries to prevent session cookie overflow可能重新可做 @ishitadutta2 于 75 天前认领,目前没有进行中的 PR。 未关闭bug GSSoC
难度 2/5 1-3 小时 新手友好度 72/100
-
bug GSSoC
难度 2/5 1-3 小时 新手友好度 62/100
查看 Checkora/Checkora 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
dbt-labs/spark-utils#51 ·
-
bug pydanty:is-working
难度 2/5 1-3 小时 新手友好度 68/100
pydantic/pydantic-ai#13444 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 82/100
-
good first issue help wanted
难度 1/5 1 小时以内 新手友好度 72/100
-
changelog investigate
难度 1/5 1 小时以内 新手友好度 68/100
ramnes/notion-sdk-py#502 ·