refactor!: simplify query and session ownership #46

Merged
ksv741 merged 7 commits from codex/simplify-complexity into develop 2026-10-07 10:29:49 +03:00
Owner

Цель

Уменьшить runtime states и custom coordination без потери текущего UX и session isolation.

Изменения

  • Удалены Web Locks, latestReads, response tickets и access epochs; query cancellation/reset остаются у TanStack Query.
  • Удалены hash notifications, повторный GET ради exact stateVersion и второй transport/query-state model.
  • Sync handle/scope берутся из native mutation.data/variables; removed requested state, scope ref и layout effect.
  • Удалены forwarding helpers и повторная runtime consistency validation trusted income data.
  • Обновлены OpenAPI snapshot/generated types; исправлен lint-staged для игнорируемых generated files штатным --no-warn-ignored.

Contract и ограничения

Backend contract: WealthLedger/backend@d698ed9. Удалённые stateVersion/progress/resources больше не используются; ресурсы читаются через sync=observe.
Межвкладочная auth synchronization не обещается: допустим reload/re-login. Локальные single-flight, cookie request ordering и mutation identity guard сохранены.

Проверки

  • npm run verify: 436 tests, coverage, lint/typecheck, OpenAPI check, Knip, dependency checks, app/Storybook builds — passed.
  • Тест смены scope проверяет out-of-order responses и отсутствие polling старого handle.
  • Double synchronous refresh, session/connection changes и cached data recovery — passed.
  • Browser smoke production build с synthetic API: login → refresh → logout → login другого пользователя, старый счёт отсутствует, console errors 0.
  • Pre-commit Gitleaks/lint-staged прошли без обхода hooks.

Связь с frontend #6 только тематическая: выделение второго client/browser-suite не выполнялось и issue не закрывается.

## Цель Уменьшить runtime states и custom coordination без потери текущего UX и session isolation. ## Изменения - Удалены Web Locks, latestReads, response tickets и access epochs; query cancellation/reset остаются у TanStack Query. - Удалены hash notifications, повторный GET ради exact stateVersion и второй transport/query-state model. - Sync handle/scope берутся из native mutation.data/variables; removed requested state, scope ref и layout effect. - Удалены forwarding helpers и повторная runtime consistency validation trusted income data. - Обновлены OpenAPI snapshot/generated types; исправлен lint-staged для игнорируемых generated files штатным --no-warn-ignored. ## Contract и ограничения Backend contract: WealthLedger/backend@d698ed9. Удалённые stateVersion/progress/resources больше не используются; ресурсы читаются через sync=observe. Межвкладочная auth synchronization не обещается: допустим reload/re-login. Локальные single-flight, cookie request ordering и mutation identity guard сохранены. ## Проверки - npm run verify: 436 tests, coverage, lint/typecheck, OpenAPI check, Knip, dependency checks, app/Storybook builds — passed. - Тест смены scope проверяет out-of-order responses и отсутствие polling старого handle. - Double synchronous refresh, session/connection changes и cached data recovery — passed. - Browser smoke production build с synthetic API: login → refresh → logout → login другого пользователя, старый счёт отсутствует, console errors 0. - Pre-commit Gitleaks/lint-staged прошли без обхода hooks. Связь с frontend #6 только тематическая: выделение второго client/browser-suite не выполнялось и issue не закрывается.
codex-bot added 1 commit 2026-10-03 17:48:53 +03:00
refactor!: simplify query and session ownership
Frontend verify / commits (pull_request) Failing after 27s
Frontend verify / security (pull_request) Skipped
Frontend verify / verify (pull_request) Skipped
69997075e5
Use Query cancellation and native mutation results instead of HTTP
registries, access epochs and copied scope state.
Keep local auth ordering and mutation identity fences.
Allow staged generated files to remain excluded from ESLint.

Backend contract: WealthLedger/backend@d698ed9

BREAKING CHANGE: drop investment stateVersion/progress/resources
from the client contract and use data/metadata readiness instead of
rewritten query status. Cross-tab auth may require re-login.
Author
Owner

CI diagnosis

Повтор run 805 снова завершился до checks: Nexus возвращает HTTP 502 при npm ci для zod-validation-error@4.0.2 (transitive dependency eslint-plugin-react-hooks@7.1.1). Прямой запрос того же Nexus URL также 502; официальный registry.npmjs.org отдаёт этот архив с HTTP 200.

Это blocker registry/proxy, а не lint/test failure. Требуется восстановить выдачу архива зеркалом Nexus и повторить CI; audit и остальные gates сохранены.

Связанные PR: backend #43, docs #27, specs #20, deploy #3.

## CI diagnosis Повтор run 805 снова завершился до checks: Nexus возвращает HTTP 502 при npm ci для zod-validation-error@4.0.2 (transitive dependency eslint-plugin-react-hooks@7.1.1). Прямой запрос того же Nexus URL также 502; официальный registry.npmjs.org отдаёт этот архив с HTTP 200. Это blocker registry/proxy, а не lint/test failure. Требуется восстановить выдачу архива зеркалом Nexus и повторить CI; audit и остальные gates сохранены. Связанные PR: [backend #43](https://git.personal.ksv741.ru/WealthLedger/backend/pulls/43), [docs #27](https://git.personal.ksv741.ru/WealthLedger/docs/pulls/27), [specs #20](https://git.personal.ksv741.ru/WealthLedger/specs/pulls/20), [deploy #3](https://git.personal.ksv741.ru/WealthLedger/deploy/pulls/3).
ksv741 added 1 commit 2026-10-03 22:09:43 +03:00
fix(deps): remove npm dependency on Nexus
Frontend verify / commits (pull_request) Successful in 42s
Frontend verify / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Failing after 36m0s
c096fc70ef
Nexus hosts release Docker images, not npm dependencies.

Omit registry URLs using npm's native lockfile option.

Versions and integrity hashes remain unchanged.
Author
Owner

Исправление диагноза и root cause — c096fc7

По уточнению владельца Nexus используется только для публикации релизных Docker images. Причина npm-обращений оказалась в package-lock.json: 166 resolved URLs были явно привязаны к npm-all Nexus, включая zod-validation-error@4.0.2. Эти URLs появились в 5763010 (typed ESLint checks). Workflow использует обычный npm ci.

Предыдущая рекомендация чинить Nexus для npm была ошибочной. Исправлен lockfile штатной npm option omit-lockfile-registry-resolved: npm использует настроенный registry (локально — https://registry.npmjs.org/), без закреплённых Nexus endpoints. В версиях, integrity-хешах и остальной metadata нет изменений — проверено полным deepEqual с предыдущим lockfile за вычетом resolved registry URLs.

  • npm ci --ignore-scripts — passed.
  • npm audit --include=dev --audit-level=low: 0 vulnerabilities.
  • npm run verify: 436 tests, lint/typecheck, OpenAPI, dependency checks, app/Storybook builds — passed.
  • Strict commitlint PR range — passed; hooks сохранены.
  • Новый CI проверит реальную установку на runner.
## Исправление диагноза и root cause — c096fc7 По уточнению владельца Nexus используется только для публикации релизных Docker images. Причина npm-обращений оказалась в package-lock.json: 166 resolved URLs были явно привязаны к npm-all Nexus, включая zod-validation-error@4.0.2. Эти URLs появились в 5763010 (typed ESLint checks). Workflow использует обычный npm ci. Предыдущая рекомендация чинить Nexus для npm была ошибочной. Исправлен lockfile штатной npm option omit-lockfile-registry-resolved: npm использует настроенный registry (локально — https://registry.npmjs.org/), без закреплённых Nexus endpoints. В версиях, integrity-хешах и остальной metadata нет изменений — проверено полным deepEqual с предыдущим lockfile за вычетом resolved registry URLs. - npm ci --ignore-scripts — passed. - npm audit --include=dev --audit-level=low: 0 vulnerabilities. - npm run verify: 436 tests, lint/typecheck, OpenAPI, dependency checks, app/Storybook builds — passed. - Strict commitlint PR range — passed; hooks сохранены. - Новый CI проверит реальную установку на runner.
ksv741 added 3 commits 2026-10-06 22:06:02 +03:00
Part of the quiet-user-feedback change; docs and specs land in their own repositories.
feat: default journal period to last 7 days
Frontend verify / commits (pull_request) Successful in 50s
Frontend verify / security (pull_request) Failing after 13s
Frontend verify / verify (pull_request) Skipped
0ea8d7b62d
ksv741 added 1 commit 2026-10-07 07:27:23 +03:00
fix(deps): resolve npm audit advisories
Frontend verify / commits (pull_request) Successful in 36s
Frontend verify / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Failing after 32m34s
f873db7b02
ksv741 added 1 commit 2026-10-07 09:10:18 +03:00
chore: remove unused exports
Frontend verify / commits (pull_request) Successful in 42s
Frontend verify / security (pull_request) Successful in 11s
Frontend verify / verify (pull_request) Successful in 7m16s
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 14s
Frontend verify / verify (push) Failing after 6m28s
fcb938b5a2
ksv741 merged commit fcb938b5a2 into develop 2026-10-07 10:29:49 +03:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WealthLedger/frontend#46