Summary
The Node/SQLite self-host engine uses StaticEntitlementsProvider(kv) with a default plan of selfhost, but workspaces.plan is non-null and defaults to free. createWorkspace does not set a plan, so every workspace created through POST /v1/workspaces persists free; the provider never reaches its selfhost default. After 100,000 API calls, a self-host deployment starts returning 429 plan_limit_exceeded.
Current source
packages/engine/src/providers/static-entitlements.ts: default provider plan is selfhost, with unlimited API calls.
packages/engine/src/db/schema.ts: plan: text('plan').notNull().default('free').
packages/engine/src/engine/workspace.ts: createWorkspace omits plan.
The same behavior exists in installed @relaycast/engine 8.2.1 and current upstream 8.9.1.
Reproduction
- Start
relaycast-engine with Node + SQLite.
POST /v1/workspaces with a name.
- Query the resulting SQLite row:
plan is free.
- Set
usage:<workspace-id>:api_calls to 100000 or make that many calls.
- Authenticated API routes return
429 with plan_limit_exceeded, despite this being the self-host runtime.
Expected
A workspace created by the self-host adapter should use the selfhost entitlement unless the embedding deployment explicitly supplies a tiered plan. Existing self-host databases with an implicit/default free row may also need a migration or documented repair path.
Impact
The failure appears only after prolonged successful operation and disables channels, inbox, roster identity reads, and observer backfill. It looks like an external billing/quota problem even though the engine and database are local.
Summary
The Node/SQLite self-host engine uses
StaticEntitlementsProvider(kv)with a default plan ofselfhost, butworkspaces.planis non-null and defaults tofree.createWorkspacedoes not set a plan, so every workspace created throughPOST /v1/workspacespersistsfree; the provider never reaches itsselfhostdefault. After 100,000 API calls, a self-host deployment starts returning429 plan_limit_exceeded.Current source
packages/engine/src/providers/static-entitlements.ts: default provider plan isselfhost, with unlimited API calls.packages/engine/src/db/schema.ts:plan: text('plan').notNull().default('free').packages/engine/src/engine/workspace.ts:createWorkspaceomitsplan.The same behavior exists in installed
@relaycast/engine8.2.1 and current upstream 8.9.1.Reproduction
relaycast-enginewith Node + SQLite.POST /v1/workspaceswith a name.planisfree.usage:<workspace-id>:api_callsto 100000 or make that many calls.429withplan_limit_exceeded, despite this being the self-host runtime.Expected
A workspace created by the self-host adapter should use the
selfhostentitlement unless the embedding deployment explicitly supplies a tiered plan. Existing self-host databases with an implicit/defaultfreerow may also need a migration or documented repair path.Impact
The failure appears only after prolonged successful operation and disables channels, inbox, roster identity reads, and observer backfill. It looks like an external billing/quota problem even though the engine and database are local.