andreagrandi / andreagrandi/draftomen

Detect draft formats and define format rules

Đang mở
#261 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
draftomen enhancement size: M
Ngôn ngữ chính
Python
Star
0
Fork
0
Merge trung bình
1 giờ 21 phút
Pull request đã merge (30 ngày)
188

Mô tả

## 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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
backend
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.