Repository navigation
Commit 449a983
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_01MaSQn77TT5fUgHK9CesaDK1 parent e979fc5 commit 449a983
14 files changed
Lines changed: 88 additions & 78 deletions
File tree
- content/docs/references/api
- docs/adr
- packages
- spec/src/api
- triggers/trigger-api/src
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| 208 | + | |
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
0 commit comments