Skip to content

feat(billing): cap artifact storage per plan - #35

Merged
joris-gallot merged 2 commits into
mainfrom
feat/cloud-storage-quota
Aug 14, 2026
Merged

feat(billing): cap artifact storage per plan#35
joris-gallot merged 2 commits into
mainfrom
feat/cloud-storage-quota

Conversation

@joris-gallot

@joris-gallot joris-gallot commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Cloud metered test results and projects, never bytes. Now that videos and screenshots can be uploaded (#34), a paid workspace could grow storage without bound until retention caught up, and paid tiers keep runs for 90 to 365 days.

Adds a storageBytes entitlement: free 2 GB, team 50 GB, pro 250 GB, enterprise and self-host unlimited. Usage is a live SUM(artifact.size) over the org, so expiring runs give the space back.

The artifact route reads usage once per upload and uses it twice: probe with a single byte before touching the body (full workspace, 402, nothing streamed), then re-check against the real size after streaming and delete the blob if it crosses. Unlimited tiers skip the query entirely, so self-host never pays for this.

Settings shows used / limit next to the monthly results bar.

Self-host is unaffected: getEntitlements returns unlimited, so no cap and no extra query.

@joris-gallot
joris-gallot merged commit bbb0e34 into main Aug 14, 2026
8 checks passed
@joris-gallot
joris-gallot deleted the feat/cloud-storage-quota branch August 14, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant