공정성 확인: 결과 화면에서 브라우저가 SHA-256(씨앗)을 직접 계산해 시작 때 공개한 값과 비교

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-04 05:46:30 +09:00
parent 9519b09be8
commit 31aedbfcc9
2 changed files with 33 additions and 6 deletions

View File

@@ -129,6 +129,10 @@ try {
await a.getByText('🎉 이겼어요!').waitFor();
await b.getByText('아쉽게 졌어요').waitFor();
await a.waitForTimeout(500); // let the sheet animation finish
// Fairness check: the browser recomputes SHA-256(seed) and compares with the published hash.
await a.getByText('공정성 확인').click();
await a.getByRole('button', { name: '내 브라우저에서 직접 확인하기' }).click();
await a.getByText('✓ 일치해요').waitFor();
await a.screenshot({ path: join(SHOTS, '3-result-pc.png') });
await b.screenshot({ path: join(SHOTS, '4-result-phone.png') });
});