Skip to content

Revert "feat(listen): respect backend kill-switch in ax listen mention gate (#29)"#30

Merged
madtank merged 1 commit intomainfrom
orion/revert-cli-killswitch-gate
Apr 9, 2026
Merged

Revert "feat(listen): respect backend kill-switch in ax listen mention gate (#29)"#30
madtank merged 1 commit intomainfrom
orion/revert-cli-killswitch-gate

Conversation

@madtank
Copy link
Copy Markdown
Member

@madtank madtank commented Apr 9, 2026

Reverts #29.

Why

Kill switch / disable is a universal platform behavior. Enforcement belongs at the backend boundary, not per-client. Madtank called this out 2026-04-09: "the fix for some of this landed in CLI repository, but that doesn't make sense because this needs to be a universal pause so this needs to be on the API".

PR #29 added client-side enforcement in `ax listen`. That was the wrong shape. Every client reimplementing the check is another escape hatch, and it teaches exactly the pattern the team is trying to un-learn.

What replaces it

Backend PR ax-backend @ `d6fb390` adds the filter in `messages_notifications.broadcast_sse()`, right after the mentions list is finalized and before any publisher runs. It resolves mention handles to in-space Agent records, batch-fetches their control states via `AgentControlService`, and drops disabled agents from both the `mentions` list and the `explicit_mentions` snapshot. Every downstream publisher — SSE `message` event, SSE `mention` event, MCP bus mention event, dispatch loop, webhook delivery — now sees the pre-filtered list. Enforcement is consistent across transports, in one place, with no per-client duplication.

Test plan

  • Backend filter ships in ax-backend dev/staging `d6fb390`
  • ax-staging-api rebuilt with the filter (in flight)
  • End-to-end: `PATCH /auth/agents/{ping_bot}/control` disabled=true → `@ping_bot test` → verify no reply, verify `KILL SWITCH FILTER` log line in backend

@madtank madtank merged commit 67941fe into main Apr 9, 2026
4 checks passed
@madtank madtank deleted the orion/revert-cli-killswitch-gate branch April 9, 2026 20:35
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