fix(ai): preserve supported chat domain selectors - #769
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR extracts the MCP website-domain comparison into a shared matcher and applies it to the native chat preflight, preserving case-insensitive selectors and optional HTTP(S) prefixes while retaining exact hostname, port, path, website-ID, and organization-access constraints.
Confidence Score: 5/5The PR appears safe to merge; no actionable regression or authorization weakness was identified. The extracted matcher preserves the downstream resolver’s prior behavior, and the preflight now accepts the same supported case and protocol variants while continuing to require organization-scoped accessibility and consistent explicit website IDs. Important Files Changed
Reviews (1): Last reviewed commit: "fix(ai): align chat preflight with MCP d..." | Re-trigger Greptile |
71405d2 to
af3c06f
Compare
|
The latest updates on your projects. Learn more about Unkey Deploy
|
The shared chat preflight added in #768 rejects authorized domain selectors such as
example.comfor a storedExample.com, or an HTTP(S)-prefixed selector that the downstream MCP resolver accepts. Extract the existing MCP domain comparison into one pure matcher and use it in both places.Case-insensitive matching and optional HTTP(S) prefixes are preserved. Literal
wwwhosts and ports still require matching stored values; no new hostname aliases, path rewriting, whitespace trimming or default-port normalization is introduced. The explicit website-ID constraint and organization-scoped accessible list remain required.Native public ask/stream/trace regressions cover case, protocol prefixes, literal www hosts, matching ports, domain-only and explicit-ID selection, duplicate normalized domains, and rejection of near-miss domains or mismatched accessible IDs before profile/model access. Downstream resolver regressions pin the same accepted and rejected forms.
Rebased once onto staging 51d92fb, which includes the session-organization membership fix. The domain-matcher/test patch is byte-for-byte unchanged by the rebase. Fresh validation at af3c06f: root lint passed; root types 33/33; targeted tests 62/62; normal pre-push tests 27/27 tasks, including AI 874 passed and 21 skipped. Frozen dependencies installed and SDK build restored in the fresh isolated worktree. Follow-up to merged #768; no unmerged dependency.
P2 triage: the old Cursor blanket ban on
unknownconflicts with the current Bun skill's explicit recommendation to useunknownplus schema validation for untrusted inputs and the maintainer's instruction for this task. The unrelated existing API boundary-mock types are unchanged; no broad test cleanup is included.