Summary
Implement the comment moderation pipeline: insert-time spam scoring via pre_comment filter hook, anti-abuse rules (honeypot, time-on-page, per-IP rate limit, dedupe), and the comment.transitioned hook for admin moderation changes.
Design reference
- docs/01-core-cms.md §6.3 (Moderation & spam)
- docs/01-core-cms.md §6.4 (What we don't do)
Acceptance criteria
Dependencies
#16
Complexity
M
Summary
Implement the comment moderation pipeline: insert-time spam scoring via
pre_commentfilter hook, anti-abuse rules (honeypot, time-on-page, per-IP rate limit, dedupe), and thecomment.transitionedhook for admin moderation changes.Design reference
Acceptance criteria
pre_commentfilter chain runs on insert; returns{score 0-100, reason}; status set tospamif score ≥ threshold (configurable, default 80)email_confirmrejected if non-empty(email, IP, post_id)checked against recent submissions (last hour)author_ipredacted to/24(IPv4) or/64(IPv6) by a daily Asynq job for rows older than 90 dayscomment.transitionedhook fires on every admin-driven status changeDependencies
#16
Complexity
M