Skip to content

Reduce Supabase egress with incremental Duel sync and lazy proofs - #66

Merged
Maseeek merged 2 commits into
mainfrom
fix/supabase-egress
Oct 14, 2026
Merged

Maseeek merged 2 commits into
mainfrom
fix/supabase-egress

Conversation

@Maseeek

@Maseeek Maseeek commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #65. Check-ins and cheers previously reloaded complete Duel history, including embedded photos. This change synchronizes revisions and changed metadata, loads proofs when viewed, caches history per project/account/Duel, pauses inactive polling with backoff, and batches week-scoped wearable updates. Existing data and proofs remain in place.

realtime or reopen → one delta read → update isolated metadata cache
view proof → authorized photo read
edit note or points → patch supplied fields → preserve omitted photos

Reconciled with main after PR #64. Its view/history improvements remain; metadata proof counts also preserve the optimized badge calculation. Tests for the superseded full-history pagination loader are replaced by delta/SQL/browser coverage.

Evidence

  • Before: realtime signals redownloaded full history/photos. After: the production browser fixture with 731 historical Check-ins makes one delta read for twenty signals, uses a 45-byte unchanged reopen response, and requests one photo when opening the gallery.
  • Typecheck, lint, 164 tests and the disposable PostgreSQL migration/RLS suite pass on the reconciled code. Configured production build and browser flows pass, including offline reopening, remote deletion, proof-preserving note edits, profile-only updates and optimistic writes surviving stale reads. No page errors.
  • Applied supabase/egress.sql through Supabase MCP on 2026-10-14 as migration 20261014175421_reduce_duel_egress_incremental_sync. All 118 live Check-ins and 10 proof-bearing records retain their complete pre-migration digest. Authenticated metadata retains all history without photo bytes; original proofs resolve and unchanged deltas are 48 bytes. Outsiders receive no metadata/sync heads, anonymous RPC execution is denied, RLS/realtime are enabled, and security-advisor findings are unchanged.
  • Browser fixture evidence and rollout verification. Local fixture results are synthetic, not billed production measurements. Fresh GitHub CI and Vercel preview checks run on integration commit 3ed5fdb.

Merge Danger

Door: two-way. Reverting the client keeps original tables and proofs usable. The additive migration is already applied; it neither deletes nor rewrites existing progress or photos. No billing changes.

Blast Radius: synchronization. History reads, proof loading, caching, polling and Check-in patches change. Initial metadata retains full history for lifetime scores and streaks; backup exports resolve original proofs. PR #62 remains open and also touches store/profile integration.

Hosted multi-session load and interactive production flows remain unverified. Vercel MCP returns a team-scope 403 and the deployed app is behind Vercel Authentication; local production browser and live database checks are available above.

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
do-it Ready Ready Preview Oct 14, 2026 5:57pm UTC

Keep incremental synchronization, lazy proofs and isolated caching while retaining the merged view and history performance changes. Remove tests for the superseded full-history loader and verify metadata-only proofs preserve badge unlocks.

Record the Supabase MCP migration and live RLS, proof and data-preservation checks. Typecheck, lint, 164 tests, PostgreSQL checks, production build and browser flows pass.
@Maseeek
Maseeek merged commit 26adbd5 into main Oct 14, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 3ed5fdb0 Deployed Oct 14, 2026 by vercel[bot]
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.

Reduce Supabase egress while preserving proofs and complete Duel history

1 participant