Skip to content

ENG-443 Decommission Criteria: Gmail-pull (gog-cli)

This document defines the criteria for decommissioning the interim Gmail-pull workflow (ScheduledCkGmailPollWorkflow) implemented for Cleveland Kitchen (CK) under ENG-443.

For the cutover and decommissioning execution plans, see ENG-505 (cutover) and ENG-506 (decommission).

The following conditions must be met before the ScheduledCkGmailPollWorkflow can be safely removed from the codebase and the Temporal schedules:

  1. Gmail OAuth Connection Working (Staging/Production)

    • ENG-505 built-in Gmail OAuth integration is deployed and verified in staging.
    • Connection to the target inbox is stable and successfully syncing messages.
  2. Per-Customer OAuth Grants in Place

    • CK administration has approved the official Ordermatic OAuth application.
    • OAuth grants are properly stored and accessible by the built-in pull service.
  3. Traffic Cutover Verified (Dual-Run)

    • All Cleveland Kitchen customerservice@ traffic is confirmed to be flowing through the new Gmail OAuth integration.
    • The legacy ScheduledCkGmailPollWorkflow is no longer receiving unique messages that are not also captured by the new integration.
    • Dual-Run Verification:
      • 48h continuous wall-clock with both paths active.
      • β‰₯20 message ingest events on BOTH paths.
      • zero diff discrepancies reported by ENG-505c’s diff job.
  4. Historical Data Integrity

    • Historical Purchase Orders (POs) from the interim period have been verified as present in the system (either via the interim vacuum or the new backfill).
  5. Schedule Decommissioning

    • The ScheduledCkGmailPollWorkflow schedule has been paused for at least 48 hours without impact.
    • The schedule has been deleted from Temporal.

Context: The interim polling hack was necessitated by CK’s Google Workspace policy blocking external forwarding. The original alternative was to use a Nylas forward rule or direct Nylas connection.

Update: The β€œNylas Forward Rule” alternative is now moot for CK since per-org Gmail OAuth is built natively. We no longer need to rely on Nylas for CK’s Gmail integration. Note that Nylas remains a deferred Phase 2 option for non-Gmail customers.