7 Commits

Author SHA1 Message Date
th-kim0823
874de0a46d feat: QR PNG 생성 + vote URL resolver
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 19:54:31 +09:00
th-kim0823
546bd54700 feat: DEFAULT_TOPICS_SEED + ensure_topics_seeded
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 19:51:35 +09:00
th-kim0823
6c6929a505 feat: topics 헬퍼 (get_topics, update_topics)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 19:48:34 +09:00
th-kim0823
70f326eb20 feat: stage 헬퍼 (get_stage, set_stage, can_accept_votes)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 19:47:23 +09:00
th-kim0823
c675b8c297 feat: _empty_state — current_stage + topics 키 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 19:44:38 +09:00
th-kim0823
6e517be918 refactor: DB 제거 → 단일 hackathon.json (JSON only)
DB(sqlite + WAL) 제거. 모든 state를 단일 JSON 파일로 통합.
일회용/내부용이라 유지보수성/확장성보다 단순성 우선.

변경:
- app.py: sqlite3 import 제거. load_data/save_data + threading.RLock + atomic write
  - votes: list of dict
  - titles, tie_breaks, settings: dict
  - people: roster (assign_teams가 채움)
  - 누락 키 자동 보강
- assign_teams.py: hackathon.json 단일 출력. 기존 votes/titles 보존
- Dockerfile/compose: votes.db volume 제거. hackathon.json read-write mount
- tests/e2e.py: 12개 (12/12 통과). load/save/insert_vote/clear_votes/atomic 추가
- README: 새 데이터 구조 문서화
- roster.json/participants.json 제거 (hackathon.json으로 통합)

호스트 편집 워크플로:
- jq/vi로 hackathon.json 직접 편집
- 앱 매 요청 reload — 컨테이너 재시작 불필요

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 18:25:46 +09:00
th-kim0823
6cfc75e3b8 test: E2E 테스트 10개 (핵심 비즈니스 로직)
tests/e2e.py — 컨테이너에서 직접 실행:
1. roster.json 로드 (34명, 7팀, 한지승 포함, 김태현 제외)
2. 투표 마감 토글
3. 기본 winner (priority 충돌 없음)
4. priority 1팀 모든 분야 1위 → 다음 팀에 자동 이양
5. 동률 status='tie'
6. tie_break 적용 시 status='ok'
7. voter_name UNIQUE 강제
8. 팀 제목 영속
9. archive 파일 생성
10. archive 동률 미해결 시 skip

실행:
  docker cp tests/e2e.py hackathon-vote:/tmp/e2e.py
  docker exec hackathon-vote python3 /tmp/e2e.py

결과: 10/10 통과

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 17:59:30 +09:00