diff --git a/.changeset/adr-0057-d10-citation-attribution-5202.md b/.changeset/adr-0057-d10-citation-attribution-5202.md new file mode 100644 index 0000000000..e30834a070 --- /dev/null +++ b/.changeset/adr-0057-d10-citation-attribution-5202.md @@ -0,0 +1,25 @@ +--- +--- + +Traceability only — this publishes nothing, declared explicitly with an empty frontmatter +rather than left undeclared. The change is comment text at seven live source sites; no +executable line moves, and `git diff -U0` carries zero non-comment added or removed lines. + +`server enforces, client is courtesy` was cited at those seven sites as a bare +**`ADR-0057 D10`**. The substantive claim is correct and is unchanged here; what was missing +is the **framework qualifier**. In this repository the bare string resolves to +`docs/adr/0057-console-ai-chat-one-conversation-docked.md` — a document about console AI chat +docking, which contains no `D10` at all and is the one a reader greps first. The intended +anchor is the *framework's* ADR-0057, whose D10 decides *"Setup-nav surfacing follows the +capability (ADR-0029 K2); the object stays open"*. + +Each site now carries the disambiguation already shipped by the two authorities in this +repository — `docs/adr/0036-field-conditional-rules.md:91` and +`packages/core/src/evaluator/fieldRules.ts:38` — rather than a third phrasing: +`the framework's ADR-0057 D10 — framework numbering; this repo's own ADR-0057 is an +unrelated document`. + +Three sites are deliberately left byte-untouched, all three already correct: +`packages/data-objectstack/src/appAccessProbe.test.ts:25` (a verbatim quotation of the +objectstack#8013 ruling, and about the capability/nav gate — the one family D10 really does +decide), plus the two authorities above. diff --git a/packages/app-shell/src/views/RecordDetailView.tsx b/packages/app-shell/src/views/RecordDetailView.tsx index 18a21294f1..b2bc01d1dc 100644 --- a/packages/app-shell/src/views/RecordDetailView.tsx +++ b/packages/app-shell/src/views/RecordDetailView.tsx @@ -1056,7 +1056,9 @@ export function RecordDetailView({ dataSource, objects, onEdit, objectNameOverri // a record the user may only read: the form opened, the user retyped a // field, and the server rejected the save with a 403. Ask the explain // engine for the row-level verdict (fail-open; the server stays the - // authority per ADR-0057 D10) and fold it into the same affordance gates. + // authority per the framework's ADR-0057 D10 — framework numbering; this + // repo's own ADR-0057 is an unrelated document) and fold it into the same + // affordance gates. const recordWriteAllowed = useRecordEditable( objectDef?.name, pureRecordId, diff --git a/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx b/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx index cee16dda74..4b204731dc 100644 --- a/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx +++ b/packages/app-shell/src/views/studio-design/PackageOwdOverviewPanel.tsx @@ -85,7 +85,11 @@ export interface PackageOwdOverviewPanelProps { publishNonce?: number; /** Notify the surface so its pending-changes counter refreshes after a save. */ onDraftSaved?: () => void; - /** Courtesy gate: read-only packages render badges only (ADR-0057 D10). */ + /** + * Courtesy gate: read-only packages render badges only (the framework's + * ADR-0057 D10 — framework numbering; this repo's own ADR-0057 is an + * unrelated document). + */ readOnly?: boolean; locale: SupportedLocale; /** Object to scroll to / highlight (deep-link from the permission matrix badge). */ diff --git a/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx b/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx index 643a13bdad..1ef20a4f3b 100644 --- a/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx +++ b/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx @@ -423,11 +423,12 @@ export function StudioDesignSurface({ aiSlot }: StudioDesignSurfaceProps): React const tab = params.tab ?? 'interfaces'; const locale = useMetadataLocale(); - // Courtesy gate (ADR-0057 D10): a read-only code/installed package refuses - // authoring server-side (ADR-0070), so don't let the user build up doomed - // local edits first — disable the authoring affordances up front. Unknown - // writability (fetch failed / still loading) stays ungated; the server gate - // remains the authority either way. + // Courtesy gate (the framework's ADR-0057 D10 — framework numbering; this + // repo's own ADR-0057 is an unrelated document): a read-only code/installed + // package refuses authoring server-side (ADR-0070), so don't let the user + // build up doomed local edits first — disable the authoring affordances up + // front. Unknown writability (fetch failed / still loading) stays ungated; + // the server gate remains the authority either way. const [pkgWritable, setPkgWritable] = React.useState(null); React.useEffect(() => { let cancelled = false; diff --git a/packages/plugin-detail/src/useRecordEditable.test.tsx b/packages/plugin-detail/src/useRecordEditable.test.tsx index 4e93a5ee9e..4aac359588 100644 --- a/packages/plugin-detail/src/useRecordEditable.test.tsx +++ b/packages/plugin-detail/src/useRecordEditable.test.tsx @@ -16,7 +16,9 @@ * the row-level verdict instead. * * Every uncertainty must fail OPEN — a courtesy hint may never be the reason a - * permitted user cannot act. The server is the authority (ADR-0057 D10). + * permitted user cannot act. The server is the authority (the framework's + * ADR-0057 D10 — framework numbering; this repo's own ADR-0057 is an + * unrelated document). */ import * as React from 'react'; import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; diff --git a/packages/plugin-detail/src/useRecordEditable.ts b/packages/plugin-detail/src/useRecordEditable.ts index 830ccb66a8..b3d6ac61c4 100644 --- a/packages/plugin-detail/src/useRecordEditable.ts +++ b/packages/plugin-detail/src/useRecordEditable.ts @@ -13,8 +13,9 @@ * sharing rule sits inside an object the user may otherwise create and edit * freely — so the header offered a primary "Edit" CTA that opened the form, let * the user retype a field, and only then bounced with a 403. The server is the - * authority (ADR-0057 D10) and stays so; this is the courtesy check that stops - * the UI from inviting a write it knows will fail. + * authority (the framework's ADR-0057 D10 — framework numbering; this repo's + * own ADR-0057 is an unrelated document) and stays so; this is the courtesy + * check that stops the UI from inviting a write it knows will fail. * * The answer comes from the explain engine's record-grained verdict * (`POST /api/v1/security/explain` with a `recordId`, ADR-0090 D6 / ADR-0095 diff --git a/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts b/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts index 30b9008615..a6939b81bb 100644 --- a/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts +++ b/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts @@ -41,9 +41,10 @@ * SPA origin where the cookie doesn't reach the API: the row's verdict is * `undefined` and the caller keeps the OBJECT-level answer, i.e. exactly what * this list rendered before this hook existed. The server is the authority - * (ADR-0057 D10) and stays so; hiding a capability on missing data would be a - * worse defect than the wasted click this fixes, and it is the same posture - * `useRecordEditable` takes for the detail header. + * (the framework's ADR-0057 D10 — framework numbering; this repo's own + * ADR-0057 is an unrelated document) and stays so; hiding a capability on + * missing data would be a worse defect than the wasted click this fixes, and + * it is the same posture `useRecordEditable` takes for the detail header. * * The probe rides the host's AUTHENTICATED fetch (`SchemaRendererProvider`'s * `apiFetch`) rather than the bare global one: a bearer-token session carries diff --git a/packages/react/src/hooks/useCapabilityGate.ts b/packages/react/src/hooks/useCapabilityGate.ts index 061aab7cf2..265258601f 100644 --- a/packages/react/src/hooks/useCapabilityGate.ts +++ b/packages/react/src/hooks/useCapabilityGate.ts @@ -24,8 +24,10 @@ * * **Fail-OPEN when unknown.** No runner, no user, no `systemPermissions` array: * the action shows. Unknown is not denied, the server is the authority - * (ADR-0057 D10), and hiding a permitted user's button on missing client data - * is the worse failure. An EMPTY array is not unknown — it means "holds + * (the framework's ADR-0057 D10 — framework numbering; this repo's own + * ADR-0057 is an unrelated document), and hiding a permitted user's button on + * missing client data is the worse failure. An EMPTY array is not unknown — + * it means "holds * nothing" and gates normally. */