Дмитрий
1d68736fdb
docs(audit): Phase 6 cross-doc integrity findings (audit #3 )
2026-05-14 07:14:59 +03:00
Дмитрий
0308ece629
docs(audit): Phase 5 UI smoke 22-view Playwright sweep (audit #3 )
2026-05-14 07:12:48 +03:00
Дмитрий
5b0218f972
docs(audit): Phase 4 security findings (audit #3 )
...
CI workflows: 3 (sast/dependency-check/trivy), unchanged from Audit #2 .
gitleaks delta (1a9746d..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
Дмитрий
66ce541552
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
Дмитрий
91a5a6d1bb
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
Дмитрий
783f648c7e
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
Дмитрий
5d698e1489
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
Дмитрий
47bd4701aa
docs(audit): Phase 1B frontend static analysis findings (audit #3 )
2026-05-14 06:06:54 +03:00
Дмитрий
392c25220a
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
Дмитрий
cb31bfc7e4
docs(audit): Phase 0 pre-flight skeletons (audit #3 )
2026-05-14 05:59:55 +03:00
Дмитрий
980eb5421b
fix(tests): Bus::fake partial + session mock — close quirk #72
...
CsvReconcileJobTest used Bus::fake() (all jobs), silencing dispatch_sync of
RefreshSupplierSessionJob when a parallel afterEach wiped supplier:session.
Now: Bus::fake([RouteSupplierLeadJob::class]) + anonymous mock that re-puts
the session in handle(), making race-window recovery deterministic.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-14 05:35:06 +03:00
Дмитрий
78c7f51548
fix(tests): RefreshDatabase on LookupsTest + ProjectExtensionsTest — close quirk #62
...
DatabaseTransactions did not prevent cross-session data accumulation in
liderra_testing; count assertions drifted (1465 managers, 519 projects).
RefreshDatabase runs migrate:fresh once per session (RefreshDatabaseState::migrated)
so stale data is wiped at start of each composer test run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-14 05:29:34 +03:00
Дмитрий
b9019312c5
feat(docs): interactive automation graph — 73 nodes, 6 conflicts, Solarized dark vis.js
...
Single-file HTML visualization of Лидерра CRM automation system.
vis.js 9.1.9 force-directed graph: 9 color groups (rules/plugins/skills/hooks/
agents/MCP/lefthook/memory), 6 red dashed conflict edges, click-to-legend panel
with 5 sections (что делает / кому подчиняется / кто / одновременно / конфликты),
search + freeze/unfreeze/reset/clear toolbar. Solarized dark theme.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-13 17:05:59 +03:00
Дмитрий
14679ed4da
docs(spec): automation graph design spec — vis.js Solarized dark, 72 nodes, 6 conflicts
2026-05-13 16:43:13 +03:00
Дмитрий
39e153bf23
docs(plans): add test-quality-preprod sprint plan + fix lychee/cspell
...
Sprint plan B.1/B.2/B.3/A.1/A.2/A.3. Fixes: broken ../../../memory/
link → plain text; cspell-words.txt +аутит (Russian IT verb).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-13 13:41:59 +03:00
Дмитрий
dc191ef09a
fix(a11y): add aria-label to VTooltip on /admin/tenants impersonate btn
...
Audit #2 Phase 10.2 P2: axe-core 4.10 reported aria-tooltip-name
violation — <div role="tooltip"> had no accessible name. Adding
aria-label to <v-tooltip> passes it through to the rendered overlay.
Verified: axe-core on /admin/tenants — 0 tooltip violations post-fix.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-13 13:38:21 +03:00
Дмитрий
4cde3d0399
docs: add RUNBOOK.md — production deployment runbook
...
Audit #2 Phase 14 P2 fix. Covers: system requirements, DB setup
(ICU collation + roles + migrations + grants), partition bootstrap,
frontend build, Supervisor queue config, cron scheduler, Nginx,
health checks, rolling update sequence, rollback, dev seed,
common issues. cspell-words.txt +mbstring +pcntl (PHP ext names).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-13 13:35:19 +03:00
Дмитрий
e9c60d27f1
fix(schedule): register partitions:create-months as daily cron
...
Audit #2 Phase 14 P2: partition tables were not auto-created.
Without this entry the scheduler never called partitions:create-months,
causing partition exhaustion on the first day of each new month.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-13 13:32:56 +03:00
Дмитрий
ff6d5b0c08
fix(test): ProjectFactory unique name + test:parallel composer alias
...
fake()->unique()->words(3,true) fixes quirk #77 deterministic collision
on projects(tenant_id,name) UNIQUE in --parallel runs.
test:parallel alias = pest --parallel --recreate-databases (quirk #62/#73).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-13 13:32:00 +03:00
Дмитрий
9f835162e7
style(frontend): apply prettier --write — fix formatting drift
...
4 files reformatted (import list expansion, line-length wrapping).
Vitest 88/683+3sk green.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-13 13:30:51 +03:00
Дмитрий
427091e69f
test(vitest): add testTimeout: 10000 — fix quirk #80 router.spec.ts coverage timeout
...
v8 coverage instrumentation adds ~10x overhead to router-guard async tests,
pushing past the 5000ms default. Audit #2 Phase 13 finding.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-13 12:48:40 +03:00
Дмитрий
1a9746da10
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
Дмитрий
9f394416da
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
Дмитрий
7cea519dce
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
Дмитрий
6279e4be20
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
Дмитрий
fc2f584f02
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
Дмитрий
5fd4c2f13a
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
Дмитрий
c6a1e6df1f
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
Дмитрий
b9d979fdce
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
Дмитрий
420d818201
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
Дмитрий
47e4aaba33
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 5b67dd0 , нормативка 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
CoralMinister
5b67dd0455
Merge pull request #4 from CoralMinister/feat/claude-automation-norm-sync
...
docs(meta): sync нормативки — #34 Sentry MCP + #35 Redis MCP (off-phase debug-runtime)Feat/claude automation norm sync
2026-05-13 10:05:26 +03:00
Дмитрий
f1f4bc7f46
docs(meta): CLAUDE.md v1.91 → v1.92 — §3 +#34/#35 sentry+redis (off-phase debug-runtime)
...
Применены 9 edits через /claude-md-management:claude-md-improver per §5 п.10:
- Шапка: v1.91 → v1.92 от 13.05.2026 day +1
- §0 row Pravila: v1.12 → v1.13 (§13.2 +Off-phase MCP debug-runtime)
- §0 row PSR_v1: v2.0 → v2.1 (R10.1 Блок 3 +sentry+redis)
- §0 row Tooling: v1.16 → v1.17; «33 формализованных» → «35»
- §1 priority chain row 2b: «33 инструментов» → «35»
- §3 title: «Карта 33» → «Карта 35»
- §3.3 table: +#34 Sentry MCP + #35 Redis MCP rows после #33
- §3.3 footer: «Total: 33 = 29+3+1» → «35 = 29+5+1»
- §9 история: +v1.92 entry
Категория debug-runtime — отдельная от UI-пула (UPM/21st) и от infrastructure
(claude-md-management). Не trigger'ит R6.0/R6.1 и не входит в R14 pipeline.
READ-ONLY usage обязателен.
Связано: Tooling 669b0bc (v1.17), PSR_v1 347301e (v2.1), Pravila 280c4be (v1.13).
PR #3 (a4d4015 ) merge precedent. Branch: feat/claude-automation-norm-sync.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 09:52:39 +03:00
Дмитрий
89aadd5057
chore(cspell): add «нормативку» (accusative case)
...
Поддержка для CLAUDE.md v1.92 шапка. «нормативки» (genitive) уже в словаре —
inflection-blind cspell не распознаёт «нормативку» автоматически.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 09:52:38 +03:00
Дмитрий
280c4bec37
docs(rules): §13.2 +Off-phase MCP debug-runtime (sentry+redis) — Pravila v1.12 → v1.13
...
Применены 3 edits per Task 9 drafts (commit 00eb8ad ):
- Шапка: v1.12 → v1.13 от 13.05.2026 day +1; +«Что изменилось в v1.13» section
- §13.2 cross-ref на PSR_v1: v2.0 (15 правил R0–R14) → v2.1 (+R10.1 Блок 3 sentry+redis)
- §13.2 +новый абзац «Off-phase MCP debug-runtime (отдельная категория)» после
«Инфраструктурные плагины» paragraph: sentry-mcp (#34 , pending Б-1) +
redis-mcp (#35 , deprecated, Memurai verified)
Категория отдельная от UI-пула (§13.2 paired-stack + UPM + 21st) и от
infrastructure (claude-md-management). Не trigger'ит R6.0/R6.1 stack-фильтры
и не входит в R14 pipeline UI-генераторов. READ-ONLY usage обязателен.
Связано: Tooling v1.16 → v1.17 (669b0bc ), PSR_v1 v2.0 → v2.1 (347301e ),
CLAUDE.md v1.91 → v1.92 (next via claude-md-management).
PR #3 (a4d4015 ) merge precedent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 09:48:28 +03:00
Дмитрий
347301e5ab
docs(psr): R10.1 Блок 3 +sentry+redis MCP (debug-runtime category) — v2.0 → v2.1
...
Применены 3 edits per Task 9 drafts (commit 00eb8ad ):
- Шапка: v2.0 → v2.1 от 13.05.2026 day +1; L4 narrative +упоминание debug-runtime MCP
- R10.1 Блок 3 (MCP-серверы): +2 строки sentry + redis с категорией debug-runtime
- История версий: +v2.1 entry перед v2.0
NB по drafts correction: drafts указывали "Блок 1" — actual right block для MCP serverов = Блок 3 (MCP-серверы по `~/.claude.json` / `.mcp.json`).
Категория debug-runtime introduced — отдельная от UI-пула (Pravila §13) и infrastructure
(claude-md-management). READ-ONLY usage, не trigger'ит R6.0/R6.1 фильтры, не входит в R14 pipeline.
Связано: Tooling v1.16 → v1.17 (669b0bc ), CLAUDE.md v1.91 → v1.92, Pravila v1.12 → v1.13.
PR #3 (a4d4015 ) merge precedent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 09:47:04 +03:00
Дмитрий
669b0bc864
docs(tooling): §0 +#34 Sentry MCP + #35 Redis MCP (off-phase debug-runtime) — v1.16 → v1.17
...
Применены 5 edits per Task 9 drafts (commit 00eb8ad ):
- §0 Сводка row off-phase tools: +3 → +5
- §0 footer: «Итого формализованных позиций» 33 → 35
- §4.8 (новый) — #34 Sentry MCP (@sentry/mcp-server@0.33 .0+, official; pending Б-1)
- §4.9 (новый) — #35 Redis MCP (@modelcontextprotocol/server-redis@2025.4.25, deprecated Anthropic source; Memurai PONG verified Task 4)
- §13 история: +v1.16 строка (missing gap) + v1.17 строка
- Footer notes: +v1.16 + v1.17 prepended
- Шапка: v1.16 → v1.17 от 13.05.2026 day +1
Категория debug-runtime — отдельная от UI-пула (UPM/21st) и инфраструктурного (claude-md-management).
Не trigger'ит R6.0/R6.1 фильтры и не входит в R14 pipeline.
Связано: PSR_v1 v2.0 → v2.1, CLAUDE.md v1.91 → v1.92, Pravila v1.12 → v1.13 (separate commits).
PR #3 (a4d4015 ) merge precedent.
Verification: markdownlint 0 errors, lychee 5/5 OK 0 broken, gitleaks 10.91 KB no leaks.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 09:45:04 +03:00
Дмитрий
4330b748cf
chore(cspell): add 3 words (wenit, FLUSHDB, LPUSH)
...
Поддержка для Tooling v1.17 §4.9 Redis MCP entry:
- wenit — npm пакет автор (@wenit/redis-mcp-server, post-MVP migration candidate)
- FLUSHDB, LPUSH — Redis команды (forbidden в READ-ONLY usage)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 09:44:50 +03:00
Дмитрий
9386280a4e
Merge branch 'main' of https://github.com/CoralMinister/lidpotok
2026-05-13 09:33:14 +03:00
CoralMinister
a4d4015622
Merge pull request #3 from CoralMinister/feat/claude-automation
...
Feat/claude automation
2026-05-13 09:26:46 +03:00
Дмитрий
c0a5fd1807
feat(agent): extend pest-parallel-debugger с quirk 77 (unique-key collision)
...
Applied 4 edits per quirk-77 plan Task 3:
- Edit 3.1: добавлен Quirk 77 entry в known-quirks section (between Quirk 73 и NB line)
- Edit 3.2: добавлена Hypothesis 4 quirk 77 в diagnostic pipeline (renumber «other» к H5)
- Edit 3.3: обновлён output format template (+Hypothesis 4 row + extended Conclusion options)
- Edit 3.4: обновлён description frontmatter (+quirk 77 classification (d))
Quirk 77: Pest --parallel deterministic unique-key collision на projects(tenant_id, name)
в ProjectBulkActionsTest::rejects_bulk_when_scope_filter_captures_more_than_500_projects.
Evidence (Task 8 baseline check):
- db/schema.sql:836 UNIQUE (tenant_id, name)
- app/database/factories/ProjectFactory.php:23 fake()->words(3, true)
- app/tests/Pest.php:18 // ->use(RefreshDatabase::class)
- app/tests/Feature/Api/ProjectBulkActionsTest.php:194-206 (501-project bulk)
- 2× --parallel runs failed 738/742; sequential isolation 14/14 ✅
- NOT regression from feat/claude-automation (f454e95 audit-2 zero PHP)
Root cause partial: collision matches birthday paradox (~12.5%), но
deterministic-in-parallel vs sequential suggests worker state sharing
(shared Faker seed via PHP global? Eloquent factory caching?). Full RCA pending.
Mitigation: known parallel-only flake; sequential always passes.
Long-term fix candidates documented в quirk entry.
NB: project-local subagent auto-discovery может требовать session restart.
Verification: markdownlint 0 errors, gitleaks no leaks, +13/-3 lines.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 08:50:23 +03:00
Дмитрий
0e3f6b2301
docs(plan): quirk #77 candidate plan — Pest --parallel unique-key collision
...
Plan: docs/superpowers/plans/2026-05-13-quirk-77-pest-parallel-unique-key-collision-plan.md
279 lines, 3 tasks для documenting Task 8 baseline check finding.
Discovery: ProjectBulkActionsTest::rejects_bulk_when_scope_filter_captures_more_than_500_projects
reproducibly fails 738/742 в --parallel --recreate-databases.
Sequential 14/14 ✅ . NOT regression from feat/claude-automation
(verified f454e95 audit-2 commit zero PHP touched).
Evidence captured this session:
- db/schema.sql:836 UNIQUE (tenant_id, name)
- app/database/factories/ProjectFactory.php:23 fake()->words(3, true)
- app/tests/Pest.php:18 // ->use(RefreshDatabase::class) (TX rollback only)
- app/tests/Feature/Api/ProjectBulkActionsTest.php:194-206 (501-project bulk)
Tasks:
1. Memory feedback_environment.md +#77 entry (76→77 quirks)
2. MEMORY.md line 5 summary bump
3. .claude/agents/pest-parallel-debugger.md +Hypothesis 4 + output template
+ description frontmatter
Root cause partial: collision pattern matches birthday paradox (~12.5% per-test
prob with ~100-word Lorem ~1M combos), но deterministic-in-parallel vs sequential
suggests worker state sharing (shared Faker seed via PHP global state? Eloquent
factory caching?). Full RCA pending.
Apply-time recommendation: defer until completion plan Task 9 merged,
apply на separate branch feat/quirk-77-update для atomic-commit hygiene.
Verification: lychee 5/5 OK, markdownlint 0 errors, gitleaks 19.07 KB clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 08:46:07 +03:00
Дмитрий
00eb8ad235
docs(drafts): pre-prep norm-sync edit blocks для Task 9 (5 files, 9 edits)
...
Drafts file: docs/superpowers/plans/2026-05-13-claude-automation-norm-sync-drafts.md
364 lines, 5 file targets, 9 distinct Edit blocks с OLD/NEW pairs.
Targets:
- Tooling §0 + §4.8 (sentry) + §4.9 (redis) + §13 changelog v1.16→v1.17
- PSR_v1 R10.1 table + история v2.0→v2.1
- CLAUDE.md §3.3 +#34/#35 + §0 cross-refs + v1.91→v1.92 (через claude-md-management plugin per §5 п.10)
- Pravila §13.2 +Off-phase MCP debug-runtime subsection + v1.12→v1.13
- Memory MEMORY.md + reference_archive.md header refs
Critical correction в drafts: original plan Task 9.3 wording «§3.3 +#34/#35» — error.
Tooling §3.3 = «БД-инструменты», off-phase tools живут в §4.5/§4.6/§4.7.
New sentry+redis → §4.8 + §4.9 (new subsections). Corrected throughout drafts.
Plus bonus finding: new Pest --parallel quirk #77 candidate
(ProjectBulkActionsTest unique key collision on parallel worker shared-DB).
NOT regression from feat/claude-automation (verified). Recommendation:
separate follow-up plan to add quirk #77 to memory + extend
pest-parallel-debugger.
Verification: lychee 3/3 OK 0 errors, markdownlint 0 errors after MD032 fix,
gitleaks 27.35 KB scanned no leaks.
Applied: 0 of 9 edits (drafts only, awaiting Task 1 PR merged).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 08:38:13 +03:00
Дмитрий
7db4075107
docs(plan): completion plan для 9 post-implementation tasks
...
Plan: docs/superpowers/plans/2026-05-13-claude-automation-completion-plan.md
1047 lines, 9 tasks разделены на 3 фазы:
- Phase A (Tasks 1-2): PR creation + Claude Code session reload
- Phase B (Tasks 3-7): hook smoke + Redis check + skill/subagent invocations + Sentry creds
- Phase C (Tasks 8-9): Pest/Vitest regression + sync нормативки (4 sub-files) + merge + worktree cleanup
Architecture decision: Option A (merge feat/claude-automation first, sync нормативки
on separate branch feat/claude-automation-norm-sync). Clean PR audit trail.
Pre-execution baseline captured. Verification: lychee 7/7 OK 0 errors,
markdownlint 0 errors, gitleaks no leaks.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 08:19:40 +03:00
Дмитрий
4822610df5
fix(agent): escape <cmd>/<output> backticks в pest-parallel-debugger
...
Markdownlint MD033 (no-inline-html) caught <cmd> and <output> placeholders
on line 63 of constraints section as HTML elements. Wrapped в inline-code
backticks.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 07:54:20 +03:00
Дмитрий
a2b5126d19
feat(agent): add pest-parallel-debugger subagent
...
Project-local subagent в .claude/agents/pest-parallel-debugger.md.
Specialized для верифицированных Pest --parallel квирков 72 + 73
в проекте Лидерра (memory feedback_environment.md lines 385, 389):
- quirk 72 — Redis supplier:session race в subdir-only run
- quirk 73 — cumulative state на long sessions
4-hypothesis diagnostic pipeline (real / quirk 72 / quirk 73 / other).
READ-ONLY (tools: Read, Grep, Bash).
NB: quirks 70-71 в memory — про a11y/Vuetify, не Pest — не входят в agent's scope.
Quirks 74-76 — про npm/Lucide/plans paths, тоже не Pest.
Замена generic systematic-debugging для повторяющихся flake патернов.
NB: project-local subagent auto-discovery может требовать session restart.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 07:53:53 +03:00
Дмитрий
995886f73f
feat(agent): add rls-reviewer subagent для migration review
...
Project-local subagent в .claude/agents/rls-reviewer.md.
Specialized для 5-role архитектуры Лидерры (crm_app_user/admin/
supplier_worker BYPASSRLS/readonly/migrator).
Walks 7-item checklist: tenant_id, ENABLE RLS, 2 policies, 5-role GRANTs,
CHANGELOG, squawk. READ-ONLY (tools: Read, Grep, Glob, Bash).
Замена generic security-review для security-critical RLS работ (39 политик).
NB: project-local subagent auto-discovery может требовать session restart.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 07:53:00 +03:00
Дмитрий
99a242c9ed
feat(hook): remind db/CHANGELOG_schema.md on db/schema.sql edits (PostToolUse)
...
PostToolUse hook на Edit|Write matcher — emits stdout reminder если file path
matches regex `(^|/)db/schema\.sql$` (Windows backslashes normalized к `/`).
Runtime enforcement существующего правила CLAUDE.md §5 п.8:
"Не править db/schema.sql без записи в db/CHANGELOG_schema.md."
Self-review (§8) ловит это поздно (после ≥3 групп правок); hook — сразу,
в transcript stdout vs stderr (visible alongside markdownlint output).
Параллельный entry в hooks.PostToolUse array — Claude Code processes oба
markdownlint (для .md без CLAUDE.md) + schema reminder (для db/schema.sql)
независимо на каждом Edit|Write.
Edge case: Bash-обход (echo ... >> db/schema.sql) не покрывается —
known limitation, документировано в spec §4.6.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 07:52:10 +03:00
Дмитрий
c5b0cdfe6f
feat(hook): block direct edits of root CLAUDE.md (PreToolUse, Option A warning)
...
PreToolUse hook на Edit|Write matcher — emits stderr warning если file path
exactly === <project>/CLAUDE.md (path.resolve compare, AND CLAUDE_FILE_PATH +
CLAUDE_PROJECT_DIR both injected by Claude Code at hook firing).
Runtime enforcement существующего правила CLAUDE.md §5 п.10:
"Не править этот CLAUDE.md напрямую — только через плагин claude-md-management."
Option A (warning-only) chosen per Task 1 pre-flight Q5: skill-marker detection
ненадёжно в текущей Claude Code (CLAUDE_SKILL_ACTIVE env var inconclusive в Bash
session — injection-only при hook firing, не verifiable без live test). Warning
visible в transcript stderr; если invoked via /claude-md-management:*, warning
информационный, не блокирует.
Не trigger'ит для:
- app/CLAUDE.md (Boost-managed, не существует на момент implementation)
- node_modules/*/CLAUDE.md (если есть — не root project)
Edge case: Bash-обход (sed -i CLAUDE.md или > CLAUDE.md) не покрывается —
known limitation, документировано в spec §4.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 07:51:34 +03:00
Дмитрий
e9880a1c1b
feat(skill): add /rls-check — 7-item RLS checklist для new tables
...
Project-local skill в .claude/skills/rls-check/SKILL.md.
Инкапсулирует security-critical check: tenant_id, ENABLE RLS, 2+ policies,
5-role GRANTs (db/02_grants.sql), CHANGELOG, squawk, smoke test.
disable-model-invocation: true — для физического вызова при modify db/schema.sql.
Полезно для security-critical правок (39 RLS политик × 5 ролей).
NB: project-local skill auto-discovery может требовать session restart.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 07:50:51 +03:00