Repository navigation
Conversation
|
/review |
|
Claude finished @AlexRV12's task in 2m 21s —— View job Good to merge Review of #12701: Hub scripts for roles without
|
Deploying windmill with
|
| Latest commit: |
1e9a7a5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://54978961.windmill.pages.dev |
| Branch Preview URL: | https://alexandre-win-2824-let-a-rol.windmill.pages.dev |
Codex ReviewGood to merge No introduced bugs, security issues, or clear AGENTS.md violations found in the 57-file diff ending at Test coverageAdded Rust unit and API/DB integration tests exercise list resolution, validation, licensing, authorization, approval checks, batching, connection usage, and private-Hub cache separation. The PR reports worker and browser verification. Svelte component tests are not expected; documentation/config changes need no separate automated tests. I ran Rerun the backend integration tests after the rebase. Once the public Hub supports the lookup, exercise a public script through a private Hub’s fallback and confirm the worker executes the expected script. |
Pi ReviewGood to merge I reviewed the full diff: the backend rule ( Considered and dismissed
Test coverage
Manual verification still outstandingThe only item the PR's test plan leaves open is "public script through a private Hub's fallback", which needs the public Hub to ship |
34914ca to
c1600e1
Compare
ee60807 to
82f299b
Compare
|
/review |
|
Claude finished @AlexRV12's task in 48s —— View job Good to merge Re-review of #12701: what changed since the review on 2026-11-27
I found no P0, P1 or P2 issues in the new commits. The earlier review of the rule, the capabilities plumbing, the license lock and the endpoint still holds, and I re-read those parts against the current diff.
Things I checked again in the full diff
AGENTS.md compliance
Test coverageBackend. Coverage is still adequate. The latest commits removed only assertions for code that was itself removed (the per-Hub file name) and two checks that duplicate other tests. What remains:
Frontend. The new code is Svelte components with no new pure-logic utility, so no tests are expected. Manual verification before merge. The PR's checklist already covers the public-Hub fallback against hub.windmill.dev and the editor after the latest rebase. There is one scenario left that the cache revert makes worth checking. Point an instance at a private Hub. As an operator allowed |
Codex ReviewGood to merge No introduced bugs, security issues, or clear AGENTS.md violations found in the diff ending at Test coverageRust unit and integration tests cover list resolution, validation, licensing, authorization, approval flags, batching, and connection usage. Svelte component tests are not expected; docs and generated metadata need no separate tests.
For an independent smoke check, bulk-edit and discard permissions in both settings screens, save and reload, then run read-only and writing Hub scripts as an operator with Read access. Only the read-only script should run. |
Pi ReviewGood to merge I reviewed the full diff (backend rule and Hub lookup in Considered and dismissed
Test coverageBackend (Rust). Strong and appropriately targeted: Frontend (Svelte/TS). The new code is Svelte components and an inline Generated files / docs / CLI / OpenAPI. The Manual verification. The PR's checklist already records running-instance verification (operator run/refusal flows against a private and the public Hub, EE vs CE instance-list behavior, endpoint/bulk/YAML writes, fork/settings-document round-trips, and the editor at desktop/phone widths). The one path I'd still want a human to confirm on a live EE instance is the instance-settings screen with no license: the alert should show the stored list as read-only, and "Clear the list" should succeed while any other edit is refused by the server — that exercises the |
…t-a-role-without-code-use-the-hub # Conflicts: # backend/ee-repo-ref.txt # backend/windmill-api-workspaces/src/workspace_roles.rs # backend/windmill-api/openapi.yaml # backend/windmill-api/src/ai_session_tools/gen/instructions.json # backend/windmill-common/src/roles.rs # backend/windmill-common/tests/workspace_roles_license.rs # cli/src/guidance/skills.gen.ts # frontend/src/lib/components/instanceSettings/WorkspaceRolesSetting.svelte # system_prompts/auto-generated/prompts.ts # system_prompts/auto-generated/skills/workspace-settings/SKILL.md # system_prompts/base/workspace-settings.md
…t-a-role-without-code-use-the-hub # Conflicts: # backend/ee-repo-ref.txt # backend/windmill-api-workspaces/src/workspaces_extra.rs # backend/windmill-api/src/ai_session_tools/gen/instructions.json
|
A few things to look at:
|
Summary
A workspace role without
codemay not name a Hub script anywhere: not in a run, a flow or agent step, an app, a trigger or a schedule. This PR lets an admin allow those roles the approved Hub scripts of chosen integrations, per integration, atread(only the scripts an approver marked read-only on the Hub, a flag on the whole script that the Hub reports on each of its versions) orwrite(any approved version). The rule is enforced on the server where a path is chosen; the instance and workspace settings hold the list.Builds on windmill-labs/windmillhub#244 (merged), which adds the read-only flag and the lookup the rule reads (
GET /scripts/access_meta). A Hub without it refuses every script where some are allowed, saying the Hub needs an update; where none are, a script is still refused, without that lookup. The public Hub serves it. The flags are synced fromscript.jsonby windmill-labs/windmill-integrations#319 (merged).Fixes WIN-2824.
Changes
Where it is set
readorwrite, the same for every role withoutcode. The instance has one (hub_accessglobal setting) and a workspace may replace it as a whole (workspace_settings.hub_access, new column):NULLfollows the instance's, an own list does not merge with it, and an empty one allows nothing. So a workspace with its own list keeps an integration the instance later removes, as with AI settings./(reserved for per-script entries), is refused.RoleCapabilities.hubof each role withoutcodewhen the workspace's roles are loaded, so the rule reads it from the caller and needs no query, and a per-role layer could be added there later. It is not inRoleCapabilitiesPatch. The roles of a workspace share one list (SharedHubAccess, anArc), since a request copies the caller's capabilities 5 to 7 times: with all 250 public integrations allowed, a copy of the list costs about 5 µs, a shared one a pointer.RoleCapabilitiesis no longerCopy, which needs a few.clone()calls, one of them in EE (companion windmill-labs/windmill-ee-private#1019).POST /w/{workspace}/workspaces/hub_access, and the two lists onGET .../roles. Forks and renames copy the workspace's list, and it is ahub_accesskey of the settings document (settings.yaml, managed only when stated).The rule (
check_can_name_runnables)code, a Hub script is allowed when the Hub knows the version, the integration the Hub reports (never the path's text) is listed atwrite, or atreadand the script is read-only, and the script is approved now and that version was ever approved. Hub flows still needcode; preset handlers stay exempt.code, a Hub flow is refused before the Hub is asked anything. A lookup that falls back to the public Hub makes a second request, more than 100 ids go in chunks, and creating several HTTP routes at once still checks them one route at a time, before its transaction.Hub lookup (
hub_script_meta)PRIVATE_HUB_MIN_VERSION. Unknown versions are not cached.X-uidit sends is the license id, else the instance uid if some other read has put it in memory, else none.Settings
GET /integrations/hub/list). Withdisable_hubset, or the Hub unreachable, only the integrations already listed are shown, and they can still be changed.Docs: the list and its refusal reasons are in
docs/workspace-roles.md;docs/operator-write-rights.mdanddocs/operator-builder-rights.mdfollow.Out of scope: the flow, app and schedule pickers and the AI chat (MCP instructions included) still follow
codealone, so the UI offers less than the server allows until a follow-up PR. On a run by path, the arguments are parsed before the rule runs, and parsing them reads the Hub script, so an id the Hub does not know can answer with that read's error instead of the rule's reason; this is already so on main. Hub scripts stay cached on disk by version number alone, as on main: an instance switched to another private Hub that numbers its scripts alike keeps running the old Hub's copies, while the rule reads the new Hub, until an admin clears the cache.Follow-ups
Proposed telemetry (not wired)
Feature
hub_script, each pair to be registered inFEATURE_USAGE_KINDS:grant, keyreadorwrite: which level admins allow.granted_name, key<integration>:<level>: which integrations roles without code use.granted_refused, key the reason (a closed list): why they are refused.granted_namesends an integration name, which on a private Hub can be the instance's own, so it should be limited to public integrations or dropped.Screenshots
The workspace's section following the instance's list (Gmail at Read), with an unsaved switch:
The workspace's own list:
A selection with its floating bar:
The Changed view after a bulk Write, saved levels struck through:
The instance settings' section:
Test plan
Automated:
nullback to the instance's. The license lock: the instance list cannot change but can be cleared, and keeps applying.hub_named_path.rs, with a stub Hub: a granted run over HTTP; each refusal reason, each approval flag failing on its own; no Hub call with nothing allowed.hub_composed_step.rs: with the only connection of a pool held, as a save's transaction holds it, the check of two granted steps passes with one Hub request, and one with a step that can write is refused, naming it. (A whole flow save on one connection cannot pass on an EE build: queuing its dependency job takes a second connection, on main too.)On a running instance, against a private Hub built from windmillhub main with #244, as an operator, with
slack: read:gmail: readtoo, an older approved version of a read-only script is accepted while a later version is the approved one, and a version never approved is refused. The Hub ran on its own test database, filled with test scripts.operator_settingswrite leaves it; a fork gets it; the settings document reads, applies and clears it.null), a reload keeping what was saved, the Hub unreachable, and an instance edit enabling the page's review. Also at phone width and in dark mode.After the rebase on main that took in the merged Hub: the Hub integration tests (
hub_named_path,hub_composed_step) pass, and the running-instance steps above ran against the merged Hub.After the latest rebase on main, retested by hand from a browser:
🤖 Generated with Claude Code