From 18daa6bc719df8cde4f9622b9e2399c0e2a15250 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Aug 2026 05:59:36 +0000 Subject: [PATCH] =?UTF-8?q?docs(plugin-auth):=20`degraded`=20=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E6=94=B9=E4=B8=BA=E4=B8=8E=E5=AE=9E=E7=8E=B0=E4=B8=80?= =?UTF-8?q?=E8=87=B4=20=E2=80=94=E2=80=94=20=E4=B8=A4=E7=A7=8D=E6=9C=89?= =?UTF-8?q?=E5=A2=99=20posture=20=E9=83=BD=E4=BC=9A=E9=99=8D=E7=BA=A7=20(#?= =?UTF-8?q?5360)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `TenancyService.degraded` 的文档注释仍写着「Only reachable for `isolated` —— `group` is enforced by the open engine」,这是 ADR-0105 D12 修正前那一版的 残留,与同文件 120 行后的实现相反:`isolationActive()` 对 `group` 与 `isolated` 一视同仁地探测 `org-scoping`,`degraded` = `postureEnforcesWall(requested) && !isolationActive()`。 改写为按实现逐点表述:两种有墙 posture 都会降级,触发条件有两个 —— 企业版 runtime 缺席,或 runtime 已装但用 `supportedPostures` 声明不授权所请求的 posture。同一 interface 上方 `posture` 的注释有同源的 D12 残留(只举 `isolated`、只提「package absent」),一并按同一事实收敛。 纯注释改动,零行为改动,无新增测试面。 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01JwwiU9bjhwy2SWj13ho8uv --- .../plugins/plugin-auth/src/tenancy-service.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/plugins/plugin-auth/src/tenancy-service.ts b/packages/plugins/plugin-auth/src/tenancy-service.ts index 3579a91ed4..a6bfef8142 100644 --- a/packages/plugins/plugin-auth/src/tenancy-service.ts +++ b/packages/plugins/plugin-auth/src/tenancy-service.ts @@ -53,9 +53,9 @@ export type { TenancyPosture }; export interface TenancyService { /** * The posture actually IN FORCE. Equals {@link requestedPosture} whenever the - * request can be enforced; an `isolated` request that cannot be (the - * enterprise package is absent) resolves to `single` — the deployment behaves - * single-org-like because nothing isolates its data — and sets + * request can be enforced; a walled request that cannot be — `group` or + * `isolated` alike (ADR-0105 D12) — resolves to `single`, because the + * deployment behaves single-org-like when nothing isolates its data, and sets * {@link degraded}. */ readonly posture: TenancyPosture; @@ -71,8 +71,12 @@ export interface TenancyService { * ADR-0093 D5); when it boots anyway, this flag brands the deployment * everywhere an operator looks (`/auth/config`, Setup dashboard). * - * Only reachable for `isolated` — `group` is enforced by the open engine, so - * it has no missing dependency to degrade against. + * Reachable for BOTH walled postures. `group` probes the enterprise + * `org-scoping` runtime exactly like `isolated` does (ADR-0105 D12) — the + * wall's CODE is open, but ACTIVATING a multi-organization posture is an + * entitlement. So either posture degrades when that runtime is absent, and + * also when it is installed but declares (`supportedPostures`) that it does + * not entitle the posture requested. */ readonly degraded: boolean; /**