Commit 5aadce3
* fix(service-automation): execute() carries the flow author's terminal messages (#9414)
`AutomationResult` declares `successMessage` / `errorMessage` as a general
terminal-result feature, but `resumeInternal` was the only producer. A flow
dispatched through `POST /api/v1/automation/:name/trigger` carried neither,
so the author's own text reached a caller only when the run happened to
pause and be resumed — and the console consumer that reads
`error.details.errorMessage` (#9413, objectui `flowResponse.ts`) got nothing
on every non-screen flow.
Four terminal exits now produce the pair: `execute()`'s success and failure
returns, both of `executeWithoutRetry`'s, and `retryExecution`'s exhausted
exit — a different exit from `execute()`'s own, reached by exactly the runs
that failed repeatedly.
Paused, skipped and never-dispatched exits keep carrying neither, and that
boundary is pinned rather than only described.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y26DJEHSBhhAQ6wwfsHNza
* test(verify): pin the trigger route's terminal messages end-to-end at the documented wire path (#9414)
`content/docs/automation/flows.mdx` promises that a 400 from
`POST /api/v1/automation/:name/trigger` carries the flow author's own
`errorMessage` at `error.details.errorMessage`. That sentence was false
before the engine repair — the field was always absent at the source on
this route — so the docs described the declaration while the
implementation never honoured it.
The engine pins assert `AutomationResult`; the route pins drive a scripted
result. Neither proves the documented sentence. `@objectstack/verify` is
the one package depending on both `@objectstack/runtime` and
`@objectstack/service-automation`, so a real engine is driven through a
real `HttpDispatcher` here and the response body is read at the doc's own
path and key — on both exits, plus the "when the flow declares one" half.
One case drives a deliberately hostile string (braces, padding, `&`,
quotes) and asserts byte identity: `flows.mdx` documents both fields as
plain strings with `{var}` explicitly NOT interpolated, so templating,
trimming or escaping on the way out would contradict the shipped contract.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y26DJEHSBhhAQ6wwfsHNza
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 86ea8df commit 5aadce3
4 files changed
Lines changed: 593 additions & 4 deletions
File tree
- .changeset
- packages
- services/service-automation/src
- verify/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3239 | 3239 | | |
3240 | 3240 | | |
3241 | 3241 | | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
3242 | 3264 | | |
3243 | 3265 | | |
3244 | 3266 | | |
| |||
3309 | 3331 | | |
3310 | 3332 | | |
3311 | 3333 | | |
3312 | | - | |
| 3334 | + | |
3313 | 3335 | | |
3314 | 3336 | | |
3315 | 3337 | | |
| |||
3350 | 3372 | | |
3351 | 3373 | | |
3352 | 3374 | | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
3353 | 3385 | | |
3354 | 3386 | | |
3355 | 3387 | | |
| |||
6117 | 6149 | | |
6118 | 6150 | | |
6119 | 6151 | | |
| 6152 | + | |
| 6153 | + | |
| 6154 | + | |
| 6155 | + | |
| 6156 | + | |
| 6157 | + | |
| 6158 | + | |
6120 | 6159 | | |
6121 | 6160 | | |
6122 | 6161 | | |
6123 | 6162 | | |
6124 | 6163 | | |
6125 | 6164 | | |
| 6165 | + | |
6126 | 6166 | | |
6127 | 6167 | | |
6128 | 6168 | | |
| |||
6159 | 6199 | | |
6160 | 6200 | | |
6161 | 6201 | | |
6162 | | - | |
| 6202 | + | |
| 6203 | + | |
| 6204 | + | |
| 6205 | + | |
| 6206 | + | |
| 6207 | + | |
| 6208 | + | |
| 6209 | + | |
| 6210 | + | |
| 6211 | + | |
| 6212 | + | |
| 6213 | + | |
| 6214 | + | |
| 6215 | + | |
6163 | 6216 | | |
6164 | 6217 | | |
6165 | 6218 | | |
| |||
6290 | 6343 | | |
6291 | 6344 | | |
6292 | 6345 | | |
6293 | | - | |
| 6346 | + | |
| 6347 | + | |
| 6348 | + | |
| 6349 | + | |
| 6350 | + | |
| 6351 | + | |
| 6352 | + | |
6294 | 6353 | | |
6295 | 6354 | | |
6296 | 6355 | | |
| |||
6311 | 6370 | | |
6312 | 6371 | | |
6313 | 6372 | | |
6314 | | - | |
| 6373 | + | |
| 6374 | + | |
| 6375 | + | |
| 6376 | + | |
| 6377 | + | |
| 6378 | + | |
| 6379 | + | |
| 6380 | + | |
| 6381 | + | |
| 6382 | + | |
| 6383 | + | |
| 6384 | + | |
| 6385 | + | |
6315 | 6386 | | |
6316 | 6387 | | |
6317 | 6388 | | |
0 commit comments