From 72a75621f6a92131d7170ef084127f1db06dff5a Mon Sep 17 00:00:00 2001 From: Siddhartha Prasad Date: Wed, 21 Jan 2026 19:17:57 -0500 Subject: [PATCH 1/3] A fix --- src/pickController.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pickController.ts b/src/pickController.ts index 6e8a546..da866b0 100644 --- a/src/pickController.ts +++ b/src/pickController.ts @@ -682,15 +682,12 @@ export class PickController { for (const record of this.wordHistory) { if (record.classification === WordClassification.ACCEPT) { for (const candidate of this.candidates) { - if (candidate.eliminated) { - continue; - } if (this.analyzer.verifyMatch(record.word, candidate.pattern)) { candidate.positiveVotes++; } else { // Candidate fails to match an accepted word - negative vote candidate.negativeVotes++; - if (candidate.negativeVotes >= candidate.eliminationThreshold) { + if (!candidate.eliminated && candidate.negativeVotes >= candidate.eliminationThreshold) { candidate.eliminated = true; logger.info( `[Replay] Eliminated candidate "${candidate.pattern}" after ${candidate.negativeVotes} negative votes (threshold ${candidate.eliminationThreshold}) - failed to match accepted word "${record.word}".` @@ -700,17 +697,17 @@ export class PickController { } } else if (record.classification === WordClassification.REJECT) { for (const candidate of this.candidates) { - if (candidate.eliminated) { - continue; - } if (this.analyzer.verifyMatch(record.word, candidate.pattern)) { candidate.negativeVotes++; - if (candidate.negativeVotes >= candidate.eliminationThreshold) { + if (!candidate.eliminated && candidate.negativeVotes >= candidate.eliminationThreshold) { candidate.eliminated = true; logger.info( `[Replay] Eliminated candidate "${candidate.pattern}" after ${candidate.negativeVotes} negative votes (threshold ${candidate.eliminationThreshold}) - incorrectly matched rejected word "${record.word}".` ); } + } else { + // Candidate correctly does NOT match a rejected word - positive vote + candidate.positiveVotes++; } } } From 9fa58e7c05db836c11648eafd4810b8833a04ed2 Mon Sep 17 00:00:00 2001 From: Siddhartha Prasad Date: Wed, 21 Jan 2026 19:18:12 -0500 Subject: [PATCH 2/3] hotfix --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ca02234..0c8eb60 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "publisher": "SiddharthaPrasad", "icon": "images/icon.png", "license": "MIT", - "version": "0.5.4", + "version": "0.5.5", "repository": { "type": "git", "url": "https://github.com/sidprasad/pick-regex" From 791af58f0248db303b04718b462ce3c7e5d13400 Mon Sep 17 00:00:00 2001 From: Siddhartha Prasad Date: Wed, 21 Jan 2026 19:31:15 -0500 Subject: [PATCH 3/3] Another bugfix --- src/pickController.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pickController.ts b/src/pickController.ts index da866b0..b75254a 100644 --- a/src/pickController.ts +++ b/src/pickController.ts @@ -705,10 +705,8 @@ export class PickController { `[Replay] Eliminated candidate "${candidate.pattern}" after ${candidate.negativeVotes} negative votes (threshold ${candidate.eliminationThreshold}) - incorrectly matched rejected word "${record.word}".` ); } - } else { - // Candidate correctly does NOT match a rejected word - positive vote - candidate.positiveVotes++; } + // If doesn't match: no vote (correctly rejecting is neutral/expected) } } }