Skip to content

Commit 28f2e04

Browse files
baozhoutaoclaude
andauthored
docs(plugin-auth): degraded 注释改为与实现一致 —— 两种有墙 posture 都会降级 (#5360) (#5804)
`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」),一并按同一事实收敛。 纯注释改动,零行为改动,无新增测试面。 Claude-Session: https://claude.ai/code/session_01JwwiU9bjhwy2SWj13ho8uv Co-authored-by: Claude <noreply@anthropic.com>
1 parent a3a884d commit 28f2e04

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

packages/plugins/plugin-auth/src/tenancy-service.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ export type { TenancyPosture };
5353
export interface TenancyService {
5454
/**
5555
* The posture actually IN FORCE. Equals {@link requestedPosture} whenever the
56-
* request can be enforced; an `isolated` request that cannot be (the
57-
* enterprise package is absent) resolves to `single` the deployment behaves
58-
* single-org-like because nothing isolates its data and sets
56+
* request can be enforced; a walled request that cannot be — `group` or
57+
* `isolated` alike (ADR-0105 D12) — resolves to `single`, because the
58+
* deployment behaves single-org-like when nothing isolates its data, and sets
5959
* {@link degraded}.
6060
*/
6161
readonly posture: TenancyPosture;
@@ -71,8 +71,12 @@ export interface TenancyService {
7171
* ADR-0093 D5); when it boots anyway, this flag brands the deployment
7272
* everywhere an operator looks (`/auth/config`, Setup dashboard).
7373
*
74-
* Only reachable for `isolated` — `group` is enforced by the open engine, so
75-
* it has no missing dependency to degrade against.
74+
* Reachable for BOTH walled postures. `group` probes the enterprise
75+
* `org-scoping` runtime exactly like `isolated` does (ADR-0105 D12) — the
76+
* wall's CODE is open, but ACTIVATING a multi-organization posture is an
77+
* entitlement. So either posture degrades when that runtime is absent, and
78+
* also when it is installed but declares (`supportedPostures`) that it does
79+
* not entitle the posture requested.
7680
*/
7781
readonly degraded: boolean;
7882
/**

0 commit comments

Comments
 (0)