Skip to content

Keep ambiguous cross-app routing on the default Bot - #920

Open
rudycelekli wants to merge 1 commit into
CopilotKit:mainfrom
rudycelekli:fix/routing-ambiguous-reach-20261030
Open

rudycelekli wants to merge 1 commit into
CopilotKit:mainfrom
rudycelekli:fix/routing-ambiguous-reach-20261030

Conversation

@rudycelekli

Copy link
Copy Markdown

What this changes

When an untagged message names Slack and Google Drive, and different Bots uniquely hold those apps, an uncertain router currently chooses whichever app appears first in the roster. That pins the conversation to one Bot without resolving the competing matches.

The fallback now keeps the default Bot when unique app matches point to different Bots. A single Bot uniquely holding both apps still wins, and a confident model decision remains unchanged. The regression exercises both roster orders and the single-holder control.

Where it runs

  • New state that outlives a request? None. The candidate exists only while resolving one routing decision.
  • What happens on the second replica? Given the same roster and model outcome, it makes the same fallback decision; no process-local state is consulted.
  • Anything serialised? No new writes or coordination.
  • Anything fanned out to a browser? No new fan-out; the existing routing response is unchanged in shape.
  • New listener, port, or schedule? None.

Boundary and audit

  • Every acting call still uses the existing gateway. This change chooses a Bot from the existing roster and grants no capability.
  • No new refusal/failure path. The existing fallback reason and undecided cause are preserved.
  • No new client-supplied trust.

Changelog

  • Added an Unreleased entry and documented fallback ambiguity in the architecture guide.

Proof

Base: 743649efc3f21d7bf0badbe6af2bcd5daedd97ce. Tested head: d428f669f10e21700b6d5eb1fb14e90c9cc59cfe.

  • New routing regressions with unchanged production source: 28 passed, 1 failed (slack-bot selected instead of the default).
  • Fixed routing suite using the repository's root preloads: 29 passed, 0 failed.
  • bun run format:check, bun run lint, bun run typecheck, bun run build, and git diff --check: passed using pinned Bun 1.4.3.
  • bun run test:ci: not green locally: 11,017 passed, 210 skipped, 2 failed across 886 files. The failures were the Recorder service-worker timing test and the routine-sweep concurrency test. Both failed test files and their production code are unchanged by this PR. Each case passed in isolation on both unchanged main and this head, with fresh dedicated test databases. Full-run/order causality remains unresolved; those targeted passes do not replace a green full-suite run.
  • Local database was an owned disposable PostgreSQL 15 cluster with pgvector; upstream CI uses PostgreSQL 17. No application database or external vendor credentials were used.

AI assistance: this change was implemented and locally validated with OpenAI Codex, then independently reviewed against the exact commit. Maintainer approval and hosted CI remain required.

When separate named apps have different unique Bot holders, do not let roster order choose which Bot owns the conversation. Preserve a single unique holder and confident model decisions.

AI assistance: implemented and locally validated with OpenAI Codex; maintainer review remains required.

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.

1 participant