andreagrandi / andreagrandi/draftomen
Detect draft formats and define format rules
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 1 h 21 min
- PR fusionados (30 d)
- 188
Descripción
## 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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- backend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100