docs(specs): archive frontend quality guardrails

This commit is contained in:
2026-08-24 13:07:25 +03:00
parent 8897bd9585
commit 20295190dd
7 changed files with 400 additions and 0 deletions
@@ -0,0 +1,64 @@
## 1. Зафиксировать remediation scope
- [x] 1.1 В `docs/development/audit-remediation.md` перевести WL-P3-02,
WL-P3-03, WL-P3-05 и WL-P3-06 в `active` с change
`tighten-frontend-quality-guardrails`; WL-P3-04 оставить `planned` и не
добавлять terminal evidence до archive.
- [x] 1.2 Зафиксировать Node 22 baseline: выполнить frontend `npm run verify`,
записать observed tests, coverage и initial bundle size в change evidence.
## 2. Enforce structural public API boundaries
- [x] 2.1 Добавить fixture-based failing checks для dependency-cruiser: cycle
и import внутреннего file другого slice должны быть rejected, а same-slice и
public-index imports должны оставаться allowed.
- [x] 2.2 Запустить новые dependency fixture checks до implementation и
подтвердить expected red result для отсутствующих rules.
- [x] 2.3 Добавить `no-circular` и capture-group public-API rule в
`frontend/dependency-cruiser.cjs`; включить fixture checks в documented
frontend dependency gate.
- [x] 2.4 Вынести i18n initialization в leaf module, сохранить public exports
через `shared/i18n/index.ts` и перевести validation helper на leaf import,
чтобы устранить cycle.
- [x] 2.5 Реэкспортировать route error boundary из public routes API и
перевести application и auth imports на соответствующие public APIs.
- [x] 2.6 Выполнить targeted tests и `npm run deps`; подтвердить green result
для committed source и expected rejection обоих fixture violations.
## 3. Сделать initial payload измеримым и ограниченным
- [x] 3.1 Написать failing unit tests для manifest parser: он суммирует entry
asset с transitive eager imports, не включает dynamic imports, отклоняет
malformed manifest и сообщает initial-budget/lazy-baseline regressions.
- [x] 3.2 Запустить bundle parser tests и подтвердить expected red result до
создания parser/check command.
- [x] 3.3 Реализовать manifest-based bundle budget and explicit baseline
scripts без runtime dependencies; normal check не должен изменять baseline.
- [x] 3.4 Lazy-load route page boundaries через React lazy/Suspense с Mantine
fallback, не меняя route paths, auth redirects или application
accessibility policy.
- [x] 3.5 Включить Vite manifest output, bundle check и explicit reviewed lazy
route baseline в package scripts; добавить bundle check в `npm run verify`.
- [x] 3.6 Сформировать initial lazy-route baseline после code splitting и
подтвердить, что build проходит initial budget ≤ 500 * 1024 bytes.
- [x] 3.7 Выполнить bundle parser tests, route regression tests и bundle gate;
подтвердить green result и absence ручного vendor chunk policy.
## 4. Закрепить coverage floors
- [x] 4.1 Добавить global Vitest thresholds: statements 82, branches 75,
functions 75, lines 83, не меняя scenario tests ради процента.
- [x] 4.2 Запустить coverage command и подтвердить, что committed suite
проходит все четыре floors.
## 5. Провести completion checks
- [x] 5.1 Выполнить frontend `npm run verify` под Node 22, targeted tests,
`git diff --check` и зафиксировать observed results.
- [x] 5.2 Выполнить strict change validation, synced-spec validation и
OpenSpec authority verifier с `--store wealth-ledger-specs`.
- [x] 5.3 Провести independent read-only review implementation, tests,
generated/build artifacts и docs scope; устранить blocking findings до
archive.
- [x] 5.4 Выполнить applicable `opsx-verify` procedure и устранить every
blocking completeness, correctness или coherence result до archive.