You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[OPIK-7315] [BE] fix(cutover): bound the post-rollback compare by cutover_start, and correct what a sealed-week mismatch means
Two problems with pointing the post-rollback and retry compares at
'--to-week last-sealed'.
It bounds by the calendar, but the divergence is bounded by the cutover window.
Those are the same week only while the verify runs promptly; run it in any later
week and the window's own week counts as sealed, so the writes the rollback
deliberately discarded read as a fidelity failure. rollback.sh now computes and
prints the offset of the last week wholly before cutover_start, which does not
drift, and the runbook points at that instead of deriving one by hand. The query
is advisory and runs after the rollback has already succeeded, so it is
non-fatal: a blip prints instructions rather than aborting and swallowing the
remaining steps.
The stated rule - that a mismatch in a sealed week is the real signal - was also
too strong, in three places. Any write touching a PRE-EXISTING trace after
cutover_start diverges it in a sealed week, which no weekly bound can exclude,
because the divergence sits where the row was born rather than where the write
happened. Two shapes, confirmed locally: the trace-update endpoint keeps the
row's created_at, so the key differs on both sides; batch ingestion re-stamps it,
so the key goes missing from the successor in its original week. Both are the
discarded-write class. Document the triage that separates them from a real copy
gap - look the differing ids up in the successor without a week filter, and treat
last_updated_at >= cutover_start as benign - and carry the same caveat into the
post-EXCHANGE note, which asserted the same rule.
0 commit comments