Skip to content

feat: add operator AI kill switch - #1114

Open
Gojv-byte wants to merge 1 commit into
Nanle-code:masterfrom
Gojv-byte:2026-Platform]-Add-kill-switch-controls-for-experimental-AI-panels
Open

Gojv-byte wants to merge 1 commit into
Nanle-code:masterfrom
Gojv-byte:2026-Platform]-Add-kill-switch-controls-for-experimental-AI-panels

Conversation

@Gojv-byte

Copy link
Copy Markdown
Contributor

Summary

Adds a server-controlled global kill switch for experimental AI panels. Operators can disable or re-enable panels without redeploying. Production uses shared Redis; AI panels fail closed when status is unavailable.

Closes #830

How was this tested?

  • corepack pnpm exec vitest run --config vitest.config.js tests/api/aiKillSwitch.test.js src/lib/__tests__/featureFlagLifecycle.test.ts — 12 tests passed. Covers updating the switch and audit history, invalid input, unauthorized operators, unsupported environments, and unavailable storage.
  • corepack pnpm run build and the bundle-budget check passed.
  • Targeted lint and formatting checks passed.

Merge requirements

A PR is merged only when every box below is true. See
Merge requirements for the full policy.

  • All required CI checks pass on the latest commit (not just an earlier push).
  • No required checks are failing, pending, or skipped — re-run or fix them; do not ask for a merge while any are outstanding.
  • The branch has no merge conflicts with the target branch (rebase or merge master if GitHub shows "This branch has conflicts").
  • Tests were added or updated for the change (primary flow, a boundary case, and a failure case).
  • Docs were updated where behaviour, configuration, or security posture changed.

Security-sensitive changes

  • This PR touches a path covered by .github/CODEOWNERS (wallet, auth, cryptography, CI) and a code owner has been requested for review.
  • I described any change to key handling, signing, session lifetime, or trusted endpoints above.
  • Writes to /api/v1/ai-controls require a server-configured operator token. The token is compared in constant time, held only in browser memory, and never persisted. Production requires shared Redis; requests fail closed if runtime state is unavailable.

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@Gojv-byte is attempting to deploy a commit to the nanle-code's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@Gojv-byte Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

This branch has not been deployed

No deployments
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.

[2026 Platform] Add kill-switch controls for experimental AI panels

1 participant