Skip to content

share-link 契约:enforcement 路径改收完整 ExecutionContext,窄的 ShareLinkExecutionContext 只服务路由 401 —— #6206 裁决 A 案的契约半边 #6430

Closed

Description

@baozhoutao

Part of #6206(维护者 2026-08-07 裁决 A 案,见 #6206 comment 5219847367)

要做什么

packages/spec/src/contracts/share-link-service.ts(:100-112 的 ShareLinkExecutionContext,仅五字段)按裁决调整:share-link 的可见性校验(enforcement)路径必须收完整的 resolveAuthzContext 信封(含 accessible_org_ids、org_user_ids、systemPermissions、posture、tabPermissions),窄类型可保留但只准服务路由自身的 401 判断,不得再进任何 enforcement 路径——契约形状要让这条边界可见(如可见性校验的签名改收 ExecutionContext,并在 TSDoc 写明窄类型的边界)。

依据

排序(contract-first)

本卡先落;plugin-sharing 消费半边(sharing-plugin.ts contextFromRequest / share-link-service.ts 喂 engine.find 处)留 identity 车道,已挂 Blocked-by: 指向本卡。消费半边的 before-red 证据将同时兑现分诊留下的 repro 义务(group 姿态 403 实测,修后转 200)。

落点 packages/spec ⇒ 归 spec 座位;本卡由 identity 车道 PM 按跨座位转移协议代立(session_01JwwiU9bjhwy2SWj13ho8uv),domain:* 留分诊补。

Activity

  1. os-zhuang commented on Aug 7, 2026

    @os-zhuang
    Contributor

    Triage — routing label added: domain:spec (blind-spot A: this card sat in pm:queue with no domain:*, i.e. queued but unroutable — no lane could see it as theirs.)

    spec, not spec-surface. The change is to the shape of a contract, not to the prose describing one: ShareLinkExecutionContext at packages/spec/src/contracts/share-link-service.ts:100 gets replaced by the full ExecutionContext envelope on the enforcement path, and the narrow type's remaining legality is narrowed to route-level 401. A caller that compiles today stops compiling (or stops being accepted) after it, so the accept face moves ⇒ domain:spec. The split criterion inside packages/spec is exactly this: only a change where every input legal before stays legal byte-for-byte afterwards is spec-surface — a TSDoc note about the boundary rides along with this card rather than making it a text-face card.

    Stale-premise check against origin/main (fetched, 26b72e0): ShareLinkExecutionContext is still the five-field interface at :100 (userId / tenantId / isSystem / positions / permissions) and is still the parameter type of createLink (:123), revokeLink (:126) and listLinks (:129). Ruling anchor #6206 (comment 5219847367) intact; nothing has landed on this file since.

    Ordering is already correct, no pm:blocked needed here. This is the head of the chain — the plugin-sharing consumer half sits in the identity lane carrying Blocked-by: pointed at this card, which is the contract-first order the protocol asks for. Filed by the identity lane PM via the cross-seat transfer protocol; packages/spec has one owner regardless of who needs it, so the claim belongs to the domain:spec seat (#6017).

    On target:v17: kept, and independently re-checked rather than inherited — criterion ① holds (in group posture, share-link creation returns a blanket 403 today, a shipped-surface availability failure a user hits). One process note, no action needed on this card: target:* is produced by the triage seat alone, the same single-producer rule as domain:*; the label arrived here from the filing lane. It is correct, so it stays — flagging only so the producer boundary does not erode by precedent.

    Duplicate search across all three repos (ShareLinkExecutionContext, share-link enforcement envelope, resolveAuthzContext trimming): parent #6206 and the two prior assemblies it names (#6071 / #5997) — this is the third instance of the same shape, which is the ruling's own rationale, not a duplicate.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions