Skip to content

Make store-account sign-in the only support identity - #19

Merged
codeyogi911 merged 2 commits into
mainfrom
feat/shopify-first-identity
Aug 8, 2026
Merged

Make store-account sign-in the only support identity#19
codeyogi911 merged 2 commits into
mainfrom
feat/shopify-first-identity

Conversation

@codeyogi911

Copy link
Copy Markdown
Owner

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:

  • Anonymous: knowledge-grounded answers, freely — nothing in the chat ever asks for a name, email, or password again.
  • The moment identity is needed (order lookup, ticket, human hand-off): a sign-in card appears in-thread, styled after the store's own hosted login — bold lead, one full-width brand CTA, "quick code by email, no password", "sign-in happens on the store's own secure page".
  • The hand-off preserves the conversation: session name stashed before redirect, resume marker on return, same agent session continues. Safety escalations parked before sign-in open their ticket immediately after it; 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 in the transcript.
  • Unconfigured deployments degrade honestly: answers-only assistant that points to the support request form (which remains the accessible non-chat fallback).

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

  • Full npm run check green: 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.
  • Evals: 13 consecutive passes including two new bars (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.
  • Visual: sign-in card verified in-browser against the hosted store login reference.

🤖 Generated with Claude Code

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
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>
@codeyogi911
codeyogi911 merged commit 9c13612 into main Aug 8, 2026
6 checks passed
@codeyogi911
codeyogi911 deleted the feat/shopify-first-identity branch August 8, 2026 16:25
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