Commit Graph

66 Commits

Author SHA1 Message Date
Vladimir Bryzgalov 1f85d009c4 feat(settings): options wrapper with wp-config constant override 2026-04-17 22:43:36 +05:00
Vladimir Bryzgalov f24cadc799 feat(flamingo-helper): locate flamingo_inbound posts and extract fields/reason 2026-04-17 22:42:38 +05:00
Vladimir Bryzgalov 09f2638066 feat(queue): CRUD, dedup, retention, status counters 2026-04-17 22:41:30 +05:00
Vladimir Bryzgalov cc37aa2647 feat(crypto): AES-256-CBC token encryption via AUTH_KEY 2026-04-17 22:40:08 +05:00
Vladimir Bryzgalov 6961bb1b72 feat(telegram): exception carrying permanent/retry_after flags 2026-04-17 22:39:04 +05:00
Vladimir Bryzgalov d3bd360357 feat(message-formatter): build Telegram HTML payload with inline tel button 2026-04-17 22:37:10 +05:00
Vladimir Bryzgalov a7b796d381 docs: honeypot is a hard override on label=spam
Previous plan/spec made honeypot a -5 weighted signal only. That is
insufficient to force 'spam' when the submission also has a RU phone
(+3), cyrillic name (+1), and meaningful text (+1) — a clean +5 cancels
-5, yielding 'unclear'. The honeypot test (test_honeypot_forces_spam_
even_with_phone) caught this.

Honeypot semantics: a filled hidden field is a bot by definition.
No combination of positive signals can make it a legitimate client.
Keeping the -5 weight on 'reasons' list for transparency, but adding
a hard override that sets label='spam' at the end of classify().

Caught by TDD on Task 7.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 22:21:51 +05:00
Vladimir Bryzgalov 90940dd928 feat(classifier): weighted heuristic for client/unclear/spam scoring 2026-04-17 22:21:10 +05:00
Vladimir Bryzgalov 3dd0f41446 feat(phone-parser): normalize RU phones and extract first candidate 2026-04-17 22:08:57 +05:00
Vladimir Bryzgalov 558483ef44 docs: fix punycode example and regex delimiter in plan/spec
- xn--80aafmakjldfe1b5h.xn--p1ai decodes to "алквзелчкоеиа.рф", not
  "вашаняня.рф". Correct Punycode for "вашаняня.рф" is
  xn--80aae0ca7d8bb.xn--p1ai. Updated plan Task 2 test and spec §9.
- DomainFormatter strip-path regex '#[/?#].*$#' had the '#' delimiter
  colliding with the literal '#' inside the character class. Switched
  to tilde delimiters: '~[/?#].*$~'.

Both caught by TDD RED/GREEN loop on Task 3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 22:04:15 +05:00
Vladimir Bryzgalov 6068a6a54f feat(domain-formatter): decode punycode hosts to Cyrillic with fallbacks 2026-04-17 22:03:33 +05:00
Vladimir Bryzgalov 6aa1ef41e6 chore: add composer + phpunit dev scaffolding
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 21:53:22 +05:00
Vladimir Bryzgalov be00b7996c docs: add plan→bd ID map 2026-04-17 21:46:18 +05:00
Vladimir Bryzgalov 4569b5f586 docs: add implementation plan for cf7-spam-to-telegram
25 bite-sized TDD tasks covering composer/phpunit setup, pure-logic
classes (DomainFormatter, PhoneParser, Classifier, MessageFormatter)
with full test code, integration classes (Queue, Dispatcher, TelegramClient,
CF7Source, RetroImporter), admin UI, lifecycle hooks, and a manual
pilot on washanyanya.ru.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 21:36:35 +05:00
Vladimir Bryzgalov b1d8dfd044 bd init: initialize beads issue tracking 2026-04-17 21:28:59 +05:00
Vladimir Bryzgalov 3a998c36d2 docs: add design spec for cf7-spam-to-telegram plugin
Independent WP plugin that forwards CF7 spam submissions to a Telegram group,
applying a weighted heuristic (client/unclear/spam) to help operators
spot real inquiries mistakenly filtered as spam.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 21:26:51 +05:00