범인찾기 v1.3.1: OP.GG 세션 재시작 · 조회 실패 구분 · LOL.PS 라인전 10/15분

- opgg.ts: 세션 404 → 새 initialize 후 한 번 다시 (MCP 규격), 실패를 '경기 없음'과 나눠 meta.opgg.error · 화면 · 지시문에 반영
- rating.ts: 라인전을 LOL.PS 원문 정의대로 10 · 15분 맞라이너 CS · 골드 · 경험치 차로
- tools/opscore-fit/README.md: OP.GG(롤 · 발로란트) · LOL.PS 원문 인용과 구현 대응
- 테스트: 세션 재시작 · 503 · 일부 실패 · 서버 메타, 라인전 10/15분

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-15 15:57:00 +09:00
parent 34b1822426
commit 0e0a2723e3
14 changed files with 189 additions and 45 deletions

View File

@@ -363,12 +363,12 @@ export function registerCulprit(app: FastifyInstance, o: CulpritOptions) {
let fallback = false;
try {
// 전적 사이트 점수: 이 경기가 OP.GG 에 있으면 실제 OP스코어를 자료에 붙인다 (없거나 실패해도 기록 점수로 계속)
let opggMeta: { found: boolean; note?: string } | undefined;
let opggMeta: { found: boolean; error?: boolean; note?: string } | undefined;
let input = raw;
if (opgg && raw.lookup) {
publish(matchId, 'collect', 'OP.GG 점수 찾는 중');
const r = await lookupOpgg(raw, opgg).catch((e) => ({ scores: new Map(), found: false, note: `OP.GG 연결 실패 (${String(e?.message ?? e).slice(0, 80)})` }));
opggMeta = { found: r.found, ...(r.note ? { note: r.note } : {}) };
const r = await lookupOpgg(raw, opgg).catch((e) => ({ scores: new Map(), found: false, error: true, note: `OP.GG 연결 실패 (${String(e?.message ?? e).slice(0, 80)})` }));
opggMeta = { found: r.found, ...(r.error ? { error: true } : {}), ...(r.note ? { note: r.note } : {}) };
input = withOpgg(raw, r);
log.info({ matchId, opgg: opggMeta, n: r.scores.size }, '범인찾기 OP.GG 점수');
}