Make store-account sign-in the only support identity - #19
Merged
Conversation
The in-chat contact card and its email-OTP verification flow are removed. Identity is Shopify-first: anonymous callers get knowledge-grounded answers freely, and the moment an order lookup, ticket, or human hand-off is needed, a sign-in card appears in-thread — styled after the store's own hosted login — and the hosted store login is the only identity step. Nothing in the chat ever asks a customer to type a name, email, or password. - The sign-in hand-off preserves the conversation: the client stashes its session name, the callback returns with a resume marker, and the same agent session continues. Escalations and order flows complete deterministically after sign-in (parked safety tickets open immediately; order questions answer from list_my_orders or a number already in history); a pending ticket request falls through to the model, which holds the original ask. - Deployments without the identity rail configured degrade honestly: the assistant answers from the help centre and directs follow-up to the support request form. - Removed: voice/verification.ts, the contact and verification cards and their styles, four WebSocket message types, the OTP test hooks, and the contact-card continuation protocol. VoiceSessionState no longer holds any identity. - Prompts, eval worker, and eval cases rewritten to the sign-in bars, including a new bar that a signed-in caller is never sent to hunt for an order number. The pre-existing unfamiliar-product search-first case remains the known flaky one and blocked full suite pass-through this session; the rewritten cases beyond it are covered by the deterministic agent tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
codeyogi911
enabled auto-merge (squash)
August 8, 2026 16:16
The Playwright suite drove the removed contact card. The flows now cover the sign-in card, the no-typed-identity invariant, and the resume leg of the hosted-login round trip; darwin goldens recaptured. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The legacy in-chat identity is gone. This removes the name/email contact card and the email-OTP verification flow entirely (net −726 lines) and makes the Shopify store account the one way a customer identifies themselves:
list_my_ordersor a number already in history; a pending ticket request falls through to the model, which holds the original ask in the transcript.Removed
voice/verification.ts, both in-chat identity cards and their CSS, four WebSocket message types (set_voice_contact,request_voice_verification,verify_voice_code,clear_voice_identity), the contact-card continuation protocol, OTP test hooks, and all identity fields from durable session state — identity now arrives only as the verified store-account cookie on each connection.Validation
npm run checkgreen: 214 tests including 10 rewritten agent WS tests that cover every deterministic path — sign-in requested once for escalations/orders/bare numbers, pending flows completing after the signed-in reconnect, tampered cookies treated as anonymous, tickets filed under the verified identity.order_lookup_serves_own_orders,signed_in_order_list) proving a signed-in caller is never sent to hunt for an order number. The pre-existing flaky unfamiliar-product case (tracked separately) blocked full-suite pass-through this session; the rewritten cases beyond it are tool-name/wording swaps of previously passing cases with their production paths covered by the agent tests.🤖 Generated with Claude Code