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(#14923 review): respell the gate's bare-root literal, register the wire code, and align the vocabulary with the writer
B1 — `check-orgless-write-declarations.mjs` spelled the repo tooling root as a
quoted literal, which the dispatch derivation reads as this gate DECLARING that
tree as a population it reads. It excludes it. Respelled as an anchored regex
(remedy (b), `check-published-files.mjs`' worked instance), so the escapable-
literal row discharges by construction rather than by a new ledger line.
B4 — `ERR_ORGLESS_WRITE_DECLARATION_REFUSED` is `status` 500 and REST forwards a
string code on any `status >= 500`, so it is wire vocabulary and belongs in the
ADR-0112 ledger beside its sibling `ERR_SYSTEM_WRITE_ORGANIZATION_REQUIRED`.
One entry plus its generated rows.
Contradiction — the reason vocabulary and the `sys_audit_log` ledger evidence
claimed a population no writer declares (a subject whose organization column is
present but NULL). `audit-writers.ts` deliberately leaves that case to the
refusal; both texts now say so, and both are runtime strings that reach
operators.
A1 — an empty batch built no row hook contexts, so a bogus declaration on one
was the single spelling of the option that was silently ignored. It now reads
the caller's options on that path, and two pins hold both directions.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
Copy file name to clipboardExpand all lines: content/docs/references/api/contract.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ const result = ApiErrorSchema.parse(data);
27
27
28
28
| Property | Type | Required | Description |
29
29
| :--- | :--- | :--- | :--- |
30
-
|**code**|`Enum<'VALIDATION_ERROR' \| 'INVALID_FIELD' \| 'MISSING_REQUIRED_FIELD' \| 'INVALID_FORMAT' \| 'VALUE_TOO_LONG' \| 'VALUE_TOO_SHORT' \| 'VALUE_OUT_OF_RANGE' \| … +292 more>`| ✅ | Error code (e.g. VALIDATION_ERROR; StandardErrorCode ∪ the ledger the serving side registers — ERROR_CODE_LEDGER for framework packages) |
30
+
|**code**|`Enum<'VALIDATION_ERROR' \| 'INVALID_FIELD' \| 'MISSING_REQUIRED_FIELD' \| 'INVALID_FORMAT' \| 'VALUE_TOO_LONG' \| 'VALUE_TOO_SHORT' \| 'VALUE_OUT_OF_RANGE' \| … +293 more>`| ✅ | Error code (e.g. VALIDATION_ERROR; StandardErrorCode ∪ the ledger the serving side registers — ERROR_CODE_LEDGER for framework packages) |
31
31
|**declaredCode**|`string`| optional | The producer-declared code, verbatim, when it is not a member of the closed `code` vocabulary — the open, author-authored channel (app-specific spellings; ADR-0112) |
|**userMessage**|`string`| optional | Producer-marked user-facing refusal text, verbatim. Present exactly when the producer opted in at throw time; consumers render it to end users and keep their generic substitution for anything unmarked. Status-agnostic; never replaces `message`. |
@@ -156,6 +156,7 @@ const result = ApiErrorSchema.parse(data);
0 commit comments