Skip to content

fix(voice): preserve cancellation intent in staff handoff#39

Merged
CapuchaRojo merged 2 commits into
mainfrom
feat/staff-controlled-reschedule-lane
May 8, 2026
Merged

fix(voice): preserve cancellation intent in staff handoff#39
CapuchaRojo merged 2 commits into
mainfrom
feat/staff-controlled-reschedule-lane

Conversation

@CapuchaRojo
Copy link
Copy Markdown
Owner

Summary

Fixes the cancellation-intent follow-up from the staff-controlled reschedule lane.

This PR:

  • Keeps cancellation phrases separate from reschedule requests.
  • Routes cancellation into a staff-controlled cancellation request path.
  • Preserves cancellation-specific intent in callback/handoff context.
  • Does not ask cancellation callers for a preferred new appointment time.
  • Tells callers staff will confirm before anything is canceled.
  • Keeps reschedule/move/change requests on the hidden staff-controlled reschedule lane.
  • Adds no Acuity cancellation or reschedule mutation.

Validation

  • npm run build passed
  • Targeted voice suites passed: 4 suites, 133 tests
  • git diff --check passed
  • Diff limited to:
    • api/src/routes/voice.ts
    • api/tests/voiceRescheduleLane.test.ts
    • ivr routing system.txt

Guardrails

  • No public self-service appointment mutation added.
  • No automatic Acuity cancellation added.
  • No payment behavior added.
  • No medical advice added.
  • No Press 1, Press 2, veteran, or payment behavior widened.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4c790b454

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread api/src/routes/voice.ts Outdated
Comment on lines +12622 to +12630
if (isCancellation) {
logVoiceOperationalStep({
eventName: "voice_flow_step",
callSid,
stage: "option3_after_hours_cancellation_selected",
correlationId,
payload: { reason: "cancellation_inquiry" },
});
return respondWithCancellationLaneStart("intent");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prioritize reschedule when both intents are spoken

When a caller says a common phrase like “cancel and reschedule my appointment” in the Press 3 after-hours submenu, both isCancellation and isReschedule are true, but this branch runs first and sends them to the cancellation-only lane, which explicitly does not collect a preferred new time. That drops the reschedule part of the request even though the utterance contains an explicit reschedule intent; the same cancellation-before-reschedule ordering is repeated in the general intent handler below, so mixed cancel/reschedule phrases will be misrouted there as well.

Useful? React with 👍 / 👎.

@CapuchaRojo CapuchaRojo merged commit 430df8b into main May 8, 2026
3 checks passed
@CapuchaRojo CapuchaRojo deleted the feat/staff-controlled-reschedule-lane branch May 8, 2026 21:37
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