andreagrandi / andreagrandi/draftomen
Detect draft formats and define format rules
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 1時間 18分
- マージ済み PR(30日)
- 197
説明
## Problem
`draftomen/events.py` accepts only `QuickDraft_*` event names and hard-codes Quick Draft pack, pick, and completion constants. Real private logs expose distinct Premier, Traditional, and Pick-Two event identifiers and different logical-pick rules. The Traditional corpus contains one format-verified sample without the drafting sequence, so shared human-draft behavior must be separated from Traditional-specific evidence.
## Proposed change
Add an explicit draft-format and rules model covering Quick, Premier, Traditional, and Pick-Two. Detect formats from `EventName`/equivalent metadata before payload heuristics. Use the verified Traditional identifier mapping and the Premier human-draft mechanism only where the observed protocol is shared; do not fabricate Traditional-specific differences. Parse human `Draft.Notify` pack notifications into format-aware events without yet adding pick-submission support.
Keep all full logs under `.git/private/player-logs/`; use hand-authored synthetic parser fixtures only.
## Acceptance Criteria
- [ ] The private corpus retains two Premier logs, two Pick-Two logs, and one metadata-verified Traditional Draft log.
- [ ] Raw logs and copied raw excerpts remain absent from tracked files, issues, and pull requests.
- [ ] A typed format/rules contract defines cards per logical pick and observed pack/pick progression.
- [ ] Explicit event metadata distinguishes Quick, Premier, Traditional, and Pick-Two.
- [ ] `Draft.Notify` pack contents and coordinates parse under the detected rules.
- [ ] Unknown event identifiers and incomplete notifications are handled without corrupting active state.
- [ ] Existing Quick Draft parser tests remain green.
- [ ] Focused parser tests and the changelog cover the new observable contract.
## Scope notes
No pick submissions, persistence migration, ratings propagation, or frontend changes.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start in draftomen/events.py and review the existing Quick Draft event handling before defining the format/rules contract. Use only hand-authored synthetic parser fixtures, keeping full logs under .git/private/player-logs/. Done means explicit detection for all four formats, format-aware Draft.Notify parsing, safe handling of unknown or incomplete notifications, green existing Quick Draft tests, focused parser tests, and a changelog entry.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100