From cb19eb4479373a709ee47ee7e7bd26e280511d4d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Apr 2026 00:55:51 +0000 Subject: [PATCH 1/3] Initial plan From 676f26a157d552dab641219548b2c2cfdd03c79a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Apr 2026 01:02:13 +0000 Subject: [PATCH 2/3] fix: correct go response no longer resets wrong streak in Otter Stop Agent-Logs-Url: https://github.com/acrosman/BrainSpeedExercises/sessions/66cba88e-b5c5-4b94-b3ae-9313d9d1b35e Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com> --- app/games/otter-stop/game.js | 2 +- app/games/otter-stop/tests/game.test.js | 41 ++++++++++++++++++------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/app/games/otter-stop/game.js b/app/games/otter-stop/game.js index c3e5331..fa5dcad 100644 --- a/app/games/otter-stop/game.js +++ b/app/games/otter-stop/game.js @@ -253,7 +253,7 @@ export function recordResponse(isNoGo, spacePressed) { staircaseState = { value: level, consecutiveCorrect, - consecutiveWrong: 0, + consecutiveWrong, }; } } else { diff --git a/app/games/otter-stop/tests/game.test.js b/app/games/otter-stop/tests/game.test.js index 465d4aa..7e7554f 100644 --- a/app/games/otter-stop/tests/game.test.js +++ b/app/games/otter-stop/tests/game.test.js @@ -317,10 +317,10 @@ describe('recordResponse()', () => { expect(getConsecutiveCorrect()).toBe(0); }); - it('resets consecutiveWrong to 0', () => { - recordResponse(false, false); // wrong first - recordResponse(false, true); // now correct - expect(getConsecutiveWrong()).toBe(0); + it('does not reset consecutiveWrong (only a correct no-go inhibition resets it)', () => { + recordResponse(false, false); // wrong first (consecutiveWrong = 1) + recordResponse(false, true); // correct go — does NOT reset wrong streak + expect(getConsecutiveWrong()).toBe(1); }); }); @@ -491,14 +491,33 @@ describe('recordResponse()', () => { expect(getConsecutiveWrong()).toBe(2); }); - it('a correct response resets the wrong streak', () => { + it('a correct no-go inhibition resets the wrong streak', () => { for (let i = 0; i < 6; i += 1) recordResponse(true, false); // level → 2 - recordResponse(false, false); - recordResponse(false, false); - recordResponse(false, true); // correct go — resets wrong streak - recordResponse(false, false); - recordResponse(false, false); - expect(getLevel()).toBe(2); // no drop + recordResponse(false, false); // miss, consecutiveWrong = 1 + recordResponse(false, false); // miss, consecutiveWrong = 2 + recordResponse(true, false); // correct no-go inhibition — resets wrong streak + recordResponse(false, false); // miss, consecutiveWrong = 1 + recordResponse(false, false); // miss, consecutiveWrong = 2 + expect(getLevel()).toBe(2); // no drop (only 2 wrong since last correct no-go) + }); + + it('a correct go response does not reset the wrong streak', () => { + for (let i = 0; i < 6; i += 1) recordResponse(true, false); // level → 2 + recordResponse(false, false); // miss, consecutiveWrong = 1 + recordResponse(false, false); // miss, consecutiveWrong = 2 + recordResponse(false, true); // correct go — does NOT reset wrong streak + recordResponse(false, false); // miss, consecutiveWrong = 3 → level drops to 0 + expect(getLevel()).toBe(0); + }); + + it('3 false alarms with correct forced-go responses between them cause a level drop', () => { + for (let i = 0; i < 6; i += 1) recordResponse(true, false); // level → 2 + recordResponse(true, true); // false alarm, consecutiveWrong = 1 + recordResponse(false, true); // correct forced go — does NOT reset wrong streak + recordResponse(true, true); // false alarm, consecutiveWrong = 2 + recordResponse(false, true); // correct forced go — does NOT reset wrong streak + recordResponse(true, true); // false alarm, consecutiveWrong = 3 → level drops + expect(getLevel()).toBe(0); }); }); }); From 4ec04932c557ec26273689cde18b89b6cf535e04 Mon Sep 17 00:00:00 2001 From: Aaron Crosman Date: Thu, 23 Apr 2026 21:16:17 -0400 Subject: [PATCH 3/3] Remove PR Windows test builds --- .github/workflows/pr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 27001c0..d90fd91 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ macos-latest, ubuntu-latest, windows-latest ] + os: [ macos-latest, ubuntu-latest ] steps: - uses: actions/checkout@v6 - name: Use Node.js 24