Skip to content

Feature: per-builder AI credit limits on by default for new workspaces - #18309

Merged
akshaysasidrn merged 14 commits into
feat/4766-ai-credit-limitsfrom
feat/4766-s14-limits-on-for-new-workspaces
Oct 8, 2026
Merged

akshaysasidrn merged 14 commits into
feat/4766-ai-credit-limitsfrom
feat/4766-s14-limits-on-for-new-workspaces

Conversation

@akshaysasidrn

@akshaysasidrn akshaysasidrn commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

📝 What this does

Per-builder AI credit limits are now on by default for new workspaces, while every existing workspace keeps its current setting.

Issue: Relates to ToolJet/tj-ee#4766
Submodules: ee-server #924

🔀 Changes

  • Added a migration that writes explicit "off" limit rows for every existing workspace, and for the instance scope when any workspace exists.
  • A fresh install (no workspaces yet) gets no rows, so it starts with limits on.
  • Updated existing AI specs to set limits on or off explicitly instead of relying on the old default.
  • Added specs for the new default, enforcement in a new workspace, and the migration on a real database.
🛡️ Merge impact: 🟢 reversible
  • Reach: EE and Cloud AI credit limits; one data insert into the credit limits table.
  • Not included: the migration's down step does nothing; the rows it writes read as "off" in both old and new code, so a revert changes no behaviour.

🧪 How to test

  • Run the AI unit and e2e folders on EE and Cloud. Verified: e2e 97/97 on both editions; unit 218 passed on both.
  • Run the migration on a database with existing workspaces, then again. Verified by the verifier on a real DB: off rows for workspaces without settings, untouched otherwise, second run is a no-op, lock timeout restored.
  • Create a new workspace and open the AI credits usage page. Verified by e2e: limits report on with equal share; a builder over their share is refused.
  • Turn limits off in a new workspace, and load its usage page for the first time. Verified by e2e: off rows written and only the disabled event logged; the first load writes the default rows as on (mutation-checked).

@akshaysasidrn
akshaysasidrn added this pull request to stack #18285 October 7, 2026 12:15
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Security Audit Report

Node module vulnerabilities summary (total across frontend, server, marketplace, plugins, root):
🔴 Critical: 14
🟠 High: 247
🟡 Moderate: 127

Critical packages:

  • frontend: handlebars,jspdf,maplibre-gl,plotly.js,protobufjs,proxy-addr,shell-quote,tar,websocket-driver
  • server: @simple-git/argv-parser,proxy-addr,simple-git
  • marketplace: tar,websocket-driver

ℹ️ Runs automatically on every PR update (also triggerable via the check-vulnerability label). Critical/High should be fixed before merge; Moderate can be tracked separately. Counts are from npm audit — per-workspace JSON artifacts are on the summary page.

Base automatically changed from feat/4766-s13-design-polish to feat/4766-s11-pool-change-adjustment October 8, 2026 19:51
Base automatically changed from feat/4766-s11-pool-change-adjustment to feat/4766-ai-credit-limits October 8, 2026 19:52
@akshaysasidrn
akshaysasidrn merged commit 00be621 into feat/4766-ai-credit-limits Oct 8, 2026
84 of 86 checks passed
@akshaysasidrn
akshaysasidrn deleted the feat/4766-s14-limits-on-for-new-workspaces branch October 8, 2026 19:53
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