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

vocdoni / saas-backend / 28359498782
63%

Build:
DEFAULT BRANCH: main
Ran 29 Jun 2026 08:47AM UTC
Jobs 1
Files 113
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

29 Jun 2026 08:40AM UTC coverage: 62.45% (+0.2%) from 62.276%
28359498782

push

github

web-flow
fix(subscriptions): govern managed-org limits by the integrator's plan (#557)

* fix(subscriptions): govern managed-org limits by the integrator's plan

Managed organizations were seeded with a throwaway default plan, and almost
every usage-limit check resolved limits from that plan (org.Subscription.PlanID)
rather than the integrator's. As a result a managed org was bound by its own
default plan, and the integrator's plan was ignored for everything except the
three aggregate quotas (MaxManagedOrgs/Processes/CensusSize).

Resolve limits from the integrator for managed orgs:

- limitsOwner(org) returns the integrator (via ManagedBy) for managed orgs, else
  the org itself; fails closed if a managed org's integrator can't be resolved.
- Capability flags + value caps (Anonymous, Weighted, Overwrite, MaxDuration,
  MaxDrafts) take the integrator's plan value.
- Per-org census-size/process-count checks are dropped for managed orgs; they are
  already enforced against the integrator aggregate via ReserveManagedPublish.
- 2FA SMS/email and members are enforced as a shared integrator pool, summed live
  across the integrator's managed orgs (CountMembersManagedBy, SumSent*ManagedBy).
  No new counters, no csp.go change, no migration.

Adds unit tests proving a managed org is governed by the integrator's limit and
not its own plan, plus a db integration test for the live aggregate readers.

* refactor(integrator): use plan top-level limits for managed process/census caps

The integrator aggregate quotas duplicated the plan's top-level limits:
IntegratorLimits.MaxManagedProcesses/MaxManagedCensusSize mirrored
Plan.Organization.MaxProcesses/MaxCensus. Drop the two duplicate fields and
source the aggregate caps from the integrator plan's top-level limits, keeping
MaxManagedOrgs (which has no top-level equivalent).

- db.IntegratorLimits / apicommon.SubscriptionIntegratorLimits: keep only
  MaxManagedOrgs (swagger regenerated).
- subscriptions: new ManagedPublishLi... (continued)

120 of 165 new or added lines in 4 files covered. (72.73%)

10060 of 16109 relevant lines covered (62.45%)

45.01 hits per line

Uncovered Changes

Lines Coverage ∆ File
24
68.24
5.35% subscriptions/subscriptions.go
16
78.91
-0.66% db/organizations.go
5
0.0
0.0% cmd/cli/main.go
Jobs
ID Job ID Ran Files Coverage
1 28359498782.1 29 Jun 2026 08:47AM UTC 113
62.45
GitHub Action Run
Source Files on build 28359498782
  • Tree
  • List 113
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 1f7f0d05 on github
  • Prev Build on main (#28358378347)
  • Next Build on main (#28359818947)
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