Riot ID 자동 갱신 (Riot 클라이언트에 붙으면 바로 · 10분마다 이름 서비스로 연결 계정의 지금 Riot ID 확인, puuid 는 그대로 두고 표시 이름만) · 경기 탭 데스매치 숨김 · 모드(GET /api/matches/modes) · 날짜(after) 필터 (예전 앱은 사이트가 거름) · 범인찾기 목록 데스매치 숨김 · 녹음 없거나 끊긴 경기도 범인찾기 (eligibility.notes, AI 자료에 안내 줄) · Riot 경기 기록 마지막 확인 시각(historyAt) 안내 · 테스트
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -49,8 +49,9 @@ test('범인찾기: 분석 가능 판정과 AI 자료', () => {
|
||||
const ctx = setup();
|
||||
const { id } = seedValorant(ctx);
|
||||
const m = ctx.store.getMatch(id)!;
|
||||
assert.deepEqual(ctx.culprit.eligibility(m), { state: 'ready', reasons: [] });
|
||||
assert.deepEqual(ctx.culprit.eligibility(m), { state: 'ready', reasons: [], notes: [] });
|
||||
const input = ctx.culprit.buildInput(m);
|
||||
assert.ok(!input.text.includes('녹음'), '녹음이 경기를 다 덮으면 녹음 안내 줄 없음');
|
||||
const lines = input.text.split('\n');
|
||||
assert.match(lines[0], /^# 경기 발로란트 .* 13:9 \(우리 팀 승리\) · 22라운드/);
|
||||
// 우리 팀이 P1~P5, 하늘은 음성O, 디스코드 계정이 없는 상대는 음성X
|
||||
@@ -88,16 +89,30 @@ test('범인찾기: 분석 가능 판정과 AI 자료', () => {
|
||||
assert.ok(u2Index > lines.findIndex((l) => l.startsWith('[u1] ')));
|
||||
});
|
||||
|
||||
test('범인찾기: 녹음이 늦게 시작 · 음성 변환 중 · 녹음 제외', () => {
|
||||
test('범인찾기: 녹음이 늦게 시작 · 녹음 없음 · 음성 변환 중 · 녹음 제외', () => {
|
||||
// 녹음이 끊긴 경기도 분석한다 (v1.11.0): 녹음된 대화만 쓰고 AI 에 알린다
|
||||
const late = setup();
|
||||
const a = seedValorant(late, { sessionStartOffsetMs: 17 * MIN });
|
||||
const e = late.culprit.eligibility(late.store.getMatch(a.id)!);
|
||||
assert.equal(e.state, 'blocked');
|
||||
assert.deepEqual(e.reasons, ['녹음이 경기 시작 12분 뒤에 시작됐습니다']);
|
||||
assert.deepEqual(e, { state: 'ready', reasons: [], notes: ['녹음이 경기 시작 12분 뒤에 시작됐습니다: 녹음된 대화만 씁니다'] });
|
||||
assert.ok(late.culprit.buildInput(late.store.getMatch(a.id)!).text.includes('\n# 녹음이 경기 시작 12분 뒤에 시작됐습니다. 녹음이 빠진 구간의 대화는 없다\n'));
|
||||
|
||||
// 앱을 켜지 않고 한 경기 (녹음 · 대화 없음): 플레이 기록 · 채팅으로만
|
||||
const none = setup();
|
||||
const n = seedValorant(none);
|
||||
none.store.db.prepare('DELETE FROM utterances').run();
|
||||
none.store.db.prepare('DELETE FROM sessions').run();
|
||||
const nm = none.store.getMatch(n.id)!;
|
||||
assert.deepEqual(none.culprit.eligibility(nm), { state: 'ready', reasons: [], notes: ['녹음 없음: 플레이 기록 · 채팅으로만 분석합니다'] });
|
||||
const ni = none.culprit.buildInput(nm);
|
||||
assert.ok(ni.text.includes('\n# 이 경기는 음성 녹음이 없다. 모두 음성X 로 보고 플레이 기록과 채팅으로만 평가한다\n'));
|
||||
assert.ok(ni.players.every((p) => !p.voice));
|
||||
assert.equal(ni.stats.utterances, 0);
|
||||
assert.ok(ni.stats.events > 0 && ni.stats.rounds > 0);
|
||||
|
||||
const pend = setup();
|
||||
const b = seedValorant(pend, { pending: true });
|
||||
assert.deepEqual(pend.culprit.eligibility(pend.store.getMatch(b.id)!), { state: 'pending', reasons: ['음성 변환 중 (1문장 남음)'] });
|
||||
assert.deepEqual(pend.culprit.eligibility(pend.store.getMatch(b.id)!), { state: 'pending', reasons: ['음성 변환 중 (1문장 남음)'], notes: [] });
|
||||
|
||||
// 녹음 제외한 사람의 대화는 보내지 않는다
|
||||
const ex = setup();
|
||||
|
||||
Reference in New Issue
Block a user