OctoMonic DOG CAMP · S.O.S ANIMALS 2026-07-06

System Audit & Fix Report — קורס מאלפים צעירים

Full health check of the camp-management system built by Daniel, plus root-cause fix for phones displaying corrupted data. All work performed 06 Jul 2026, 09:00–09:30 IDT, on the live system with a full backup taken first.

✅ TL;DR

Phones weren't holding corrupted data — they were running an outdated app version with a display bug that flips numbers (RTL rendering: 96/97 shows as 97/96). The bug was fixed in v10.85 last night, but phones never pick updates up because the update prompt is passive. The system has a built-in force-refresh gate; the last deploy forgot to arm it. I armed it (min version → 10.85): every outdated phone now shows a "please refresh" lock screen, and one tap brings it fully current. Also closed a serious hole: the public API key allowed deleting the entire camp database — delete rights are now revoked.

🗺️ The system (as mapped today)

Live appmalfimzeirim.vercel.app — Hebrew React PWA, ~120 devices during camp (entry stations, tablets, staff + parent phones)
CodeGitHub danielmendel6-cell/-123 — single 13,545-line App.jsx; push to main auto-deploys
DatabaseSupabase DogSchoolApp — the whole camp lives in one 415 KB JSON blob (row shared-v2, rev ~4,490) with a custom sync layer: compare-and-swap revisions, 3-way merge, write audit log, min-version gate
Access nowWorking: Supabase (management token), GitHub (repo), deploys via git push. Not working: the Vercel token can't see the hosting project (wrong team/scope)

🔎 Root cause — "phones corrupted, tablets fine"

  1. Display bug, not data corruption: attendance ratios and similar number pairs rendered flipped on Hebrew (RTL) screens. Fixed in code in v10.84/v10.85 (the last one at 01:19 last night).
  2. Phones stay on old versions: the app checks for updates every 2 minutes but only shows a small button — nobody taps it mid-camp. Tablets get manually refreshed; parents' and guides' phones don't.
  3. The forgotten switch: the system has a min-version gate (data.minAppVer) that locks old clients behind a "גרסה ישנה — נא לרענן" screen. It was set to 10.84; the 10.85 deploy didn't raise it, so buggy 10.84 phones kept running.
  4. Aggravator for very old installs: the app's previous database (jqypzhmk…supabase.co, pre-June-14) no longer resolves — ancient bundles silently fall back to stale local data.

🔧 What was changed (live, after full backup)

FIXEDMin version raised 10.84 → 10.85 via atomic compare-and-swap (rev 4488; logged in the app's own audit table as admin-minver / octomonic-mclead, row 1007). Every client below 10.85 is now locked behind the refresh screen; one tap loads the current version. Verified: the next client write (rev 4489) preserved the setting.
FIXEDAnon DELETE revoked on the main table. The public key baked into the app could previously delete the entire camp record. The app never deletes it (verified in code) — policy tightened to select/insert/update with zero behavior change.
BACKUPAll 8 tables snapshotted to DogCamp/backups/2026-07-06T0920/ before any change. Rollback for both fixes is a one-line SQL each.

🧪 Health check — everything else

👉 Recommendations (your call, Tom)

  1. Auto-refresh on update when the app is idle (code change + deploy) — prevents this entire class of issue at every future deploy.
  2. Raise minAppVer as part of every deploy that changes data shape or fixes display bugs — make it a deploy-script step, not a memory test.
  3. Add app_ver to the write audit for future forensics.
  4. Get a correctly-scoped Vercel token from Daniel (or project transfer).
  5. Post-camp: real auth/RLS as part of the blob→tables migration already scaffolded (phase 1 is dormant and safe).

Prepared by McLead (OctoMonic AIOS) · 2026-07-06 09:30 IDT · Source data: Supabase writes audit, repo history, live DB inspection