Skip to content

chore(ci): drop stale cloudSync entries from localStorage allowlist#2058

Merged
Skords-01 merged 1 commit into
mainfrom
devin/1778081896-storage-pr054-burn-cloudsync-allowlist
May 6, 2026
Merged

chore(ci): drop stale cloudSync entries from localStorage allowlist#2058
Skords-01 merged 1 commit into
mainfrom
devin/1778081896-storage-pr054-burn-cloudsync-allowlist

Conversation

@Skords-01
Copy link
Copy Markdown
Owner

@Skords-01 Skords-01 commented May 6, 2026

Що це

Stage 7 cleanup продовження — підбираємо хвости після PR #052b (#2046, web cloudSync v1 engine drop) та PR #052c (20793adb, mobile cloudSync v1 engine drop).

Що міняю

  1. eslint.config.js — прибираю 4 стейлові entry-и з apps/web/src/** allowlist для sergeant-design/no-raw-local-storage:

    • apps/web/src/core/cloudSync/logger.ts — файл видалений у #052b
    • apps/web/src/core/cloudSync/queue/offlineQueue.ts — файл видалений у #052b
    • apps/web/src/core/cloudSync/state/moduleData.ts — файл видалений у #052b
    • apps/web/src/core/cloudSync/enqueue.ts — файл лишається як no-op shim для syncedKV.ts (PR fix(barcode): покращення надійності та точності сканера штрихкодів #53 KVStore deprecate видалить його), але прямого localStorage.* доступу там більше нема (rawRemoveItem handle пішов разом з clearSyncManagedData у #052b), тож exemption теж не потрібен.
  2. .tech-debt/localstorage-allowlist-budget.json — опускаю production budget з 10 → 6 щоб зберегти headroom = 0 (per вже існуючий rationale в файлі: "new sites must migrate an existing one to keep parity").

  3. docs/planning/storage-roadmap.md — позначаю PR #052c як LANDED (commit 20793adb); таблиця Stage 7 status тепер 4/4 in flight (3 commits landed + fix(barcode): покращення надійності та точності сканера штрихкодів #53/fix(food-search): фільтр релевантності + англійський fallback + нові … #54 outstanding).

Після цього PR

Лишилося 6 entry-ів у no-raw-local-storage allowlist для web — усі це storage-primitive файли (storage.ts, storageManager.ts, storageQuota.ts, typedStore.ts, createModuleStorage.ts, useLocalStorageState.ts), які саме і реалізують safe-LS обгортки. Їх на burndown ніхто не планує — вони і є цільова точка enforcement-у.

Наступні кроки в Stage 7:

Verification

  • pnpm lint локально — pass.
  • node scripts/check-localstorage-allowlist.mjs6/6 (headroom 0) — pass.
  • node --test scripts/__tests__/check-localstorage-allowlist.test.mjs — 12/12 subtests pass.

Per AGENTS hard rule #5 — scope

Scope ci оскільки зачіпає eslint.config.js + scripts/-budget + roadmap doc.


Summary by cubic

Dropped four stale cloudSync entries from the sergeant-design/no-raw-local-storage allowlist in eslint.config.js (including removing the no-op enqueue.ts exemption) after the v1 engine was removed. Reduced the production allowlist budget from 10 to 6 to keep headroom at 0, and updated the storage roadmap to reflect the mobile engine removal.

Written for commit bc80b35. Summary will update on new commits.

Summary by CodeRabbit

  • Chores
    • Updated storage configuration and planning documentation to reflect removal of cloudSync v1 engine on mobile.
    • Updated linting configuration as part of storage architecture cleanup.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 6, 2026

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

Project Deployment Actions Updated (UTC)
sergeant Ready Ready Preview, Comment May 6, 2026 3:48pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ce512139-5798-4a21-8033-84f96698f1f9

📥 Commits

Reviewing files that changed from the base of the PR and between f6a9cce and c8ca572.

📒 Files selected for processing (3)
  • .tech-debt/localstorage-allowlist-budget.json
  • docs/planning/storage-roadmap.md
  • eslint.config.js

📝 Walkthrough

Walkthrough

This PR documents the removal of cloudSync v1 engine and reduces technical debt by updating the localStorage allowlist budget count from 10 to 6, removing the exemption for a cloudSync file from ESLint rules, and recording the mobile-side engine removal in the storage roadmap.

Changes

CloudSync v1 Removal & Storage Debt Cleanup

Layer / File(s) Summary
Roadmap Documentation
docs/planning/storage-roadmap.md
New landed PR entry for #052c documents mobile cloudSync v1 engine removal: engine/, queue/, state/, net/, and related subsystems deleted; useCloudSync hooks stubbed; 23 files touched.
Tech Debt Budget Update
.tech-debt/localstorage-allowlist-budget.json
Production count reduced from 10 to 6; rationale updated to reflect that cloudSync v1 engine is removed and only six storage-primitive files remain implementing safe-LS wrappers.
Lint Rules Cleanup
eslint.config.js
Removed direct localStorage exemption for cloudSync enqueue file; added Stage 7 comment block documenting that exemption is no longer needed per PR #054.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Skords-01/Sergeant#1589: Both PRs modify the same tech-debt budget and eslint allowlist files to decrement localStorage exemption counts as part of the storage migration.
  • Skords-01/Sergeant#1774: Both PRs follow the same pattern of removing per-file raw-localStorage exemptions and updating the localstorage-allowlist-budget.json production count.
  • Skords-01/Sergeant#1512: Both PRs address the cloudSync v1 removal and the associated localStorage sync flow migration.

Poem

A engine deprecated, its stage now past,
Six keepers remain where once were more vast.
Lint rules now clear, no exemptions to hide—
CloudSync v1 bows; v2 leads the ride. 🐰✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1778081896-storage-pr054-burn-cloudsync-allowlist

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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>
@Skords-01 Skords-01 force-pushed the devin/1778081896-storage-pr054-burn-cloudsync-allowlist branch from bc80b35 to c8ca572 Compare May 6, 2026 15:46
@github-actions github-actions Bot added the size/S label May 6, 2026
@Skords-01 Skords-01 merged commit 079fe8e into main May 6, 2026
2 of 4 checks passed
@Skords-01 Skords-01 deleted the devin/1778081896-storage-pr054-burn-cloudsync-allowlist branch May 6, 2026 15:47
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

⏱️ CI Pipeline Duration Report

Based on the last 50 successful runs on the default branch.

Overall Pipeline

Metric Value
p50 6m 26s
p95 7m 55s
p99 9m 3s
Current run 12m 37s
vs p95 +59.4%

Trend (last 20 runs): ▃▃▁▂▃▃▃▂▃▃▂▂▄▃▃▆▅▄█▆

Per-Job Breakdown

Job p50 p95 p99 Current vs p95
Accessibility (axe-core) 2m 5s 2m 21s 2m 23s 0s -100.0%
Commit messages (commitlint) 0s 0s 0s 35s N/A
Critical-flow E2E (Playwright) 1m 36s 1m 44s 1m 44s 2m 4s +19.2%
Migration lint (AGENTS rule 0s 0s 0s 11s N/A
Pipeline duration (p95 trend) 26s 27s 27s
Secret scan (gitleaks) 8s 11s 11s 9s -18.2%
Smoke E2E (Playwright) 1m 26s 1m 40s 1m 40s
Test coverage (vitest) 2m 4s 2m 33s 2m 33s 10m 34s +314.4%
Workflow lint (actionlint) 7s 7s 7s 5s -28.6%
check 4m 12s 4m 54s 5m 6s 1m 8s -76.9%
tsconfig strict guard (PR-1.A) 5s 14s 14s 6s -57.1%

⚠️ Warning: Current run (12m 37s) exceeds p95 + 20% threshold (9m 30s). Consider reviewing slow jobs.

Skords-01 added a commit that referenced this pull request May 6, 2026
Governance-sync CI на PR #2058 валив на 12 dangling source refs у
non-aspirational docs, що залишились після PR #052b/#052c (web + mobile
cloudSync v1 engine drop). Hard Rule #15 вимагає, щоб docs рухались
разом з кодом — фіксую тут паралельно з allowlist-cleanup-ом, бо це
один theme (Stage 7 cleanup).

- ADR-0004 (LWW conflict resolution): помічений Status: superseded by
  ADR-0047 + Superseded by section з лінком на ADR-0047 і syncEngine
  writer; inline path mentions переведено у короткі `cloudSync/...`
  форми (поза backtick-ed-anchor regex-у) з історичним префіксом.
- ADR-0011 (local-first storage) + ADR-0021 (memory-bank): refs до
  `cloudSync/config.ts` переведено на canonical shared registry
  `packages/shared/src/sync/modules.ts`.
- data-exchange-storage-audit.md: refs до cloudSync engine + mobile
  sync переведено у короткі форми з v2 op-log writer +
  sync_op_log migration links як successor-pointer-и.
- observability/frontend.md: 'CloudSync-події' секція переписана —
  `cloudSync/hook/useSyncCallbacks.ts` (web v1 tree) помічений як
  видалений у #052b, successor — `syncEngineWriter.ts`.
- tech-debt/mobile.md: посилання на `mobile/sync/config.ts`
  (видалений у #052c) переведено на shared registry.

Verify: `pnpm lint:governance-sync` тепер 0 errors (раніше 12).
Co-Authored-By: dmytro.s.stakhov <dmytro.s.stakhov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant