docs: record frontend audit remediation evidence

This commit is contained in:
2026-09-06 19:52:13 +03:00
parent 55d35c7f78
commit 8721e93849
2 changed files with 104 additions and 26 deletions
+76
View File
@@ -7,6 +7,82 @@ delivery commits, точные verification commands с наблюдёнными
итог independent read-only review. Записи добавляются после archive и являются
неизменяемой историей поставки.
## 2026-09-06-complete-frontend-audit-remediation
**Change:** complete-frontend-audit-remediation (schema `wealth-ledger-sdd`)
**Archive:** [2026-09-06-complete-frontend-audit-remediation](../../specs/openspec/changes/archive/2026-09-06-complete-frontend-audit-remediation/)
**Specs sync:** `skip_specs: true`; существующие Requirements не менялись.
Все 17 tasks завершены до archive; post-archive strict validation —
23 passed, 0 failed.
### Delivery Map
| Area | Status | Outcome |
| --- | --- | --- |
| frontend | affected | Income mapper потребляет и проверяет server membership; drill-down сохраняет repeated-ID entries при обновлении. Events использует page VM, auth/T-Bank tests — общую client factory со стабильным lifetime. Snapshot/types синхронизированы. |
| backend | affected | Income-specific entry subtype содержит required instrumentKey, вычисленный одним owner и используемый aggregation; Ledger DTO, exact Money и порядок сохранены. |
| specs | affected | Approved Proposal, Design, Tasks и metadata archived; искусственные Delta Specs не создавались. |
| docs | affected | Три immutable audit snapshots, index, 22 source findings в 18 registry records, as-built contract/ownership и backend-first update/rollback. |
### Delivery commits
| Repo | Commit | Subject |
| --- | --- | --- |
| frontend | `9e42148f6a9ad620b4fc9f6aef9ee2d80d73702b` | fix(frontend): complete audit remediation |
| backend | `bdc384766649bb48513055bb809f0d1b45b91f54` | fix(income): expose authoritative entry membership |
| specs (archive) | `ab231a6aac58f4e97377e4d4fb521e22d3f07fdb` | docs(specs): archive frontend audit remediation |
| docs (as-built) | `55d35c7f789478230c683a79e5c80563c75487b6` | docs: document frontend audit remediation delivery |
### Verification
Node-команды выполнены под Node 22 после `nvm use --silent` в affected repo;
для specs без `.nvmrc` использовался `nvm use --silent 22`.
| Command / check | Наблюдённый результат |
| --- | --- |
| `npm run verify` (frontend, итоговая реализация) | PASS, exit 0; OpenAPI drift, TypeScript, Biome, 23 files / 108 tests, coverage, Knip, dependency boundaries и build. Coverage: statements 89.13%, branches 83.41%, functions 86.41%, lines 90.84%; 172 modules / 647 edges без violations. |
| `npm run test:run -- src/pages/account-income/ui/AccountIncomePage.test.tsx` (frontend) | PASS, exit 0; 19 tests, включая local errors/retry, opaque membership, signed payments и repeated-ID DOM updates. |
| `npm run test:run -- src/pages/account-income/ui/AccountIncomePage.test.tsx -t 'preserves every repeated-ID payment'` (frontend, до исправления VAL-01) | FAIL, exit 1: после reorder expected [C, A, B], received [A, C, A, B]. Тот же regression проходит в итоговом suite. |
| `npm run verify` (backend) | PASS, exit 0; lint, app/test TypeScript, 25 suites / 106 tests и build. |
| `npm run test:openapi-contract` (backend) | PASS, exit 0; 1 integration test, runtime Swagger соответствует frontend snapshot, включая income subtype и connectedAt. |
| `npm run verify` (docs, as-built перед delivery commit) | PASS, exit 0; 42 Markdown files, 0 issues и clean diff whitespace. |
| `openspec schema validate wealth-ledger-sdd --verbose` (specs) | PASS, exit 0; project-local schema valid. |
| `openspec validate complete-frontend-audit-remediation --type change --strict --store wealth-ledger-specs` (specs, перед archive) | PASS, exit 0; completed change valid. |
| `openspec archive complete-frontend-audit-remediation --yes --store wealth-ledger-specs` (specs) | PASS, exit 0; Task status Complete, archived as 2026-09-06-complete-frontend-audit-remediation. |
| `openspec validate --specs --strict --store wealth-ledger-specs` (specs, до и после archive) | PASS, exit 0; 23 passed, 0 failed. |
| Scoped local-file/source review (Python std-library) | PASS; три snapshots byte-equal originals с SHA-256 из index; 22 source IDs сопоставлены ровно один раз 18 FE26 records; 132 local file links разрешались до archive, archive links обновлены при finalization. |
| `git diff --check` (frontend/backend/specs/docs) | PASS. |
| Post-commit SHA-256 comparison (frontend/backend, Python std-library) | Все 14 поставленных files byte-equal прошедшему Validation дереву; commit hooks не внесли изменений. Frontend hooks также прошли formatting, dependency check и commitlint. |
Raw snapshot 28 августа содержит исходное MD060 formatting и исключён из
Markdown style gate точным path по существующему raw-source pattern. Содержимое
сохранено byte-for-byte; live docs и index остаются в gate.
### Semantic verification и independent read-only review
Verdict: **PASS** в Validation #2. Critical findings — 0, Important findings — 0.
Проверены exact membership, UID/FIGI/ticker/type/operation fallback, currencies,
signed totals, receipt counts и порядок; повреждённая связь не выдаётся за
полный результат и восстанавливается retry. Полностью пустой ответ допустим.
Events state ownership и test-client lifetime соответствуют Design.
Validation #1 обнаружила VAL-01: повторяющиеся operation IDs создавали
неуникальные React keys и лишние видимые payments после обновления. Локальные
occurrence keys устранили нарушение; regression на mounted drill-down проверяет
перестановку, две полностью одинаковые записи, удаление, отрицательные суммы
и сохранение открытой panel. Денежные вычисления и backend contract при этом
исправлении не менялись.
FE26-02–FE26-18 закрыты текущей поставкой и проверкой. FE26-01 сохраняет
[собственное evidence](#2026-09-01-harden-tbank-connection-cache-boundary).
Прежние исправления frontend `c97f62b` и backend `55b100d` проверены как
существующее состояние; текущие gates не приписывают этим commits отсутствующих
исторических approvals или SDD lifecycle.
Локальное обновление требует backend-first и перезагрузки frontend. Rollback
сначала возвращает consumer и snapshot/types, затем при необходимости provider;
сохранённые Ledger data, SQLite schema и credentials не изменяются.
## 2026-09-01-harden-tbank-connection-cache-boundary
**Change:** harden-tbank-connection-cache-boundary (schema `wealth-ledger-sdd`)