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

safe-global / safe-auth-service / 45358213302
96%

Build:
DEFAULT BRANCH: main
Ran 24 Nov 2026 08:44AM UTC
Jobs 1
Files 130
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

24 Nov 2026 08:40AM UTC coverage: 95.963% (-0.6%) from 96.553%
45358213302

push

github

web-flow
feat: Send quota alert emails from a scheduled task (PLA-1951) (#535)

* feat: Add quota alert endpoint (PLA-1951)

Users get no warning before their monthly quota runs out and their requests
start failing. Only the gateway sees the moment an account crosses 80% or 100%
of its quota, so it needs an endpoint to report it to; the service then emails
the account. The usage is re-read from the gateway instead of trusting the
caller, and an alert is sent once per threshold and quota window, again after a
limit change because the window restarts.

* feat: Send quota alerts from a periodic command (PLA-1951)

The gateway must not call the auth service, so the auth service now
checks the usage of every user itself on a schedule instead of
exposing an endpoint for the gateway.

* feat: Run quota alerts as a scheduled task (PLA-1951)

Scheduled work in our services runs on taskiq, as in the decoder
service, so the quota check becomes a task instead of a CLI command
that would need its own cron job.

* refactor: Trim the quota alert check and run it every 2 hours (PLA-1951)

A check per account every 15 minutes is more gateway load than an
alert email needs. The sent count was only there for the removed CLI
command.

* fix: Retry failed quota alerts and skip accounts without an API key (PLA-1951)

A failed send left the duplicate guard in place, which silenced that
alert for the whole quota period. Accounts without an active API key
have no usage in the gateway, so checking them only cost a call and a
warning on every run.

* feat: Let users turn quota alert emails off (PLA-1951) (#536)

* feat: Let users turn quota alert emails off (PLA-1951)

Product wants the quota alerts on by default with a way to opt out from the
dashboard. The setting lives on the user and is read and changed through /me,
so the terms version is no longer required there and the setting can be sent
on its own. An opted-out user is skipped before the gateway is asked for usage.

* test: Res... (continued)

3494 of 3641 relevant lines covered (95.96%)

0.96 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
75.51
-0.05% app/datasources/email/email_client.py
4
98.21
0.04% app/datasources/db/models.py
2
97.44
0.25% app/models/users.py
2
96.89
0.04% app/services/user_service.py
Jobs
ID Job ID Ran Files Coverage
1 45358213302.1 24 Nov 2026 08:44AM UTC 130
95.96
GitHub Action Run
Source Files on build 45358213302
  • Tree
  • List 130
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • fe3464b4 on github
  • Prev Build on main (#45192492361)
  • Next Build on main (#45390688811)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc