Skip to content

fix(interview): don't duplicate the ask in a validation re-ask#26

Merged
eldonm merged 2 commits into
mainfrom
fix/interview-reask-duplicate-question
Jun 14, 2026
Merged

fix(interview): don't duplicate the ask in a validation re-ask#26
eldonm merged 2 commits into
mainfrom
fix/interview-reask-duplicate-question

Conversation

@eldonm

@eldonm eldonm commented Jun 14, 2026

Copy link
Copy Markdown
Member

Problem

A validator that returns a complete-sentence error already re-asks for the value (e.g. "Please provide a phone number with at least 7 digits."). validation_guidance_directive still appended the original field question, producing a repetitive reply:

Please provide a phone number with at least 7 digits. What is your WhatsApp mobile number?

Fix

Treat an error ending in . ! ? (or prefixed Tell the user: / Ask:) as a self-contained re-ask and skip the question. Only terse fragments (e.g. the Invalid value fallback) still get the question appended for context.

Tests

Adds tests/action/interview/test_validation_reask.py (complete-sentence not duplicated, terse fragment still appended, ?-ending self-contained, prefixed-error strip). Interview suite green.

Eldon Marks added 2 commits June 14, 2026 18:26
A validator that returns a complete-sentence error already re-asks for the value
(e.g. "Please provide a phone number with at least 7 digits."). validation_guidance_directive
still appended the original field question, producing a repetitive reply:
"Please provide a phone number with at least 7 digits. What is your WhatsApp
mobile number?".

Treat an error ending in . ! or ? (or prefixed Tell the user:/Ask:) as
self-contained and skip the question; only terse fragments (e.g. the "Invalid
value" fallback) still get the question appended for context.
@eldonm eldonm merged commit 4b2f23b into main Jun 14, 2026
3 checks passed
@eldonm eldonm deleted the fix/interview-reask-duplicate-question branch June 14, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant