Skip to content

Guardrails sweep a pattern's stored matches and hold the org's extraction rules; Settings lists memory webhooks - #371

Merged
zlareb1 merged 18 commits into
mainfrom
feat/dashboard-guardrails-settings
Nov 8, 2026
Merged

zlareb1 merged 18 commits into
mainfrom
feat/dashboard-guardrails-settings

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • New Feature

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Guardrails can delete the stored memories a pattern already matches, and an org admin sets the org's and a namespace's extraction rules and switches the org's model calls off or on there; Settings → Memory lists, adds and removes the namespace's memory webhooks and shows their deliveries.

Why

blacklist.sweep, extraction_policy.get/set/clear, org.model_calls, org.set_model_calls and webhook.list/register/remove/deliveries are configuration a person sets; each was callable only over HTTP or the SDKs, and server/operations/dashboard.py listed them as pending a dashboard control.

Scope and risk

  • Guardrails (and the same pattern list in Settings → Memory): each pattern row's menu has Delete matches (blacklist.sweep), offered by the handler's rule: a namespace pattern to a writer of the namespace, an org or global one to an org admin claim (it sweeps the whole org). The confirmation says where it deletes and that the memories can be restored for 14 days from Recently deleted (in each namespace they were in, for a wider pattern); the item says it is deleting while the sweep runs, and the answer counts what was deleted, says nothing matched, says when more remain, or says the sweep failed.
  • Guardrails, for an org admin claim (the ops are ORG_ADMIN): Model calls for the org, switched off only after a confirmation that says search and embedding writes are refused while off, with an optional reason (up to the server's 500 characters) entered above the switch; under a platform admin's lock an org admin cannot switch calls back on, and a platform admin can, as server/identity/app/model_calls.py decides; Extraction rules for the org and the namespace's own additions, each field named by its scope, saved or removed (removal asks first), capped at the server's 4,096 characters; each panel is keyed by the org or namespace it reads, so a switch mounts a fresh one and a late answer, draft or busy save never reaches another scope.
  • Settings → Memory, for a namespace admin (the webhook ops are ADMIN): Webhooks, each with its URL, events and secret reference (and a note when the server lacks that secret), added for the events left checked (the dialog names the org's secret prefix, LOOM_WEBHOOK_SECRET_<org>__, encoded as the server encodes it), removed from the row's menu after a confirmation (a remove that finds nothing says so), and its Deliveries in a dialog: the newest 50 of the last three days, each failure's reason as text beside its badge (the worker's reason when it gave one, else the receiver's last HTTP status; none once delivered), pending ones in a neutral badge. A namespace switch does not show the previous namespace's list; every list shows its loading and error states.
  • The new API clients (frontend/src/api/guardrails.ts, frontend/src/api/webhooks.ts) are imported directly, not through api.ts; npm run budget passes (index chunk 119.9 kB of 120 kB).
  • Docs: the dashboard page and the feature pages for refusal, extraction policy, webhooks and the model-call switch name the new controls.
  • blacklist.sweep is hidden from MCP and has no SDK wrapper; its census reach is now dashboard instead of http_only, and test_op_reach_census.py says so.
  • No server change; the ten ops leave DASHBOARD_PENDING, and the reach manifest is regenerated.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: revert; nothing is stored.

Tests

  • vitest: Blacklist.sweep.test.tsx (a writer sweeps a namespace pattern and not an org one; an org admin sweeps an org pattern; a failed sweep, one that matched nothing and one with more left; a declined confirmation; global patterns; an org admin's sweep of an org pattern across the org; the org's guardrails shown to an org admin claim only), OrgGuardrails.test.tsx (save the namespace's rules and remove the org's, switch model calls off only after a confirmation, the platform admin's lock for an org admin and for a platform admin, a failed read with Retry, a declined rules removal, a save that lands after a namespace switch), WebhooksSection.test.tsx (list with a missing secret, add for the checked events, remove after a confirmation, deliveries, failed list and deliveries reads with Retry, the secret prefix, a namespace switch, a refused registration, a declined removal, a removal that finds nothing, a failure's HTTP status or transport error and none once delivered), Setup.blacklist.test.tsx (Webhooks hidden from a viewer, shown to an admin). tsc -b, the build and npm run budget clean; biome format and lint clean.
  • tests/unit/test_op_surfaces.py, tests/unit/test_op_reach_census.py, op_reach_census --check.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. I checked each control's role gate against its op's declaration and handler.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Generated files are regenerated in this PR, not by hand (the reach manifest).
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

@zlareb1
zlareb1 force-pushed the feat/dashboard-guardrails-settings branch 3 times, most recently from 0b68046 to b86da34 Compare November 8, 2026 00:50
zlareb1 and others added 18 commits November 8, 2026 01:25
…tion rules; Settings lists memory webhooks

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… deliveries show their states; the webhook client is its own module

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…failed, and the guardrail panels name their fields and guard a late save

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ere read for, the reason field has the server's cap, and the missing confirmations and races are tested

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…eason is plain text

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ason first, the webhooks section is keyed by namespace, and sweep and rules toasts name their scope

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…-call toasts name the org, and the scoped toasts and the keyed section are tested

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…d and holds while it runs, and the remaining toasts and the lock case are tested

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… on its keyed mount

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…h mounts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 force-pushed the feat/dashboard-guardrails-settings branch from b86da34 to 3a3d7e0 Compare November 8, 2026 01:31
@zlareb1
zlareb1 merged commit e00fd4f into main Nov 8, 2026
37 of 38 checks passed
@zlareb1
zlareb1 deleted the feat/dashboard-guardrails-settings branch November 8, 2026 02:05
@zlareb1 zlareb1 mentioned this pull request Nov 12, 2026
3 tasks done
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