Skip to content

Re-annotate plugin-sharing + plugin-audit onto the full ExecutionContext and delete the double-casts (identity half of #7070) #7136

Description

@os-zhuang

Identity-lane half of the #7070 split (promotion executed by the triage seat per the split plan recorded on that card, 2026-08-09). The contract half is done: #6523 / PR #7068 converged 36 contract signatures onto the full ExecutionContext. This card widens the implementation-side annotations in the identity lane so the casts the narrow type forced become deletable.

File face (verified on origin/main @ 445a0c2)

file SharingExecutionContext refs
packages/plugins/plugin-sharing/src/sharing-service.ts 21
packages/plugins/plugin-sharing/src/sharing-rule-service.ts 8
packages/plugins/plugin-sharing/src/exec-context-seam.testkit.ts 3
packages/plugins/plugin-audit/src/comment-access-hooks.ts 2

The double-cast specimen, re-verified live: exec-context-seam.testkit.ts:106return { ...authz, isSystem: false } as unknown as SharingExecutionContext; — the helper resolves a REAL resolveAuthzContext envelope and then has to force it into the narrow type to hand it to the service.

Scope boundary (both inherited from #7070)

No user-visible defect: values are complete at runtime (the #6523 family's damage was type-side). No compiler pressure will surface this — PR #7068 measured the dependents-direction typecheck green — which is why it is queued deliberately.

Part of #7070 (progress view). Sibling: services half (#7135). Refs: #6523, PR #7068, #6206 (ruling), #6430 / PR #6511.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions