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

raystack / frontier / 29002980359
45%
main: 45%

Build:
Build:
LAST BUILD BRANCH: fix/connect-shutdown-drain
DEFAULT BRANCH: main
Ran 09 Jul 2026 07:59AM UTC
Jobs 1
Files 281
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

09 Jul 2026 07:54AM UTC coverage: 44.88% (+0.001%) from 44.879%
29002980359

Pull #1744

github

whoAbhishekSah
fix(invitation): auto-delete expired invitations on a schedule

Nothing removed an invitation once it expired. Trying to accept an
expired invite just fails with an error, and creating a new invite for
the same user writes over the old one — neither path deletes the expired
invite. So an invite that was never accepted or deleted kept its
invitations row and both SpiceDB tuples (#user and #org) forever.

Add a daily background job (robfig/cron, "0 0 * * *" UTC, same pattern
as the domain-verification and session-cleanup jobs) that finds expired
invitations and deletes them.

The job deletes through the existing invitation.Delete, which removes
both SpiceDB tuples and the invitations row together. This is important:
the repository's old GarbageCollect ran a raw row DELETE, which would
have left the SpiceDB tuples behind as orphans. GarbageCollect is
removed and replaced with a read-only ListExpired that the service
iterates over.

- core/invitation: InitInvitationCleanup / DeleteExpiredInvitations /
  Close, and a ListExpired repository method.
- cmd/serve: start the job at boot and stop it on shutdown, next to the
  other periodic jobs.
- store/postgres: GarbageCollect -> ListExpired.
- tests for the sweep and for ListExpired.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull Request #1744: fix(invitation): auto-delete expired invitations on a schedule

27 of 57 new or added lines in 3 files covered. (47.37%)

46 existing lines in 2 files now uncovered.

16904 of 37665 relevant lines covered (44.88%)

12.5 hits per line

Uncovered Changes

Lines Coverage ∆ File
15
49.26
0.71% core/invitation/service.go
8
0.0
0.0% cmd/serve.go
7
79.51
-0.79% internal/store/postgres/invitation_repository.go

Coverage Regressions

Lines Coverage ∆ File
44
49.26
0.71% core/invitation/service.go
2
79.51
-0.79% internal/store/postgres/invitation_repository.go
Jobs
ID Job ID Ran Files Coverage
1 29002980359.1 09 Jul 2026 07:59AM UTC 281
44.88
GitHub Action Run
Source Files on build 29002980359
  • Tree
  • List 281
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #1744
  • PR Base - main (#28923011017)
  • Delete
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

© 2026 Coveralls, Inc