Skip to content

Commit 657f11d

Browse files
committed
docs(webapp): say which UAT flow the project-wide answer is preserved for
1 parent 1759618 commit 657f11d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/webapp/app/services/userActorEnvironment.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export type UserActorEnvironmentScope =
8989
* Throws a 403 Response when a claim can't be honoured: a claim outside the target project, or a
9090
* request filter that names anything else. A conflicting filter is refused rather than overridden,
9191
* so a caller never gets another environment's shape of answer under its own filter. A token with
92-
* no claim keeps the project-wide answer, as the public PAT exchange's MCP and CLI callers expect —
93-
* except a dashboard-agent token, which always carries one, so its absence is a bug.
92+
* no claim keeps the project-wide answer — narrowing it would break the public PAT exchange, which
93+
* mints claimless tokens. A dashboard-agent token always carries one, so its absence is a bug.
9494
*/
9595
export async function resolveUserActorEnvironmentScope(
9696
userActor: UserActorClaims | undefined,

apps/webapp/test/userActorProjectWideScope.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ postgresTest(
286286
const seeded = await seedProject(prisma);
287287
ctx.patUserId = seeded.user.id;
288288

289-
// The public PAT exchange used by MCP and the CLI may issue an environment-agnostic token.
290-
// Narrowing it would be a breaking change, so it reads the whole project as it always has.
289+
// The public PAT exchange mints claimless tokens, so narrowing one would be a breaking
290+
// change: it reads the whole project as it always has.
291291
const environments = await call(environmentsLoader, {
292292
projectRef: seeded.project.externalRef,
293293
token: await agentToken(seeded.user.id, undefined, "mcp"),

0 commit comments

Comments
 (0)