From 2c04504ad8f9cb4023054b160bebdadb119b2833 Mon Sep 17 00:00:00 2001 From: Matthew Jackson Date: Fri, 6 Mar 2026 11:05:54 -0800 Subject: [PATCH] fix: report unfilled required selects as unknown fields Non-EEO required selects with no answer were silently ignored, causing infinite loops when LinkedIn blocked page advancement. Now reported as unknown fields so the applier can exit with needs_answer status. Co-Authored-By: Claude Opus 4.6 --- lib/form_filler.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/form_filler.mjs b/lib/form_filler.mjs index 02f831d..538a854 100644 --- a/lib/form_filler.mjs +++ b/lib/form_filler.mjs @@ -297,7 +297,6 @@ export class FormFiller { const ll = lbl.toLowerCase(); if (ll.includes('race') || ll.includes('ethnicity') || ll.includes('gender') || ll.includes('veteran') || ll.includes('disability') || ll.includes('identification')) { - // Iterate options to find a "prefer not" variant — selectOption doesn't accept regex const opts = await sel.$$('option'); for (const opt of opts) { const text = await opt.textContent().catch(() => ''); @@ -306,6 +305,9 @@ export class FormFiller { break; } } + } else if (await this.isRequired(sel)) { + // Non-EEO required select with no answer — report as unknown + unknown.push(lbl); } } }