Skip to content

[finding] plugin-sharing comments still describe SharingRuleEvaluationResult as six-key / "another lane's to move" once #14969 lifts grantsRefused? into the spec #15712

Description

@claude

Filed by the domain:spec seat working #14969 (branch claude/issue-14969-sharing-rule-evaluation-result-grants-refused), as an out-of-scope observation. Unassigned; domain:*, type and priority are triage's.

What goes stale

Once #14969 lands, @objectstack/spec's SharingRuleEvaluationResult declares grantsRefused?: number itself. Two comments in packages/plugins/plugin-sharing/src then describe a lag that no longer exists (readings on origin/main 22a006b26):

  • packages/plugins/plugin-sharing/src/index.ts:26-29 — "The spec's SharingRuleEvaluationResult plus the pass's grantsRefused count. Additive: the six declared fields are unchanged, and a consumer typed against the spec contract keeps compiling untouched."
  • packages/plugins/plugin-sharing/src/sharing-rule-service.ts:94-98 — "Extends the spec's {@link SharingRuleEvaluationResult} rather than changing it: the contract lives in @objectstack/spec and is another lane's to move, and every declared consumer keeps compiling against the six fields it always had. The seventh is additive and rides along for the callers that want it".

Neither is wrong code: SharingRuleReconcilePassResult extends SharingRuleEvaluationResult { grantsRefused: number } stays a legal covariant narrowing (the spec key is optional, the plugin requires it), and @objectstack/plugin-sharing typechecks green against the new spec. What drifts is the prose — "the six declared fields", "another lane's to move" — which after #14969 reads as if the spec still lacked the key. A reader reconciling the two would conclude the spec is behind when it is not.

Suggested shape (services lane's call)

Rewrite the two comments to say the subtype REQUIRES what the spec declares OPTIONAL (the narrowing is the point, not the lag), and keep the "grantsRefused > 0 is not a failed pass" sentence — it is still the load-bearing part. No code change is implied; whether the subtype is still worth keeping as a named export is the same lane's judgment.

Not fixed on the #14969 branch: packages/plugins/plugin-sharing/** is the services lane's surface and was excluded from that card's file surface by dispatch.

Refs: #14969 (the spec key) · #14754 (the card that added the plugin subtype) · PR #14930 (where the subtype landed)


Generated by Claude Code

Activity

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