• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / tg-spam / 19528601838
83%

Build:
DEFAULT BRANCH: master
Ran 20 Nov 2025 07:10AM UTC
Jobs 1
Files 31
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Nov 2025 07:06AM UTC coverage: 82.071% (+0.1%) from 81.939%
19528601838

push

github

web-flow
Add approved-only reporting and auto-ban threshold (#341)

* docs: add implementation plan for user report enhancements

add comprehensive implementation plan for issue #336 addressing:
- approved-only reporting to prevent abuse
- auto-ban threshold for automatic action without admin approval

includes critical fixes for:
- soft-ban mode support in report flow
- orphaned notification prevention
- database memory leak from old reports
- periodic cleanup goroutine for quiet groups
- goroutine lifecycle management

Related to #336

* refactor: simplify cleanup strategy to avoid over-engineering

remove periodic cleanup goroutine in favor of simpler approach:
- keep existing cleanup call in Add() (not remove it)
- cleanup deletes ALL old reports (remove notification_sent filter)
- handles 99% of cases without background workers
- very quiet groups may accumulate a few orphaned rows - acceptable

removed complexity:
- no background goroutine with ticker
- no context lifecycle management
- no Close() method or shutdown wiring
- no complex goroutine lifecycle tests

cleaner, simpler, focused on core features (approved-only + auto-ban)

* fix: update test requirements based on agent reviews

critical fixes:
- consolidate all tests into existing reports_test.go (follow one-test-file-per-source rule)
- specify removal/update of conflicting cleanup test
- add table-driven test naming pattern
- expand test coverage for edge cases (dry mode, training mode, error handling)
- document cleanup behavior change explicitly

reviewed by: qa-expert, go-test-expert, go-architect agents
validated findings and kept only critical fixes

* feat: add approved-only reporting and auto-ban threshold

implements two report enhancements to improve spam control and prevent abuse:

- approved-only reporting restricts /report command to approved users, preventing malicious actors from abusing the report system
- auto-ban threshold enables automatic action after N reports without admin ... (continued)

163 of 196 new or added lines in 4 files covered. (83.16%)

6372 of 7764 relevant lines covered (82.07%)

266.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
11
62.19
-0.5% app/main.go
22
85.86
0.59% app/events/reports.go
Jobs
ID Job ID Ran Files Coverage
1 19528601838.1 20 Nov 2025 07:10AM UTC 31
82.07
GitHub Action Run
Source Files on build 19528601838
  • Tree
  • List 31
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 421f328c on github
  • Prev Build on master (#19528169324)
  • Next Build on master (#19550305352)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc