You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(lint): split OWD_ALIAS_FIX provenance — three retired D4 aliases vs one wrong-layer fix-it (#16975)
* fix(lint): split OWD_ALIAS_FIX provenance — three retired D4 aliases vs one wrong-layer fix-it
`OWD_ALIAS_FIX` labelled all four of its keys `[ADR-0090 D4] Legacy alias →
canonical fix-it mapping`, but D4 names three: "The legacy aliases `read`,
`read_write`, `full` are removed from the zod enum". `public` was never an
accepted `sharingModel` value in any shipped schema, so it has no retirement
behind it and no ADR-0087 conversion or semantic-migration entry could exist
for it — the stored population is zero by construction.
Split the map into `OWD_RETIRED_ALIAS_FIX` (the three D4 aliases) and
`OWD_WRONG_LAYER_FIX` (`public`), keep the union as `OWD_ALIAS_FIX` so every
key still earns the same rule id, path and fix-it, and give the finding's
message one shared provenance clause so it stops telling authors that `public`
is a retired D4 alias.
Also correct the five `packages/cli` serve e2e fixtures that declared
`sharingModel: 'public'` — a value `ObjectSchema` refuses and
`effectiveSharingModel` folds to `private`. They now declare `private`, which
is the posture those apps already had.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
* fix(lint): keep the receiver-coverage guard armed, and add the changeset
The new provenance clause named the sibling keys dotted, and this rule's
receiver-coverage meta-test scans the module's code text for `receiver.key`
reads without being able to tell one inside a message string from a real read
— so `access.default` / `publicSharing.allowedAudiences` presented as
undeclared reads off receivers that do not exist. Name them undotted instead
and record why, rather than excusing them in the guard's PLUMBING set, which
would have disarmed a real check for a spelling choice.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
* style(lint): reflow the intake docblock paragraph
Comment rewrap only, no code change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
`security-owd-alias` no longer tells authors that `sharingModel: 'public'` is a retired ADR-0090 D4 alias. It never was one — no shipped schema ever accepted it — and the map that said so is now split along the two histories it was conflating.
6
+
7
+
`OWD_ALIAS_FIX` carried four keys under one comment, `[ADR-0090 D4] Legacy alias → canonical fix-it mapping`, while D4 names three: "The legacy aliases `read`, `read_write`, `full` are **removed from the zod enum**". Those three have a retirement behind them — the `owd-legacy-read-aliases` ADR-0087 stored-row conversion for the two `read*` spellings, the `13.owd-full-alias-removed` semantic entry for `full`. `public` has neither, and correctly so: a conversion rewrites a spelling some shipped schema once took, and this one never was taken, so its stored population is zero by construction. The missing conversion was the mislabel's shadow, not a gap.
8
+
9
+
-**Two maps, one union.**`OWD_RETIRED_ALIAS_FIX` holds the three D4 aliases; `OWD_WRONG_LAYER_FIX` holds `public`; `OWD_ALIAS_FIX` stays as their union, so every key still earns the same rule id, the same path and the same fix-it. No accept set moves and no value starts or stops being reported.
10
+
-**The `public` fix-it is KEPT.** It catches a real authoring mistake: three neighbouring keys on the same `ObjectSchema` take `'public'` legally — `access.default` (`z.enum(['public', 'private'])`, ADR-0066) and `publicSharing.allowedAudiences` (`z.enum(['public', 'link_only', 'signed_in', 'email'])`) — and off-schema so does the sharing runtime's own internal vocabulary, `effectiveSharingModel(): 'private' | 'read' | 'public'`. `sharingModel` is the one neighbour that refuses it, and it fails CLOSED to `private` with no notice on the read path, so this fix-it is the author's only signal.
11
+
-**The message says which group it is in.** One shared clause, used by both the `sharingModel` and the `externalSharingModel` branch. A retired alias still reads `is a retired alias (ADR-0090 D4)`; `public` now reads that it is not an OWD value and never was, and names the neighbouring keys that do take it. The fix-it text, severity, rule id and path are byte-identical either way.
12
+
13
+
Why the wording mattered enough to change: a diagnostic that credits `public` to D4 sends its reader looking for the conversion and the semantic entry that would exist if the acceptance had happened, and finding them absent reads as a data-fidelity defect in the conversion registry. It is not one.
0 commit comments