Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(paths): reserve the chat channel bind routes as workspace slugs (#10223)
pseudoyucdf05edc0494
diff --git a/packages/core/paths/reserved-slugs.ts b/packages/core/paths/reserved-slugs.tsindex edcee79a7b..823296e62e 100644--- a/packages/core/paths/reserved-slugs.ts+++ b/packages/core/paths/reserved-slugs.ts@@ -110,6 +110,16 @@ export const RESERVED_SLUGS: ReadonlySet<string> = new Set([// DingTalk identity. Reserve the prefix so a workspace slug cannot shadow it."dingtalk",+ // Chat channel account-bind routes+ // `/lark/bind`, `/slack/bind`, `/telegram/bind`, and `/wecom/bind` are global+ // pre-workspace routes where a member links their chat identity, the same as+ // `/dingtalk/bind`. Reserve the prefixes so a workspace slug cannot shadow+ // them.+ "lark",+ "slack",+ "telegram",+ "wecom",+// Backend ops / observability// `/health`, `/readyz`, `/healthz`, and `/ws` exist on the backend host;// reserving them on the workspace slug space prevents naming confusion if/whendiff --git a/packages/core/paths/workspace-slugs.test.ts b/packages/core/paths/workspace-slugs.test.tsindex 5e58df2e53..6cb6a0195b 100644--- a/packages/core/paths/workspace-slugs.test.ts+++ b/packages/core/paths/workspace-slugs.test.ts@@ -15,7 +15,7 @@ describe("workspaceSlugForPath", () => {expect(isReservedSlug("dingtalk")).toBe(true);});- it.each(["/dingtalk/bind", "/auth/callback", "/workspaces/new", "/invite/token", "/api/workspaces", "/uploads/file", "/login", "/"])("keeps %s global even with a matching membership", (path) => {+ it.each(["/dingtalk/bind", "/lark/bind", "/slack/bind", "/telegram/bind", "/wecom/bind", "/auth/callback", "/workspaces/new", "/invite/token", "/api/workspaces", "/uploads/file", "/login", "/"])("keeps %s global even with a matching membership", (path) => {setWorkspaceSlugLookup(() => true);expect(workspaceSlugForPath(path)).toBeNull();});diff --git a/server/internal/handler/reserved_slugs.json b/server/internal/handler/reserved_slugs.jsonindex 2f44f97f86..f80db5476d 100644--- a/server/internal/handler/reserved_slugs.json+++ b/server/internal/handler/reserved_slugs.json@@ -105,6 +105,16 @@"dingtalk"]},+ {+ "label": "Chat channel account-bind routes",+ "description": "`/lark/bind`, `/slack/bind`, `/telegram/bind`, and `/wecom/bind` are global pre-workspace routes where a member links their chat identity, the same as `/dingtalk/bind`. Reserve the prefixes so a workspace slug cannot shadow them.",+ "slugs": [+ "lark",+ "slack",+ "telegram",+ "wecom"+ ]+ },{"label": "Backend ops / observability","description": "`/health`, `/readyz`, `/healthz`, and `/ws` exist on the backend host; reserving them on the workspace slug space prevents naming confusion if/when these paths are ever proxied through the web origin.",