From 7e3d989ea785a37072b638780440839e7df36dd0 Mon Sep 17 00:00:00 2001 From: Homen Shum Date: Wed, 3 Jun 2026 21:26:51 -0700 Subject: [PATCH] fix(schema): allow spreadsheetEvents.operation row_delta to unblock prod deploys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P0: production deploy pipeline down ~6h. scripts/vercel-build.sh runs convex deploy --typecheck=enable (fail-closed) before the build; it fails schema-vs-data validation because a shared-prod spreadsheetEvents doc carries operation 'row_delta', not in the 8-literal union. row_delta appears nowhere in main source (git grep = 0) — stale data written out-of-band from the unmerged applyRowDelta feature (8e58a265). Additive expand makes the stray doc valid without mutating prod data: backfill-safe, reversible. Founder-approved (Option A). Re-cut of closed-unmerged #502. Co-Authored-By: Claude Opus 4.8 (1M context) --- convex/schema.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/convex/schema.ts b/convex/schema.ts index 6018067b..7f570c5b 100644 --- a/convex/schema.ts +++ b/convex/schema.ts @@ -4969,6 +4969,14 @@ export default defineSchema({ v.literal("apply_formula"), v.literal("add_sheet"), v.literal("rename_sheet"), + // Additive expand to unblock prod: a shared-prod spreadsheetEvents doc carries + // operation "row_delta" (written out-of-band from the unmerged applyRowDelta + // feature, commit 8e58a265), so `convex deploy --typecheck=enable` fails + // schema-vs-data validation and aborts EVERY production deploy. Adding the + // literal makes the stray doc valid without mutating prod data (backfill-safe, + // reversible). Follow-up: constrain storeSpreadsheetEvent's v.any() seam + // (audit P1-2) so the class can't recur, then land/retire the feature. + v.literal("row_delta"), ), targetRange: v.optional(v.string()), // A1 notation (e.g., "A1:B5") payload: v.any(), // Operation-specific data (before/after)