Skip to content

Re-annotate plugin-approvals + plugin-reports onto the full ExecutionContext and delete the now-redundant casts (services half of #7070) #7135

Description

@os-zhuang

Services-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 services lane so the casts the narrow type forced become deletable.

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

file SharingExecutionContext refs
packages/plugins/plugin-approvals/src/approval-service.ts 27
packages/plugins/plugin-reports/src/report-service.ts 14
packages/plugins/plugin-approvals/src/approval-node.ts 2

Casts that become deletable, all re-verified live:

  • approval-service.ts:661const posture = (context as any).posture; feeding isOverrideActor(); the doc comment above it already names the derived posture (ADR-0095) as the intended read, and the contract now declares the field. This is the load-bearing one: an unchecked cast on an enforcement input.
  • approval-service.ts:2773, 2813, 3259SYSTEM_CTX as unknown as SharingExecutionContext
  • approval-node.ts:174} as unknown as SharingExecutionContext);

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: identity half. 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