← back to Dw Signup Fulfillment

verification/tk11114/E2E-PROOF.md

31 lines

# TK-11114 — E2E Proof (R4) · Status: PARTIAL / BLOCKED

**Agent:** iterm-tk11114-webhook → **Finalizer:** /root · **2026-09-02** · git HEAD `ce79cb4`
**Store:** designer-laboratory-sandbox.myshopify.com (LIVE prod) · **Service:** dw-signup-fulfillment (Kamatera :9862, dry_run=false)

## Headline
The task premise was **false**, and the real defect is elsewhere:
- **The `customers/create` webhook was NOT missing.** It has existed since **2026-08-06** (id `1490453430323`) and is **correctly wired** (running `WEBHOOK_URL_TOKEN` matches the registered address). ⇒ **Actions #1 (register) and #2 (env/pm2 restart) were NOT fired** — registering a second one would have caused **duplicate/double emails**.
- **The DW signup verify-email is broken at the SEND side.** Every `customers/create` fires the handler correctly, but the George send **fails for 100% of signups** (0 successful sends in the last 1500 prod log lines), and the error is **swallowed**. A real customer (`jolainajones@me.com`) is affected right now. **This is the true root cause of Kelly's missing-email report (TK-10830) — not a missing webhook.**

## Checks
| Boundary | Assertion | Verdict |
|---|---|---|
| shopify webhook registry | customers/create exists + wired | **PASS** (registered-token probe → 200 received) |
| service env | running `WEBHOOK_URL_TOKEN` present + matches | **PASS** (bad→401, registered→200) — #2 unneeded |
| webhookAuth (negative) | invalid token rejected | **PASS** (401 `bad_webhook_token`) |
| customer create (real path) | 1 controlled test customer, Steve `+dwgolive` alias | **PASS** (201, id `8412197617715`) |
| handler fires | customers/create reaches handler + re-fetch | **PASS** (prod log `[webhook] customers/create id=8412197617715`) |
| **email send (George) — critical** | verify letter delivered to controlled mailbox | **FAIL** (`started.ok:false`; `verify letter NOT sent`; 0 sends ever; inbox empty) |
| verify click → `verified-sample` tag | tag on click | **SKIP** (no email/link ever issued — critical SKIP) |
| duplicate-delivery idempotency | 2nd delivery = no-op | **INCONCLUSIVE** (failed-send branch leaves the flag unset by design) |
| cleanup / rollback | test customer removed | **PASS** (DELETE 200 → GET 404) |

A critical-path FAIL + SKIP ⇒ **no `done`/`fixed` claim**. Reported PARTIAL/BLOCKED.

## Root cause (for the fix, out of THIS task's scope)
`dw-signup-fulfillment` → George `/api/send` fails on every signup; `lib/verify.js#startVerification` returns `ok:false` **with no reason**, and `lib/email.js#georgePost` **logs nothing on failure**, so the outage is invisible. George itself answers a *direct* `/api/send` with 200 — but per finalizer that manual probe does **not** prove the organic service→George path (which is 0/0). Prime suspect: `config.GEORGE_ENVS` credential/token resolution precedence on Kamatera (`~/Projects/george-gmail/.env` is checked **before** the correct `~/DW-Agents/gmail-agent/.env`) — **UNCONFIRMED** (stopped per finalizer). Fix = repair the service→George auth resolution **and** add a real failure log so a swallowed send never hides again. Gated → drafted to pending-approval.

## Rollback executed
Test customer `8412197617715` DELETE → 200, GET → 404. **No webhook registered, no env changed, no pm2 restart** → nothing else to revert. Token redacted from all evidence (scan clean). `send-kelly-reply.js` and other untracked files left untouched.