docs(plugin-security): restate the upsertEnvPermissionSet JSDoc for ADR-0094 D5-R (#7082) - #7346
Conversation
…DR-0094 D5-R (#7082) PR #6962 retired the 2026-07-14 env-overlay direction and fixed this file's header; the function-level JSDoc of `upsertEnvPermissionSet` kept the same two claims D5-R retired -- "an env overlay is the platform's standard customization of a packaged definition" and "deleting the overlay resets the row to the shipped declaration". #6483 / PR #6608 rolled `permission` back to `allowOrgOverride: false` (the first is 403 NOT_OVERRIDABLE) and #6960 measures the delete path refusing to lift even a legacy overlay (the second). Prose only, no behaviour change. Three neighbouring copies in the same package are corrected with it so the package no longer states the direction in two voices. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BM1tNf5U3nEbHKR4fo5qVQ
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 12 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also reference the affected code. These are read-only:
|
Verification — real outputAll run in a dedicated worktree off The gate that is registered for this fileWhat that gate does check, from its own header: for each entry under What it does not check — also from its own header, verbatim: "It does NOT verify the code still obeys the ADR; no static check can. It guarantees the next author is TOLD which decision they are standing on." It is a presence check. Nothing in it relates what this file says about ADR-0094 to what ADR-0094 currently decides, which is the gap #7082 named. Other gates that can bitePackage typecheck / build / lint / testThe changeset bump is — i.e. the stale text was shipping to consumers' editors, and the corrected text now ships instead. Reverse verification — prediction, then measurementPredicted, before running (also stated in the PR body): Mutation — the fix taken out with Measured under the mutation: Green, as predicted. The only thing that moved is a count — The tree was restored with Out-of-scope finding filedFiled #7351 ( Generated by Claude Code |
Fixes #7082
Prose only. No behaviour change, no test-logic change, no gate added.
The anchor, re-verified at this branch point
The card measured the stale block at
:332and triage re-confirmed it onb88f5e8. My branch point isorigin/main@f3f855ac154f202fa9f1497abd3e0dff60436e1a, where the block has shifted to:323-338but is otherwise byte-identical. The card's:332still lands inside it, on thedirection confirmed 2026-07-14line. Quoted verbatim at that SHA:The header copy at
:30already reads "The 2026-07-14 direction confirmation that used to sit here… is RETIRED", so PR #6962 fixed exactly one of the two copies, as filed.The two false claims, and what replaced each
Claim 1 — "an env-scope overlay is the platform's standard customization of a packaged definition (ADR-0005; direction confirmed 2026-07-14…)".
Replaced by the bullet beginning "no new overlay of a packaged set can be minted": a metadata write against a code-declared (artifact-backed) set is refused by the producer with 403
NOT_OVERRIDABLE, so for those names the body reaching this function is the declared one and the projected facets are the shipped declaration; the supported channel is ADR-0086's (edit the package, re-publish); what survives is the neighbouringallowRuntimeCreatetier, which edits the single storedsys_metadatadefinition in place, with no layering and nothing to reset to.True against:
packages/spec/src/kernel/metadata-plugin.zod.ts:923, which is now{ type: 'permission', … supportsOverlay: true, allowOrgOverride: false, allowRuntimeCreate: true, … }(#6483 / PR #6608); and ADR-0094 D5-R, whose "What survives, stated narrowly so it is not mistaken for a re-route" paragraph is the source of the surviving-neighbour wording — including its explicit "nodelete = reset to the shipped declaration".Claim 2 — "deleting the overlay resets the row to the shipped declaration (the layered read reveals the baseline again)".
Replaced by the bullet beginning "delete = reset must NOT be read back into that", which carries #6960's measurement as the statement of record: on an environment-scoped kernel
deleteMetaItemthrowsNOT_OVERRIDABLE/ 403 for an artifact-backed target of a non-overridable type before it probes for the row, and a kernel with noenvironmentIdrefuses the same write asoverride-artifactintent — leavingOS_METADATA_WRITABLE=permissionas the only documented removal. With no overlay to lift (the normal case) the delete is a no-op success and the row keeps projecting the declaration.True against: #6960 (cited by number in the comment), and ADR-0094 D5-R's own carry-over paragraph plus its "Negative / behavior changes" bullet, both of which say the same thing.
The history is kept rather than deleted — the block names the retired direction, quotes it, and says where the retirement is recorded (ADR-0094 D5-R, #6609 ruling A, #6858) — matching the
:30header's voice so the two copies read as one author.The third-copy sweep
grepfor the direction's phrasings (2026-07-14,standard customization,standard ADR-0005,delete = reset,resets the row,reset target,refuse-the-env-door) across the repo found more copies. Handled by scope:Fixed here (same file / same package — 4 more sites):
permission-set-projection.ts:290—readDeclaredBody's "Used as the reset target when an env overlay is deleted off a declared set" is claim 2 in miniature. Now: it is the body for a declared set with no overlay at all, and the reset target when an overlay is lifted — which since D5-R means a legacy pre-ADR-0005:57 白名单表与注册表的分歧不止 flow:page/app/action/permission/tool/skill 六类 ADR 写 ❌ 而 allowOrgOverride:true,另有 dataset/book/position 三类表里没有却默认成了 true #6483 row removed through the operator hatch, not a data-door delete.security-plugin.ts:891— "…translates them into env-scope OVERLAY operations (customize / reset via the standard ADR-0005 layering) — the boot re-seed can no longer revert an admin's change, because the change lives in the overlay". The last clause is false for artifact-backed sets since the change never lands. Now states that the middleware translates and ADR-0005 decides.security-plugin.ts:3192— opened[ADR-0094, direction confirmed 2026-07-14]and cited the retired direction as this gate's reason for lettingupdate/deletethrough. Now[ADR-0094 D5-R], with the refusal named as the producer's.permission-set-projection.test.ts:336,security-plugin.test.ts:1989). Comments and one test title only — no assertion changed.Filed, not fixed (outside this package): see the finding linked in the thread below. It covers
packages/qa/dogfood/test/two-doors-permission.dogfood.test.ts(header 块2 states both retired halves verbatim while its own body at:75already asserts the refusal — literally #7082's header-vs-body split one file over) anddocs/adr/0094-…md:109.Verification
This is prose, so it is verified as prose. Commands and real output are in the thread comment below (
check:adr-anchors,check:nul-bytes,check:empty-changeset, and the package's typecheck / lint / build / test).Reverse verification, and its honest result. Prediction, written before running:
check:adr-anchorscannot see this. It is a presence check by its own documentation — the file exists, each registered ADR id names a record underdocs/adr/, and each id still appears somewhere in the file. Nothing relates what the file says about an ADR to what the ADR currently decides. Measured: with the JSDoc mutated back to the retired direction verbatim, the gate stays green. That is the result, reported as-is; it is the measured reason option B exists, and it is not a failure of the gate, which was never built to catch it. No red/green table is manufactured for a check that has no opinion here.Option B (a #6628-idiom currency pin) is deliberately not built — it was not dispatched, and it is a new gate surface.
Generated by Claude Code