Repository navigation
Cap connectors with inbound webhooks per Cloud plan (#1393) - #1612
Merged
Merged
Conversation
helpcodeai
force-pushed
the
feat/plan-caps
branch
from
November 10, 2026 10:08
c38785d to
3004be5
Compare
helpcodeai
force-pushed
the
feat/webhook-plan-cap
branch
from
November 10, 2026 10:42
77de53c to
3677b0b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cloud plans now cap how many active connectors may receive inbound webhooks, as decided in #1393: Starter 1, Team and the trial 5, Business and Enterprise no limit. The cap uses the plan caps from #1601/#1602 and follows
PLAN_CAPS_ENFORCE:dry-run(the default) only logs,onrefuses with the usual403 PLAN_LIMIT. Self-hosted has no cap.Stacked on #1602 (
feat/plan-caps). Merge after #1601 to #1603.Changes
license/plan-caps.ts: newwebhooksaxis andwebhookConnectorCap(plan, override). A licence featuremaxWebhookConnectorsoverrides the plan, so a customer can get more by arrangement. An unknown plan is not capped.license/license-guard.service.ts:checkCanEnableWebhook(organizationId)counts active connectors of the organization withwebhookEnabledand callsrefuseOverCap. The trial is soft like the paid plans, not hard.connectors/connectors.controller.ts: checked onPUT /api/connectors/:idonly whenwebhookEnabledgoes from off to on, before anything is saved, and onPOST /api/connectorswhen a connector is created with webhooks on. Turning webhooks off, or leaving them on, is never checked.docs/cloud-plans.md(table row, how it counts, the new axis in the 403) anddocs/operations/observability.md(the Cloud difference).llms-full.txtregenerated.FitAxisinplan-fit.tsand no UI copy: the plan picker and the paywall notice (Show what Starter changes before checkout, and swap at the plan cap #1603) do not mention webhooks yet. That can follow once Show what Starter changes before checkout, and swap at the plan cap #1603 is in.Type
Testing
New tests:
plan-caps.guard.spec.ts: caps per plan and the override; dry-run logs[plan caps dry-run] would refuse webhooks …and allows;onrefuses at the cap withPLAN_LIMIT/axis: 'webhooks'and allows below it (Starter, Team, trial); Business, no licence and self-hosted are never capped (self-hosted does not even count).connectors.controller.spec.ts: off to on checks the cap before the update; a refusal saves nothing; on to on, on to off and unrelated edits never check; create checks only withwebhookEnabled: true.Commands, in
packages/backend(Prisma client generated withnpx prisma generate):npx tsc --noEmit -p tsconfig.json: exit 0npx jest --maxWorkers=4 src/license src/connectors src/plan-caps: 124 suites passed, 2 skipped; 2,315 tests passed, 11 skippednpx eslinton the 5 touched backend files: exit 0, no warningsnode scripts/generate-llms-txt.mjs(regeneratedllms-full.txt)Cloud vs self-hosted: on Cloud the cap applies as above; on self-hosted
checkCanEnableWebhookreturns at once. No Prisma change. Nothing underee/.Checklist
npm test): only the license, connectors and plan-caps folders were run locally; CI runs the full suiteRelated Issues
Relates to #1393 (point 1), #1601, #1602, #1603, #1571.