Skip to content

Commit bc80b35

Browse files
chore(ci): drop stale cloudSync entries from localStorage allowlist
PR #052b/#052c видалили cloudSync v1 engine tree, включно з `apps/web/src/core/cloudSync/{logger,queue/offlineQueue,state/moduleData}.ts` — allowlist-entry-и для них тепер посилаються на видалені файли. `apps/web/src/core/cloudSync/enqueue.ts` лишається як no-op shim для `syncedKV.ts` до PR #53 KVStore deprecate, але прямого `localStorage.*` доступу там більше нема (`rawRemoveItem` handle пішов разом з `clearSyncManagedData` в #052b), тож exemption теж не потрібен. Прибрав 4 стейлові entry-и з `eslint.config.js` (web `no-raw-local-storage` allowlist) і опустив бюджет `.tech-debt/localstorage-allowlist-budget.json` з 10 → 6 щоб зберегти headroom = 0 (per existing rationale). Решта 6 entry-ів — storage-primitive файли (`storage.ts`, `storageManager.ts`, `storageQuota.ts`, `typedStore.ts`, `createModuleStorage.ts`, `useLocalStorageState.ts`) — самі і реалізують safe-LS обгортки; на burndown ніхто не планує. Також відмітив у `docs/planning/storage-roadmap.md` що PR #052c залендив у commit `20793adb` — таблиця Stage 7 status тепер 4/4 in flight (3 commits landed + #53/#54 outstanding). Co-Authored-By: dmytro.s.stakhov <dmytro.s.stakhov@gmail.com>
1 parent 20793ad commit bc80b35

3 files changed

Lines changed: 14 additions & 17 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"production": 10,
3-
"rationale": "Updated 2026-05-05 (storage-roadmap.md Stage 7 / PR #054 sub): production count 1110 after migrating apps/web/src/modules/finyk/lib/storageManager.ts off direct localStorage onto safeReadStringLS / safeWriteLS / safeRemoveLS у тілі finto→finyk rename-міграції; також dropped dead exports `key`/`getJSON`/`setJSON` (0 consumers). (Headroom: 0 — bump only with a deliberate decision; new sites must migrate an existing one to keep parity.) Burndown plan in docs/diagnostics/2026-05-03-web-deep-dive/02-architecture-and-state.md §2.2 + docs/tech-debt/frontend.md §2 + docs/planning/storage-roadmap.md PR #054."
2+
"production": 6,
3+
"rationale": "Updated 2026-05-06 (storage-roadmap.md Stage 7 / PR #054 sub): production count 106 after PR #052b/#052c видалили cloudSync v1 engine tree — стейлові allowlist-entry-и `apps/web/src/core/cloudSync/{logger,queue/offlineQueue,state/moduleData}.ts` посилаються на видалені файли, а `apps/web/src/core/cloudSync/enqueue.ts` тепер no-op shim без прямих `localStorage.*` викликів. Лишилися 6 storage-primitive файлів (`storage.ts`, `storageManager.ts`, `storageQuota.ts`, `typedStore.ts`, `createModuleStorage.ts`, `useLocalStorageState.ts`) які саме і реалізують safe-LS обгортки — їх на burndown ніхто не планує. (Headroom: 0 — bump only with a deliberate decision; new sites must migrate an existing one to keep parity.) Burndown plan in docs/diagnostics/2026-05-03-web-deep-dive/02-architecture-and-state.md §2.2 + docs/tech-debt/frontend.md §2 + docs/planning/storage-roadmap.md PR #054."
44
}

docs/planning/storage-roadmap.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
> | 4 — Finyk module migration | ✅ COMPLETE (5/5) | [#035](https://github.com/Skords-01/Sergeant/pull/1667), [#036](https://github.com/Skords-01/Sergeant/pull/1680), [#037](https://github.com/Skords-01/Sergeant/pull/1694), [#038](https://github.com/Skords-01/Sergeant/pull/1702), [#039](https://github.com/Skords-01/Sergeant/pull/1711) | — |
1515
> | 5 — op-log v2 hardening | ✅ COMPLETE | [#040](https://github.com/Skords-01/Sergeant/pull/1717), [#041](https://github.com/Skords-01/Sergeant/pull/1721), [#043](https://github.com/Skords-01/Sergeant/pull/1734), [#043a](https://github.com/Skords-01/Sergeant/pull/1739), [#043b](https://github.com/Skords-01/Sergeant/pull/1743), [#043c](https://github.com/Skords-01/Sergeant/pull/1754), [#044](https://github.com/Skords-01/Sergeant/pull/1780), [#048](https://github.com/Skords-01/Sergeant/pull/1737), [#042a](https://github.com/Skords-01/Sergeant/pull/1769), [#042b](https://github.com/Skords-01/Sergeant/pull/1776), [#042c](https://github.com/Skords-01/Sergeant/pull/1787), [#042d-prep](https://github.com/Skords-01/Sergeant/pull/1804), [#042d-builder](https://github.com/Skords-01/Sergeant/pull/1810), [#042e-mapping](https://github.com/Skords-01/Sergeant/pull/1827), [#042e-submit](https://github.com/Skords-01/Sergeant/pull/1901), [#042e-drain](https://github.com/Skords-01/Sergeant/pull/1913), [#042e-lifecycle](https://github.com/Skords-01/Sergeant/pull/1922), [#042e-pushloop](https://github.com/Skords-01/Sergeant/pull/1926), [#042e-scheduler](https://github.com/Skords-01/Sergeant/pull/1932), [#042e-status](https://github.com/Skords-01/Sergeant/pull/1933), [#042e-recover](https://github.com/Skords-01/Sergeant/pull/1935), [#042e-flush](https://github.com/Skords-01/Sergeant/pull/1938) | — |
1616
> | 6 — ops | ✅ COMPLETE | [#046](https://github.com/Skords-01/Sergeant/pull/1923) (pgBouncer), [#047](https://github.com/Skords-01/Sergeant/pull/1928) (read replica), [#048](https://github.com/Skords-01/Sergeant/pull/1737) (sync dashboard), [#049 docs](https://github.com/Skords-01/Sergeant/pull/1757), [#049b](https://github.com/Skords-01/Sergeant/pull/1964) (weekly backup-verify CI), #050 (`module_data` partition + archival) | #045 Redis (optional) |
17-
> | 7 — cleanup | ⏳ in flight (3/4) | #051+#052a [`75dcdd5c`](https://github.com/Skords-01/Sergeant/commit/75dcdd5c) (drop `module_data` table + видалити v1 server `syncPush*`/`syncPull*` handler-и + `MODULE_DATA_MODULES` const); #052b [`a97b8cc8`](https://github.com/Skords-01/Sergeant/commit/a97b8cc8) ([#2046](https://github.com/Skords-01/Sergeant/pull/2046), web cloudSync engine tree drop); #052c — mobile cloudSync engine tree drop (in flight) | #053 (KVStore deprecate), #054 (final localStorage burndown) |
17+
> | 7 — cleanup | ⏳ in flight (4/4) | #051+#052a [`75dcdd5c`](https://github.com/Skords-01/Sergeant/commit/75dcdd5c) (drop `module_data` table + видалити v1 server `syncPush*`/`syncPull*` handler-и + `MODULE_DATA_MODULES` const); #052b [`a97b8cc8`](https://github.com/Skords-01/Sergeant/commit/a97b8cc8) ([#2046](https://github.com/Skords-01/Sergeant/pull/2046), web cloudSync engine tree drop); #052c [`20793adb`](https://github.com/Skords-01/Sergeant/commit/20793adb) (mobile cloudSync engine tree drop) | #053 (KVStore deprecate), #054 (final localStorage burndown) |
1818
>
1919
> **Per-PR scope and Done/Risk/Dep notes** живуть у §3 (PR plans) нижче — таблиця тут лише задля швидкого огляду landed-стану. **Boot-wiring** для `register{Routine,Fizruk,Nutrition,Finyk}DualWriteContext` залендив у [#1491](https://github.com/Skords-01/Sergeant/pull/1491) (Routine + Fizruk web/mobile) + per-module `useNutritionDualWriteBoot` / `useFinykDualWriteBoot` хуки (Nutrition + Finyk web + mobile через `NutritionApp.tsx` / `useStorage.ts`).
2020
> **Status:** Active
@@ -2184,9 +2184,9 @@ client_updated_at)` (Postgres requirement для partitioned tables).
21842184
- `enqueue.ts` (no-op) — лишається до PR #053 KVStore deprecate, бо `apps/web/src/shared/lib/storage/syncedKV.ts` все ще передає його в `createSyncedKVStore({onChange})`.
21852185
- App.tsx + useAppEffects.ts + OfflineBanner.tsx + MigrationPrompt UI **залишилися як є в #052b** — rewire винесено в окремий follow-up `chore(web): drop MigrationPrompt and detangle App.tsx cloudSync wiring` (PR #052b-followup), бо це vertical в App.tsx, що окремо рев'ювиться.
21862186
2187-
#### **PR #052c — `chore(mobile): remove cloudSync v1 engine`** ⏳ IN FLIGHT
2187+
#### **PR #052c — `chore(mobile): remove cloudSync v1 engine`** ✅ LANDED
21882188
2189-
- Mirror того самого drop у `apps/mobile/src/sync/`. Mobile `useCloudSync`
2189+
- Commit [`20793adb`](https://github.com/Skords-01/Sergeant/commit/20793adb) — mirror того самого drop у `apps/mobile/src/sync/`. Mobile `useCloudSync`
21902190
теж stub-нутий у попередньому Phase 5 client-cutover (Initiative 0003),
21912191
engine код лежить dead-code.
21922192
- Видаляється: `engine/` (buildPayload, pull, push, replay, retryAsync),

eslint.config.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -519,18 +519,15 @@ export default [
519519
// FIZRUK_WORKOUTS_STORAGE_ERROR custom event тепер dispatch-иться,
520520
// коли `safeWriteLS` повертає `false`, з generic-reason — банер сам
521521
// формує текст для користувача).
522-
// Cloud-sync internals — the queue / enqueue / state writer all
523-
// need direct access; users should call the cloud-sync API.
524-
"apps/web/src/core/cloudSync/logger.ts",
525-
"apps/web/src/core/cloudSync/queue/offlineQueue.ts",
526-
"apps/web/src/core/cloudSync/state/moduleData.ts",
527-
// PR #008 split the old `storagePatch.ts` (monkey-patch removed)
528-
// into `enqueue.ts` (the explicit dirty-marking entry point) and
529-
// `syncedKV.ts` (the wrapper). `enqueue.ts` keeps a `rawRemoveItem`
530-
// handle so `clearSyncManagedData` can wipe a previous user's
531-
// slice without re-firing `enqueueChange` for every key it deletes
532-
// — that is the only direct `localStorage` access here.
533-
"apps/web/src/core/cloudSync/enqueue.ts",
522+
// PR #054 (storage-roadmap.md Stage 7): cloudSync v1 internals
523+
// (`logger.ts`, `queue/offlineQueue.ts`, `state/moduleData.ts`)
524+
// були видалені в PR #052b разом з рештою v1 engine tree —
525+
// allowlist-entry-и стали стейловими і прибрані тут. `enqueue.ts`
526+
// лишається як no-op shim для `syncedKV.ts` (PR #053 KVStore
527+
// deprecate видалить його разом з KVStore-фасадом), але
528+
// прямого `localStorage.*` доступу там більше нема (`rawRemoveItem`
529+
// handle пішов разом з `clearSyncManagedData` в #052b), тож
530+
// exemption теж не потрібен.
534531
// PR #054 (storage-roadmap.md Stage 7): finyk storage manager
535532
// мігровано на `safeReadStringLS` / `safeWriteLS` / `safeRemoveLS`
536533
// у тілі finto→finyk-міграції; dead exports `key`/`getJSON`/`setJSON`

0 commit comments

Comments
 (0)