Skip to content

Commit 449a983

Browse files
committed
refactor(trigger-api,spec)!: trigger-api answers in the declared envelope; draw the catalog's boundary (ADR-0112 batch 2)
The API-trigger webhook endpoint returned `{ error: '<code>' }` — a bare code in the message slot, six times, three of them with no message at all. It now answers `{ success: false, error: { code, message } }` with catalog codes (RESOURCE_NOT_FOUND, INVALID_REQUEST, SERVICE_UNAVAILABLE) plus two registered ones (INVALID_SIGNATURE, ENQUEUE_FAILED). Every branch gains the message it was missing. Also records what batch 2 decided NOT to sweep, as ADR-0112 D6c, because three lowercase clusters look like stragglers and are not: - Diagnostics records (`build-probes.ts` RuntimeBuildIssue, `metadata-diagnostics.ts`) ship as the payload of a 200, describe an artifact rather than the request, and carry a severity that can be 'warning'. - Param/field-addressed issues (`ActionParamIssue`, plugin-sharing's `fields[]`) are D6 territory; plugin-sharing's own top-level code is already VALIDATION_FAILED. - CLI `emitJson({ error: '...' })` output is a terminal contract read by shell scripts, not a request response — renaming it would break users' pipelines with neither a schema nor this ADR asking for it. The line, now written down once: the catalog governs the code a failing REQUEST answers with. Field-addressed (D6), persisted (D6b), or shipped inside a successful response (D6c) means a different vocabulary with different consumers. Refs #4003, #3841. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MaSQn77TT5fUgHK9CesaDK
1 parent e979fc5 commit 449a983

14 files changed

Lines changed: 88 additions & 78 deletions

File tree

‎content/docs/references/api/analytics.mdx‎

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/auth.mdx‎

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/automation-api.mdx‎

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/batch.mdx‎

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/contract.mdx‎

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/error-code-ledger.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ const result = ErrorCode.parse(data);
165165
* `DUPLICATE_REQUEST`
166166
* `EMAIL_SEND_FAILED`
167167
* `EMAIL_SERVICE_REQUIRED`
168+
* `ENQUEUE_FAILED`
168169
* `ENVIRONMENT_BIND_FAILED`
169170
* `ENVIRONMENT_NOT_FOUND`
170171
* `ENV_ACCESS_DENIED`
@@ -204,6 +205,7 @@ const result = ErrorCode.parse(data);
204205
* `INVALID_REQUEST`
205206
* `INVALID_RESUME_TOKEN`
206207
* `INVALID_SIGNAL`
208+
* `INVALID_SIGNATURE`
207209
* `INVALID_STATE`
208210
* `INVITE_EMAIL_FAILED`
209211
* `INVITE_REQUIRES_EMAIL`

‎content/docs/references/api/export.mdx‎

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/metadata.mdx‎

Lines changed: 19 additions & 19 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/package-api.mdx‎

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/protocol.mdx‎

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)