Commit Graph

47 Commits

Author SHA1 Message Date
Дмитрий 2c41971d88 docs(router-mentor): G1 closure + phase 8 handoff 2 2026-06-09 10:32:47 +03:00
Дмитрий 1478f56b51 docs(router-mentor): phase 8 readiness audit findings 2026-06-09 09:54:07 +03:00
Дмитрий 71b07e52eb audit(spec): 51 findings + 8 MUST critical fixes inline
Adversarial audit condensed router-gate spec через 3 parallel
Sonnet adversaries (9 attack zones). 51 finding total:
10 BYPASS-COMPLETE + 17 PARTIAL + 9 DOS + 15 INFO. Spec
заявление «hard wall полный» НЕ выдерживает.

8 MUST critical inline fixes applied:
- §5.1 Bash: <<< here-string, node REPL/stdin block,
  < input redirect, tokenizer per-arg path-deny check
  (closes CRITICAL-9/8/6 + PARTIAL-15)
- §3.1 path normalization: UNC \?\ prefix strip,
  8.3 short names expand via GetLongPathName,
  unresolved $VAR fail-CLOSE
  (closes CRITICAL-3/4/5)
- §4 Поведение 1: source restriction — detector проверяет
  только organic root user prompt, НЕ AskUser chosen_label
  (closes CRITICAL-1 design flaw)
- §8 Implementation order matrix: Этап 2.3 branch-switch
  rewrite MUST complete BEFORE Этап 3 enforce-mode
  (closes CRITICAL-10 S8 migration regression)
- §1.4: gate-config.json protected с Этапа 1.4 ранее
  (closes DOS D-1 tiny-budget patch attack window)

5 SHOULD-FIX + 5 DOS-MUST-ADDRESS deferred в writing-plans
(§9 «Audit findings deferred» documented для plan pickup).

Audit report saved at:
docs/superpowers/audits/2026-05-29-router-gate-condensed-
adversarial-audit.md

cspell-words.txt: +UNC, +EACCES (valid technical terms).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 09:50:18 +03:00
Дмитрий 26999ca597 chore: working tree cleanup pre-llm-first-router merge
Три группы накопившихся auto-правок (НЕ ручные):

1. markdownlint --fix auto-format (~25 .md в docs/superpowers/, docs/security/marketing-vet.md, docs/adr/015, docs/deploy/lkomega-runbook): MD031/MD032 (blank lines around fence/list) + MD004 (bullet markers `+`→`-`). Содержательных текстовых правок 3: ADR-015 bullet, sprint5d-cleanup bullet, router-discipline trailing space.

2. lefthook 2.1.6 → 2.1.8 (package.json + lock): patch-bump, авто-резолвил npm.

3. Observer runtime (docs/observer/): episodes-2026-05.jsonl +420 строк (текущая активность мозга), STATUS.md regen, .pii-counters / .read-counter тики, +2026-05-24-brain-retro.md note.

Цель — разблокировать merge feat/llm-first-router → main (этап 0 плана постановки в боевой). Содержание ветки не трогает.
2026-05-25 14:23:11 +03:00
Дмитрий b73ddaaedd docs(a11y): authenticated rescan baseline + findings (21/21 passing)
Final state docs after a11y rescan session:

- docs/audit-baseline-pa11y.md: «Authenticated rescan 2026-05-14» section
  added (14 new URLs, all 21 passing). Old «out of scope для первой
  baseline» section marked SUPERSEDED. Per-pattern fix table with file
  references + ignored selector rationale. axe-core cross-validation
  results documented (only DevIndexBadge dev-only remains).

- docs/superpowers/audits/2026-05-14-a11y-rescan-findings.md (new):
  Full audit findings doc — TL;DR, scope expansion table, per-pattern
  root cause + fix sections (A-H), axe-core cross-validation, метрики
  до/после, verdict 🟢 GREEN.

Regression sweep:
- Pa11y: 21/21 URLs passed
- Vitest: 91 files / 736 passed / 3 skipped / 0 failed
- Pest --parallel: 742/739/3sk/0
- Vite build: ~2s
- gitleaks: 0 leaks / 457 commits / 12.72 MB
- lychee: 345 OK / 0 errors / 457 total
- markdownlint: 0 errors (after auto-fix)
- cspell: 0 issues

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:08:08 +03:00
Дмитрий f9d2452386 docs(audit): finalize portal full audit #3 — report (2026-05-14) 2026-05-14 07:52:27 +03:00
Дмитрий 301334c288 docs(audit): Phase 14 final regression (audit #3) 2026-05-14 07:46:56 +03:00
Дмитрий abb8a5135e docs(audit): Phase 13 categorization + fix decisions (audit #3)
Final audit rollup: 0 P0 / 1 P1 / 11 P2 / 14 P3 (26 total).

Pa11y P1 decision: FIX-DEFER with concrete migration plan
(6 acceptance criteria + 60-120 min estimate). Decision driven by
3-hypothesis analysis: (1) config-only swap surfaces new live-app
violations (color-contrast on DevIndexBadge, region landmarks),
(2) additive both-kept keeps handoff failures blocking CI,
(3) deferred migration with proper sprint task is cleanest path.
Both decision-matrix triggers from brief apply: risk of new
failures without follow-up plan + new CI infra requirement
(live dev server lifecycle).

Carryforward audit: 9 items still open from Audit #2 (all
P2/P3, no regressions). 11 Audit #2 items verified closed in
this audit (bf84568 aria fix, CTO-19 Lucide, Q.DEFER.001-004,
quirks #62/#72/#80, cron, RUNBOOK.md).

FIX-NOW this session: 0 commits (Pa11y deferred per matrix).
FIX-NOW earlier in audit: 1 commit (823da29 cspell inline).
FIX-DEFER documented: 25.
BLOCKED: 0.

Verdict: GREEN — 0 P0, sole P1 is methodology audit-fidelity gap
(Pa11y declared but not exercised against live code); axe-core
via Playwright in Phase 7 provides actual a11y coverage with 0
real prod issues against DevIndexBadge temp feature.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:38:25 +03:00
Дмитрий 4b4705295c docs(audit): Phase 10-12 pre-prod/TODO/untracked findings (audit #3) 2026-05-14 07:34:35 +03:00
Дмитрий 51664a0aa4 docs(audit): Phase 9 bundle analyzer delta (audit #3) 2026-05-14 07:27:36 +03:00
Дмитрий ad89473331 docs(audit): Phase 8 coverage targeted (audit #3) 2026-05-14 07:24:12 +03:00
Дмитрий 8fa545e113 docs(audit): Phase 7 a11y targeted Pa11y+axe-core (audit #3) 2026-05-14 07:20:49 +03:00
Дмитрий 8ec7a8c116 docs(audit): Phase 6 cross-doc integrity findings (audit #3) 2026-05-14 07:14:59 +03:00
Дмитрий 1f43beacc3 docs(audit): Phase 5 UI smoke 22-view Playwright sweep (audit #3) 2026-05-14 07:12:48 +03:00
Дмитрий 9e2914a72d docs(audit): Phase 4 security findings (audit #3)
CI workflows: 3 (sast/dependency-check/trivy), unchanged from Audit #2.
gitleaks delta (9e175a1..HEAD): 0 leaks / 18 commits.
gitleaks full history: 0 leaks / 426 commits.
gitleaks no-git app/: 1847 matches all in gitignored vendor/ +
phpstan-cache; P2: GITHUB_TOKEN env var captured in gitignored
nette DI container cache (not in git history, mitigations in place);
P3: generic-api-key FPs in phpstan.phar / cache suggest gitleaks.toml.
cspell-words.txt +3: nette, phar, serialises.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 06:29:31 +03:00
Дмитрий 93a3c667e0 docs(audit): Phase 3 schema integrity findings (audit #3)
Query results A-G: root_tables=63 (61r+2p), partitions=12,
indexes=289, RLS=39, functions=5 (correct names), triggers=13
logical/19 total, orphan_FK=0. One P2 finding: schema.sql v8.20
header "62 базовые таблицы" drift → actual 63 (deals +
supplier_lead_costs both partitioned parents). All invariants
RLS/functions/orphan-FK pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 06:23:25 +03:00
Дмитрий af97885266 docs(audit): Phase 2 test suite findings (audit #3)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 06:19:50 +03:00
Дмитрий 4a5ecb085a docs(audit): Phase 1D SQL static analysis + Phase 1 итог (audit #3)
squawk v2.51.0 — 0 issues (bin\squawk.exe db/schema.sql, exit 0).
pgFormatter — N/A (perl not in PATH, known Q.HARD.002 carryforward).
Phase 1 combined итог: P0=0 P1=0 P2=4 P3=2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 06:13:04 +03:00
Дмитрий 823da293de docs(audit): Phase 1C docs static analysis findings + cspell words (audit #3)
markdownlint=0, cspell=0 (+3 words: shapkas/SUT/SUT's), lychee=318 OK/0 errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 06:09:29 +03:00
Дмитрий 362af8c981 docs(audit): Phase 1B frontend static analysis findings (audit #3) 2026-05-14 06:06:54 +03:00
Дмитрий 85d79499e9 docs(audit): Phase 0 addendum + Phase 1A backend static analysis (audit #3)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 06:02:45 +03:00
Дмитрий 07a483333c docs(audit): Phase 0 pre-flight skeletons (audit #3) 2026-05-14 05:59:55 +03:00
Дмитрий 9e175a1fd6 docs(audit): Phase 10.2 axe-core + Q.DEFER.001+002 closure — audit #2 follow-up
axe-core 4.10 на 16 auth views: P2=1 (aria-tooltip-name VTooltip /admin/tenants),
P3=4 кат. (region sitewide, DevIndexBadge temp, empty-table-header 2 views,
page-has-heading-one 1 view). P0/P1=0.

Q.DEFER.001 (Phase 5 24-view smoke) + Q.DEFER.002 (axe-core 16 auth) оба CLOSED.
blocked.md + report.md обновлены. Verdict 🟡 YELLOW, 0 открытых Q-items.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:52:59 +03:00
Дмитрий ec0dd00a93 docs(audit): Phase 5 full 24-view smoke — Q.DEFER.001 closure (audit #2 follow-up)
Playwright MCP iteration по 24 URL (auth + main + admin + 404).
Login/logout flow verified. CTO-19 Lucide icons confirmed holding.
25 screenshots в audit-screens/2026-05-13/. 0 реальных дефектов.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:41:11 +03:00
Дмитрий 43f9c257bc docs(audit): finalize portal full audit #2 — Phase 7-9 + report (2026-05-13)
Phase 7 — Categorize: severity rollup 37 findings (P0=0 / P1=5 / P2=14 / P3=18).
  vs 12.05 baseline (P0=1 / P1=47 / P2=339 / P3=6) — massive improvement.

Phase 8 — Fix loop SKIPPED per hybrid: 0 P0 + 5 P1 все FIX-DEFER known quirks
  (квирки 62/72 + router coverage timeout), не FIX-NOW eligible. 0 atomic
  fix-commits в этой session.

Phase 9 — Final regression: 0 regressions vs Phase 2 baseline (742/738/1/3 Pest,
  88/683/3 Vitest, 35/63 Histoire, 2.15s Vite). Все baseline metrics preserved.

Report.md filled: TL;DR + Phase summaries + метрики до/после + verdict 🟡 YELLOW
+ commits + 3 new quirks (78 branch contention, 79 CWD double-cd, 80 vitest
coverage v8 timeout).

Q-items: Q.DEFER.001 (Phase 5 full smoke) + Q.DEFER.002 (Phase 10 axe auth) deferred.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:13:44 +03:00
Дмитрий 845477603a docs(audit): Phase 10+11+12+13+14 findings batch (audit #2)
Phase 10 — Pa11y 4 guest URLs:  all clean.
Phase 11 — TODO sweep: 19 matches (stable vs 12.05).
Phase 12 — Bundle: critical-path ~189 kB gzip, +25 kB drift vs 12.05.
Phase 13 — Coverage: 78.30/75.78/70.12/80.47. P1 router.spec.ts timeouts под coverage.
Phase 14 — Pre-prod 🟡: P2 Sentry prod SDK missing, partitions cron not registered, runbook отсутствует.

cspell-words.txt: +«редиректится».

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:11:40 +03:00
Дмитрий 31f804581d docs(audit): Phase 6 cross-doc integrity findings (audit #2)
7 normative docs version match (factual vs memory):
- CLAUDE.md v1.92 , Pravila v1.13 , PSR_v1 v2.1 , Tooling v1.17 
- Реестр v1.83 , schema.sql v8.20 , README_АРХИВ v8.5 

routes/web.php: 26 explicit Route::view + Route::fallback — комплектен. 12.05 finding /projects+/reminders+/admin/* missing — fixed `b9038bc`. /admin top-level index new.

Severity Phase 6: P0=0 / P1=0 / P2=0 / P3=0.  vs 12.05 baseline (5 P2 drift) — параллельная сессия PR #4 sync'нула все версии.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 10:42:07 +03:00
Дмитрий e81b9c45b4 docs(audit): Phase 5 UI smoke (focused) + Q.DEFER blocked entries (audit #2)
Phase 5 reduced scope (transparent): 17 routes HTTP 200  + CTO-19 Lucide structural verification (vuetify.ts:19 import + prod bundle inclusion). Indirect coverage via Vitest 88/683 + Histoire 35/63 + Vite build (Phase 2).

Not covered этой session: Playwright MCP interactive flows для 24 views.

Q.DEFER entries → blocked.md:
- Q.DEFER.001: Phase 5 full 24-view Playwright smoke deferred.
- Q.DEFER.002: Phase 10 axe-core 16 auth views deferred.

Severity Phase 5: P0=0 / P1=0 / P2=0 / P3=1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 10:40:42 +03:00
Дмитрий 17d530f669 docs(audit): Phase 4 security findings (audit #2)
- 4.1 CI workflows enum (methodology gap closure per Pravila v1.12 §4.6): 3 active (dependency-check.yml + sast.yml + trivy.yml). Semgrep SAST confirmed deployed: p/php + p/javascript + p/typescript + p/secrets, SARIF upload to GitHub Security tab. Q.INFO.001 12.05 closure verified holding.
- 4.2 Gitleaks full history: 401 commits / 12.11 MB / 0 leaks . vs 12.05 (333/11.14) — +68 commits, still clean.
- 4.3 Composer audit cross-link: 0 advisories.
- 4.4 Production secrets grep: 0 AWS prefix, 0 Stripe prefix в app/.

Severity Phase 4: P0=0 / P1=0 / P2=0 / P3=0 — fully clean.

CI security stack полный: SAST + dependency-check + Trivy = pre-prod readiness baseline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 10:37:30 +03:00
Дмитрий 75dc375da3 docs(audit): Phase 3 schema integrity findings (audit #2)
Boost MCP queries к dev liderra:
- Root tables: 61 (vs schema.sql v8.20 header 62; vs CLAUDE.md memory dev-actual 75 stale).
- Partition children: 12 (vs header 12 ; vs memory 102 stale — после migrate:fresh).
- Indexes: 289 (vs header 117 stale; vs memory 289 ).
- RLS policies: 39  exact match.
- User functions: 5  exact by name (audit_block_mutation, audit_chain_hash, calc_lead_score, report_jobs_log_export, set_pd_subject_request_deadline).
- Triggers: 19 (vs header 13 stale; vs memory 19 ).
- DB roles 0 by design (dev).
- Orphan FK: 0 .

Severity Phase 3: P0=0 / P1=0 / P2=2 (schema.sql header drift + CLAUDE.md/memory partition drift after migrate:fresh) / P3=0.

Structural integrity 100%, drift только в documentation accuracy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 10:35:57 +03:00
Дмитрий 22d8613578 docs(audit): Phase 2 test suite findings (audit #2)
- Pest sequential: 742/736/3/3 (квирк 62 cumulative state — 3 expected fails LookupsTest×2 + ProjectExtensionsTest, numbers ↑ vs 12.05: 1465/12176 — больше накопления).
- Pest --parallel --recreate-databases: 742/738/1/3 — 1 sporadic regression vs 12.05 baseline 739/0/3: CsvReconcileJobTest квирк 72 (Redis supplier:session race в parallel subdir-only).
- Vitest: 88f/683/3  exact match baseline.
- Histoire: 35/63  match.
- Vite build: 2.15s  faster than baseline. P2 bundle drift app-B-3WRbXK.js +21 kB raw.

Severity Phase 2: P0=0 / P1=4 (all FIX-DEFER known quirks) / P2=1 / P3=1.

cspell-words.txt: +«квирков» (валидная gen-plural форма).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 10:34:01 +03:00
Дмитрий 51440f4e6d docs(audit): Phase 1 static analysis findings (audit #2)
Subagent ×4 parallel dispatch результаты:
- Backend (Pint/Larastan/composer audit):  all 0 errors. P3 composer audit network warn (cached DB).
- Frontend (ESLint/vue-tsc/prettier/knip): ESLint 0, vue-tsc 0. P2 prettier 312 files mismatch (87% — generated .histoire/dist + coverage; ~40 real source). P2 knip lucide-vue-next false-positive (dynamic IconSet pattern).
- Docs (markdownlint/cspell/lychee):  all clean (75 md / 88 cspell / 367 links).
- SQL (squawk/pgFormatter): squawk 0. P3 pgFormatter 6284 lines diff — Q.HARD.002 documented «не трогать».

Severity Phase 1: P0=0 / P1=0 / P2=2 / P3=2. vs 12.05 baseline (P1=44, P2=316) — massive improvement.

Также Phase 0 post-pause update: параллельная сессия завершилась PR #4 merge 66ebb22, нормативка bumped до v1.92/v1.13/v2.1/v1.17, +sentry/redis MCP, +SAST workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 10:25:34 +03:00
Дмитрий f454e95a2d docs(audit): Phase 0 pre-flight skeletons + findings (audit #2)
Skeleton files findings/blocked/report для portal full audit #2 (2026-05-13).

Phase 0 finding P3: обнаружена параллельная сессия на feat/claude-automation
branch (claude-automation-recommender skill активна параллельно с этим audit'ом
на main). Main verified clean, git checkout main вернул state. CWD persistence
quirk зафиксирован для memory (двойной cd app && ... загнал в app/app/).

cspell-words.txt: +«инвалидирует» (валидное слово для Phase 0 finding prose).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 07:37:12 +03:00
Дмитрий 19d12c9f95 docs(meta): session-end hygiene — CLAUDE.md v1.91 + Pravila v1.12 + audit gap
Capture session-end documentation learnings 13.05.2026 day +1 после
CTO-19  closure (commit 0832997 + fixup f6e1e64).

CLAUDE.md v1.90 → v1.91 (через `/claude-md-management:revise-claude-md`
per §5 п.10):
— Шапка version line: новый v1.91 narrative bump с session-end summary
— §0 row Pravila: bump v1.11 → v1.12 (cross-ref sync)
— §9 история версий: +v1.91 entry (session learning capture)

Pravila v1.11 → v1.12 (manual Edit per explicit user approval choice
«iii. Pravila v1.11 → v1.12 methodology additions»):
— §4.6 self-review: +subsection «Для UI-refactor (icon migration /
  palette swap / layout overhaul)» — visual smoke verification
  обязательна; unit tests jsdom недостаточны; user-grep
  resources/js insufficient (Vuetify-internal default mdi-* gap learning
  от CTO-19); axe-core scan для palette changes
— §4.7 объединение/переименование файлов: +п.4 «Plans/specs относительные
  пути» — для ссылок на app/db/docs из docs/superpowers/{plans,specs}/
  использовать `../../../<target>` (lychee strict filesystem semantics;
  прецедент CTO-19 fixup `f6e1e64`)

audit findings.md Q.INFO.001 entry: +«Audit methodology gap»
subsection — Phase 4 SAST coverage check must begin с `ls
.github/workflows/` ДО conclusions про tool availability. Audit
12.05.2026 пропустил `.github/workflows/sast.yml` (commit 53fb1ec от
PR #25, 10.05.2026 — 2 дня до audit). Generalize: any «X not
configured» finding должен включать explicit check репо-уровневых
configurations (.github/, .gitlab-ci.yml, lefthook.yml, etc.).

cspell-words.txt +2: «рендерить» / «рендерятся» (dev jargon).
+опечатки fix: «гap» → «gap», «zafiksирован» → «зафиксирован»,
«инсуффициентны» → «недостаточны».

Регрессия зелёная (verified в commit 0832997):
— Pest --parallel 742/739/0/3 / Vitest 88/683+3 / Vite build 3.52s
— axe-core /admin/billing 0 iconography violations
— lychee 252 OK / gitleaks 0 (372+ commits)

0 code changes / 0 schema / 0 migrations / 0 npm install / 0 test impact.

Memory updates (отдельный шаг, git-untracked):
— feedback_environment.md +3 quirks 74-76 (Lucide+Histoire peerDep,
  Vuetify-internal mdi defaults gap, plans-relative-paths)
— MEMORY.md index quirks count bump 73→76

Workflow: `superpowers:brainstorming` (F-option scope) →
`:writing-plans` → `/claude-md-management:revise-claude-md` (CLAUDE.md
bump per §5 п.10) + manual Edit (Pravila + findings.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 05:39:22 +03:00
Дмитрий 093b1af059 docs(audit): Q.DEFER.003 FULLY CLOSED 13.05.2026 — sub-B+C done, real coverage numbers documented
5 atomic commits 4c6d593..f2627e4 + ~23 new tests:
- Task 1: ChangePasswordCard 3 specs (placeholder coverage)
- Task 2: RecoveryCodesCard 6 specs (dialog flow)
- Task 3: TwoFactorCard 9 specs (setup wizard + disable)
- Task 4: router.spec 5 integration tests (guard branches + /admin + /reset)

Real coverage (Vitest --coverage Task 5):
- RecoveryCodesCard Stmts 28% -> 59.37%
- TwoFactorCard Stmts 28% -> 71.42%
- router/index.ts Stmts 33% -> 46.15%, Branches -> 100%, Funcs 7% -> 22.22%
  (24+ lazy-import factories inflate Funcs denominator)

Honest note: Tasks 2/3/4 commit headlines (70%+, 80%+, 85% Funcs) were
overstated против actual; meaningful Stmts gains remain. Sub-A (api/* 43 tests)
closed earlier 12.05.2026 night commit 95f5f94.
2026-05-13 02:07:24 +03:00
Дмитрий 0a37aadd20 docs(audit): Q.DEFER.004 — replace Task 4 false-alarm verification with re-verified success
Task 4 subagent (commit e79fe95) reported 6+9 critical label violations
on /deals + /admin/supplier-prices, concluding Vuetify silently drops
aria-label. Re-verification 2026-05-13 (Playwright + axe-core 4.10 with
hard-reload + 500ms render-wait) показала **противоположное**:

- /deals: 0 label violations; 6 bulk-checkboxes имеют correct aria-label
- /admin/supplier-prices: 0 label violations; 9 inputs/switches OK
- /admin/tenants: 1 aria-tooltip-name as documented (sub-C unchanged)

Vuetify VSelectionControl.js:163 confirms input gets aria-label from
\$attrs forwarding via filterInputAttrs + _mergeProps(..., inputAttrs).

Q.DEFER.004 sub-A + sub-B closure stand as honest. Initial false-alarm
likely from HMR partial update / axe race-condition без render-wait —
documented as quirk для будущих сессий.
2026-05-13 01:05:36 +03:00
Дмитрий e79fe95267 docs(audit): Q.DEFER.004 — Playwright+axe-core verification 2026-05-13
Verified 3 pages with axe-core 4.10 CDN-injected via Playwright MCP:
- /deals (sub-A): 6 label violations REMAIN — Vuetify 3.12 silently drops
  aria-label на v-checkbox-btn (Task 1 source fix не propagates через rendering)
- /admin/supplier-prices (sub-B): 9 label violations REMAIN — 6× v-text-field
  с orphan aria-labelledby + 3× v-switch без aria-label на native input
- /admin/tenants (sub-C): 1 aria-tooltip-name violation confirmed как
  Vuetify-internal artifact (documented limitation, button activator OK)

Root cause: общий Vuetify-internal a11y prop forwarding gap. Source-level
Task 1 + Task 2 fixes присутствуют в коммитах d9fc3d9/c8005e0, но не имеют
user-visible effect — те же 16 residual nodes что pre-fix. Library-level
limitation, не application defect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 00:48:59 +03:00
Дмитрий 484504b78f docs(audit): Q.DEFER.004 CLOSED — sub-A+B fixed, sub-C documented as Vuetify-internal known limitation 2026-05-13 00:40:04 +03:00
Дмитрий 95f5f94a6b test(api): Q.DEFER.003 sub-A — 43 unit tests for api/*.ts layer
User chose (A) api/* unit tests first (highest ROI per blocked.md). 5 new
spec files covering auth/deals/notifications/reminders/reports api modules.

- auth-api.spec.ts (13 tests): login/register/me/logout/verifyTwoFactor/
  useRecoveryCode/twoFactorInit/Confirm/Disable/RegenerateRecoveryCodes/
  forgotPassword/resetPassword/updateNotificationPreferences
- deals-api.spec.ts (12 tests): createDeal/bulkDelete/bulkRestore/update/
  transition/exportCSV/exportXLSX/getDeal/listDeals×2/listManagers/
  listProjects
- notifications-api.spec.ts (6 tests): listNotifications×3 (unreadOnly
  variants)/markRead/markAllRead/delete
- reminders-api.spec.ts (6 tests): listReminders×2/create/update/complete/
  delete
- reports-api.spec.ts (6 tests): listReportJobs×2/create/retry/cancel/delete

Approach: vi.mock('../../resources/js/api/client') replaces apiClient with
{get,post,patch,delete} mocks + ensureCsrfCookie mock. Each test verifies:
(1) correct HTTP method, (2) correct URL, (3) correct params/body
(camelCase→snake_case mapping for query params), (4) data unwrap from
wrapper objects ({user}/{deal}/{job}/{reminder}/{managers}/{projects}),
(5) ensureCsrfCookie called for mutating endpoints.

Vitest delta: 614 → 657 passed (+43 / 0 failed); 79 → 84 files (+5).
3 skipped unchanged. Q.DEFER.003 sub-B (security cards) + sub-C (router
guards) remain deferred — sub-A api/* was highest ROI per blocked.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 22:14:51 +03:00
Дмитрий 143cc458c1 fix(a11y): Q.DEFER.002 sub-B — 12 patterns fixed across 16 auth views
Q.DEFER.002 sub-B closure: manual Pa11y audit-pass via Playwright MCP login +
axe-core CDN inject on 16 auth-required views. Found ~13 unique violation
patterns, 12 fixed, 3 deferred to Q.DEFER.004.

ROOT CAUSE found: AdminLayout `<v-navigation-drawer color="secondary"
theme="dark">` resolved to Vuetify default-dark `secondary=#54b6b2` (Teal
mid) instead of liderraForest `#012019` теало-нуар. Switching to direct hex
preserves design intent + restores white-text contrast across all 8 admin
views (~50 nodes color-contrast violations cleared).

Patterns fixed:

1. AdminLayout sidebar palette (8 admin views):
   - color="secondary" → color="#012019" (root cause)
   - .brand-sub red #b94837 → #e06155 (3.41 → 5.08)
   - .nav-count gray #7a8c87 → #8a9c95 (4.26 → 5.34)
   - <v-list nav> + role="navigation" + aria-label (aria-required-children
     fix: <v-list role=list> had [role=link] children — undefined для list)

2. DashboardBalance .runway-bar — role="img" (aria-prohibited-attr fix)

3. DashboardKpiRow .delta-up — #2e8b57 → #1b6e3b (4.27 → 6.25)

4. TransactionsTable .tx-amount-up — #2e8b57 → #1b6e3b (same fix)

5. RemindersList .empty-hint — #9a9690 → #6b6356 (2.98 → 5.74; +liderra-muted alignment)

6. KanbanView .kanban-board — tabindex="0" role="region" aria-label
   (scrollable-region-focusable fix)

7. ProjectCard:
   - .v-progress-linear + :aria-label="Прогресс дневной нормы: N%"
   - icon menu :aria-label="Меню действий проекта «...»"
   - bulk-select .card-check input :aria-label="Выбрать проект «...»"

8. useStatusPill in_progress #3F7C95 → #2A5A6E (4.07 → 6.11);
   useStatusPill.spec.ts sync

9. ProjectsView toolbar select-all input aria-label

10. AdminTenants impersonate v-btn aria-label

11. Global app.css:
    `.v-messages, .v-field-label { --v-medium-emphasis-opacity: 0.7; }`
    Vuetify default ~0.52 → rendered #7a7a7a/#767471 fails 4.20-4.29:1;
    0.7 → rendered ≈#595959 → 7.9:1+ passes WCAG AA.

Re-verified post-fix via axe-core on all affected views: all clean except
DEV-only `.dev-index-num` chip (tree-shaked в prod, not a real violation).

Vitest verified post-fix: 79 files / 614 passed / 3 skipped / 0 failed
(baseline preserved).

3 patterns deferred to Q.DEFER.004:
- DealsTable VDataTable show-select bulk-checkboxes (6 nodes) — Vuetify
  slot rewrite needed
- AdminSupplierPrices 9 form inputs — v-text-field/v-switch label props
- Vuetify v-tooltip eager-mount aria-tooltip-name — library-level cosmetic

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 22:09:48 +03:00
Дмитрий 420dd26c08 docs(audit): Q.INFO.001 CLOSED — Semgrep CI already exists (audit miss)
User chose variant (B) Semgrep в CI for Q.INFO.001. Investigation shows
.github/workflows/sast.yml already exists from PR #25 commit 53fb1ec
(10.05.2026, 2 days before audit) with better-than-minimal config:
- semgrep/semgrep-action@v1
- configs p/php + p/javascript + p/typescript + p/secrets
- triggers push/PR на main with path-filters app/app, app/resources/js, app/database/migrations
- SARIF upload to GitHub Security tab via github/codeql-action/upload-sarif@v3

Audit Phase 4 Subagent G missed this — searched only for local `npx semgrep`
CLI without checking existing CI workflows. Tagged as audit-gap finding for
future Phase 4 improvement (check `.github/workflows/` first).

No new code required. +SARIF added to cspell-words.txt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 21:43:10 +03:00
Дмитрий 02d3506803 docs(audit): close 5 Q-items per post-audit user decisions
Batch closure following Q-tree resolution session 12.05.2026 ночь:

- Q.HARD.001 (admin role-guard) → (A) Через Б-1: documented MVP defer, no code change. router/index.ts:128 TODO + routes/web.php /api/admin/* comments preserved.
- Q.INFO.002 (schema metric drift) → (B) double split confirmed: CLAUDE.md v1.88 §0/§2/§6/§8 already contain baseline (62/12/117/39/5/13/5) + dev-actual (75/102/289/39/5/19/0).
- Q.HARD.002 (pgFormatter swap) → План Б Не трогать: 6284-line cosmetic diff noise unacceptable, manual style preserved.
- Q.PRODUCT.002 (mock-data prod bundle) → (B) prod-fallback: ~7kB gzip mockDeals+mockAdmin remain in bundle until real API integration (Plan 6+).
- Q.DEFER.001 (memory description stale) → (A) downgrade to fact: 5 memory description edits — MEMORY.md (5 lines) + 4 file frontmatters describe plan5-frontend-projects state (PSR v1.7 / Pravila v1.10 / Tooling v1.15 / реестр v1.77 / schema v8.20 / CLAUDE.md v1.88) с notice про origin/main 615db99 divergence (R15 removal: v2.0/v1.11/v1.16 pending merge into plan5).

Bonus finding flagged separately: CLAUDE.md §6 contains factual error — claims 615db99 = Plan 4 merge post-f4ec5dc R15 removal. Actually 615db99 IS R15 removal commit; f4ec5dc is sidebar position:fixed hotfix. Plan 4 commits merged earlier. Fix via /claude-md-management:claude-md-improver in follow-up.

Remaining 3 open Q-items require implementation work next: Q.INFO.001 (Semgrep CI workflow), Q.DEFER.002 sub-B (16 auth-views manual Pa11y), Q.DEFER.003 (A) (~30 api/*.ts unit tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 21:40:48 +03:00
Дмитрий ac73c88371 docs(audit): record R4-R5 manualChunks experiment + revert (Phase 12)
После Phase 12 P3 finding R4-R5 (vendor chunk renaming) — попытался применить
`build.rollupOptions.output.manualChunks` в vite.config.js. Vite 8 использует
Rolldown который требует function-form (object-form ломает с
"manualChunks is not a function"). Под function-form Rolldown засосал
все consumers stores в pinia chunk через transitively-import резолюцию:

- Pinia chunk implicit ~5kB → explicit 127kB raw / 50kB gzip
- Total critical-path payload +50 kB gzip vs baseline (net negative)
- Vite auto-split работает better для этого app shape

Reverted to baseline. "VBtn 184 kB" — naming artefact (auto-named первый
Vuetify consumer'ом), не actual perf-issue. R4-R5 closed без code fix —
informational only.

3 гипотезы про cause Pinia blow-up:
- H1 stores transitively-pulled через pinia API import
- H2 cycles vue-core↔pinia в Rolldown greedy chunking
- H3 return null в function manualChunks ломает auto-split fallback

Detailed reverification recommended next session если решим повторить
с `output.preserveModules` или per-store individual manualChunks rules.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 21:19:24 +03:00
Дмитрий 15e1c6d34f docs(audit): Phase 12+13 extra — bundle analyzer + Vitest coverage
После «продолжай всё» — два informational прохода:

**Phase 12 (Bundle analyzer):**
- BUILD_ANALYZE=1 npm run build:analyze → bundle-analyze.html (547 KB)
- Top-15 chunks: VBtn 184kB raw (mislabeled — Vue+Vuetify core), KanbanView 182kB
- 5 recommendations R1-R5: code-split vuedraggable, lazy DealDetailDrawer
- BLOCKED Q.PRODUCT.002: mock-data dev-only vs prod-fallback?

**Phase 13 (Vitest coverage):**
- 79 test files, 614 passed / 3 skipped, 59.55s
- Totals: Stmts 75% / Branch 75% / Funcs 67% / Lines 77%
- 0% api/* layer — cheap ROI (30 unit-тестов поднимут Funcs до 80%)
- 28% security cards, 33% router (guards integration tests missing)
- BLOCKED Q.DEFER.003: coverage debt sprint planning

+мокают в cspell-words.txt.

Phase 12+13 — informational only, не closures P0/P1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 21:16:47 +03:00
Дмитрий b27259e7c5 docs(audit): Q.DEFER.002 marked CLOSED (3/3 contrast fixes applied)
После follow-up прохода — обе a11y contrast violations исправлены:
- ErrorView support-link (fff2dff) — 2.77 → ~12:1
- ForgotPasswordView info-alert (5cebe24) — 4.18 → ~7.5:1

Final Pa11y baseline на guest URLs: 4/4 No issues found.

Остаётся auth-views coverage (16 views) — требует session cookie
в Pa11y, defer next session.

+неверифицированы в cspell-words.txt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 20:59:01 +03:00
Дмитрий ebebfacab4 docs(audit): Phase 10+11 extra — Pa11y live URLs + TODO sweep
После заказчик'ого «продолжай ещё тут» — два extra прохода вне scope Phase 5/6:

**Phase 10 (Pa11y on live URLs):**
Phase 5 audit запускал Pa11y только на handoff concepts (`liderra_v8_handoff/concepts/v8_*.html`)
из-за конфига `pa11y.config.json`. Live портал не был проверен. Phase 10
закрывает gap на guest URLs:
- /login → 0 issues
- /register → 0 issues
- /forgot → 2 errors WCAG2AA G18 contrast 4.18:1 < 4.5:1 на v-alert rate-limit
- /404 (catch-all) → 1 error WCAG2AA G18 contrast 2.77:1 < 4.5:1 на text-primary link

Auth-required views НЕ verified — требуют session cookie injection в Pa11y CLI.
Q.DEFER.002 в blocked.md с 4 options для следующей сессии.

**Phase 11 (TODO/FIXME sweep):**
Grep `\b(TODO|FIXME|XXX|HACK)\b` over app/**/*.{php,vue,ts}:
- 19 matches in 15 files.
- 6× MVP-defer Б-1 (admin role-guard, saas-admin auth — cross-link Q.HARD.001).
- 8× feature-defer (DashboardView mock data, region_mask decode Plan 6, и т.д.).
- 1× production-readiness (ProcessWebhookJob Sentry::captureException).
- 3× test-infra known квирк 54 (Vuetify teleport в JSDOM).
- 1× false-positive (TwoFactorSetupTest 'totp_secret' string literal).

Все documented in code — tracked work, не surprise.

cspell-words.txt: +Категоризация, +квирки (для audit-docs prose).

Не закрывают P0/P1. Phase 10/11 — informational только.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 20:47:43 +03:00
Дмитрий 1da23b8253 chore(audit): finalize 2026-05-12 portal full audit
Полный аудит портала проведён в ночь 12.05.2026 на ветке plan5-frontend-projects.
9 phase'ов, 393 findings, 8 fix-commits, 4 BLOCKED-вопроса.

Артефакты:
- docs/superpowers/plans/2026-05-12-portal-full-audit.md — план
- docs/superpowers/audits/*-findings.md — все findings file:line + severity
- docs/superpowers/audits/*-blocked.md — 4 вопроса заказчику
- docs/superpowers/audits/*-report.md — summary с метриками до/после
- audit-screens/views/ — 24 UI smoke screenshots (Playwright)
- audit-screens/legacy/ — 32 untracked PNG из workdir
- app/database/seeders/DemoSeeder.php — idempotent seed
- .gitleaks.toml — allowlist для seeders/audit-docs (демо-фикстуры)
- cspell-words.txt — +12 audit-cited mixed-script artifacts

Метрики (Phase 1+2 baseline → Phase 9 final, все commits 3a8229a..57f0b8e):
- Histoire build BROKEN → 35 stories / 63 variants 
- ESLint 17 → 0 
- vue-tsc 9 → 0 
- Prettier 48 → 0 
- markdownlint 165 → 1 (untracked design.md) 
- cspell 103 → 18 → 0 (after audit-cited words added) 
- Vitest 614 → 614 (0 regression) 
- Pest --parallel 739/0/3 → 739/0/3 
- Vite build 1.80s 0 warnings → 1.72s 0 warnings 
- gitleaks 0 leaks (340 commits) 

🟢 GREEN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 20:37:51 +03:00