doctor.sh never validates PULLWRIGHT_APPROVER_INSTALLATION_IDS is a well-formed JSON object, though lib/approver-token.sh's comment says it does
Id: TD-PPagop-26083012 · Status: open · Filed: 2026-08-30
lib/approver-token.sh’s approver_token_installation_id_for deliberately treats a set-but-malformed PULLWRIGHT_APPROVER_INSTALLATION_IDS (invalid JSON, or valid JSON that is not an object) as an empty map, falling through to the scalar PULLWRIGHT_APPROVER_INSTALLATION_ID — and its comment justifies this with ‘malformed configuration is exactly what scripts/doctor.sh exists to catch before this ever runs against it’. But scripts/doctor.sh has no such check: it only consumes the map through the same lenient resolver. On a multi-owner fleet a typo’d map therefore surfaces as misdirected diagnoses — either ‘the Approver App installation does not cover
Default: Add the explicit doctor check (fail when the map is set but not a valid JSON object) rather than softening the comment — the comment describes the right design, doctor just doesn’t implement it yet.
Section titled “Default: Add the explicit doctor check (fail when the map is set but not a valid JSON object) rather than softening the comment — the comment describes the right design, doctor just doesn’t implement it yet.”Noticed while the Approver was judging https://github.com/Poetic-Poems/agent-ops/pull/1059.
Migrated to https://github.com/Pullwright/agent-ops/issues/2008.