Repository navigation
Commit 43d2b8c
authored
improvement(workflows): agent-benchmark fixes for JSON refs, export, subflow moves and rerun-from-block (#10399)
* fix(workflow-code): print an inferred-text JSON ref as a template so upstream code edits cannot flip its storage
A stored quoted token in a JSON field printed as the bare reference whenever refValueKind typed it
a string, including when that type was only inferred from a Function's code or a child workflow's
Response data. The printed source then left the field's storage to code in another block: an edit
there that made the type unreadable compiled every unedited reader bare, so a string value broke
the JSON at run time. The printer now prints a quoted token bare only when a declaration types it a
string (refDeclaresString), and as t`${ref}` otherwise, which stores quoted whatever the code returns.
The local check scoped W_JSON_REF_UNTYPED to blocks the lock does not bind, while the server reports
it for any field that compiles differently than stored; it now reports it on any block the edit
changed, including one an edit elsewhere makes compile differently.
* fix(executor): a bare string reference in a JSON field splices as a JSON string
A reference outside any string literal in JSON text (a Response body, table row data, an api
body) spliced a string value raw, so `{"error": <check.message>}` produced invalid JSON for any
message that was not itself JSON. Such a string now lands JSON-encoded; a string that already
reads as one JSON value (an agent's JSON answer, a numeric env var) still splices as written,
and a reference inside a string literal keeps its existing escaping.
The api block's request retry params now say what they retry (timeouts, connection resets, 429
and 5xx, for GET/HEAD/PUT/DELETE unless non-idempotent retries are on), what fails at once (an
unresolvable or refusing host, other 4xx), and that the block retry setting is separate and
reruns the whole block after any failure. Their titles read "Request retries", "Request retry
delay (ms)" and "Max request retry delay (ms)".
* improvement(cli): self-sufficient workflow export, atomic subflow moves, documented table columns
- `sim workflows export` keeps workspace bindings (table, knowledge base, child workflow ids) by default, so a table block prints its tableId; `--no-include-workspace-bindings` clears them for a copy to share. The stderr note pointing at `workflows outline` is gone.
- Moving a block into or out of a loop or parallel removes the stored edges the move leaves crossing the boundary and names them in `warnings`, instead of recording them as skipped items that made `atomic` refuse the batch. Edges the batch itself asks for across a boundary are still refused. Operations help states this.
- `tables create --schema` and `tables columns create --column` list every column field (required, unique, options, multiple, currencyCode, id, position) generated from the shape the server validates.
* improvement(cli): make rerun-from-block a first-class run loop
- A failed run (workflows run, runs get, runs wait) whose failure names a block now carries
`next`: `sim workflows run <workflowId> --from-block <blockId> --source-run <runId>`, so an
agent fixes the block, applies, and reruns only the failing part on that run's upstream outputs.
Parallel-branch ids and ids outside the issued format get no command.
- The raw hidden `--run` JSON flag is gone; the run selection is built only from --manual,
--trigger, --mock-payload, --from-block, --source-run and --stop-after.
- `workflows run --help` and the --from-block/--source-run descriptions say what the rerun reuses;
both source primers name the rerun flags in Run and debug, within the 4096-byte budget.
- paused-run.ts becomes run-next.ts now that it names the next command for failed runs too.
* docs(workflow-code): describe the bare-reference splice rule the executor now applies
* improvement(workflows): reuse the shared block label, drop the dead flag-hidden option, and align the splice docs
* fix(workflows): address review on rerun hints, removed-edge warnings, retry delays and docs
- A failed run's error carries rerunFromBlockId: the failed block, or the outermost loop or
parallel holding it, since a run cannot start inside one. Execute reads it from the graph the
run executed, Get workflow run from the saved draft. The CLI prints next from it instead of
the failed block id, so a failure inside a loop no longer prints a rerun the server refuses.
- Edge validation names why it dropped an edge (missing block, annotation-only, trigger target,
scope); the removed-edge warning adds loop and parallel wiring advice only for a scope crossing.
- backoffWithJitter never waits longer than maxMs: jitter at the cap only shortens the wait, so
an api block's max request retry delay is a real maximum.
- source check help: W_JSON_REF_UNTYPED scope sentence rewritten.
- cross-kind integration expects a child-result text ref printed as t`${...}`.
- Docs baseline hashes for the operations apply edge help fence.
* test(utils): drop the retry test's redundant mock-restore hook
* fix(api): keep rerunFromBlockId out of the resume response's error schema1 parent e49e733 commit 43d2b8c
63 files changed
Lines changed: 1191 additions & 278 deletions
File tree
- apps
- docs
- content/docs
- cli
- workflows/code
- scripts/fixtures
- sim
- app/api/v2/workflows/[workflowId]
- execute
- runs/[runId]
- blocks/blocks
- executor
- utils
- variables
- lib
- api/contracts/v2
- workflows
- api
- application
- editing
- executor
- workspace-source/application
- stores/workflows/workflow
- tools
- generated
- http
- packages
- sim-cli/src
- commands/protocol
- contract
- generated
- runtime
- utils/src
- workflow-code
- src
- compile
- diagnostics
- print
- workflow-sdk/test/fixtures
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
| 627 | + | |
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
| |||
833 | 835 | | |
834 | 836 | | |
835 | 837 | | |
836 | | - | |
837 | | - | |
| 838 | + | |
| 839 | + | |
838 | 840 | | |
839 | 841 | | |
840 | 842 | | |
| |||
848 | 850 | | |
849 | 851 | | |
850 | 852 | | |
| 853 | + | |
| 854 | + | |
851 | 855 | | |
852 | 856 | | |
853 | 857 | | |
| |||
1155 | 1159 | | |
1156 | 1160 | | |
1157 | 1161 | | |
1158 | | - | |
| 1162 | + | |
1159 | 1163 | | |
1160 | 1164 | | |
1161 | 1165 | | |
1162 | 1166 | | |
1163 | | - | |
| 1167 | + | |
1164 | 1168 | | |
1165 | 1169 | | |
1166 | 1170 | | |
| |||
1522 | 1526 | | |
1523 | 1527 | | |
1524 | 1528 | | |
1525 | | - | |
| 1529 | + | |
1526 | 1530 | | |
1527 | 1531 | | |
1528 | 1532 | | |
| |||
0 commit comments