Repository navigation
improvement(workflows): agent-benchmark fixes for JSON refs, export, subflow moves and rerun-from-block - #10399
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] The PR appears safe to merge; no blocking issues remain. SummaryThis PR fixes JSON references, workspace exports, moves into loops and parallels, and rerun commands.
Reviews (4) · Last reviewed commit: "fix(api): keep rerunFromBlockId out of t..." · Reviewed by Greptile |
There was a problem hiding this comment.
All reported issues were addressed across 44 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…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.
…SON 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)".
…es, 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.
- 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.
…lag-hidden option, and align the splice docs
… 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.
c892fed to
643d245
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 63 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Fixes and friction removals found by A/B benchmark runs of agents editing workflows, on both the workflows-as-code path and the operations path.
Correctness
source getnow prints a quoted reference bare only when a declaration types it as text: the catalog, a variable, an input or response format, or an env var.t`${ref}`, so the source states its own storage.checkagrees with apply:W_JSON_REF_UNTYPEDis now reported on any block that compiles differently, matching what the server reports on apply.[<x>]with1,2,3) now becomes a string.Agent friction
sim workflows export:--no-include-workspace-bindingsgives a copy to share outside the workspace.outlineis gone.parentId):--atomicrefuse the whole batch.tables create --schemaandtables columns create --columnhelp is generated from the zod shape the server validates, sorequired,uniqueand the other column fields are documented and can't drift.next, the exact command to rerun the saved draft from that block with this run as--source-run.--runflag is removed; run selection goes only through--manual,--from-block,--source-runand--stop-after.quotedBlockLabel.hiddencontract option is removed.DESIGN.md,SYNTAX.mdand the syntax docs describe the new splice rule.Type of Change
Testing
nextthrough the real CLI entry, then executing the printed command.bun run generate,bun run lint,bun run type-check,bun run check:audits(72);check-block-registry.ts origin/staging;bun run test;bun run test:integrationfor the threeapply-workflow-operations*integration files.Checklist
test-auditauthoring gate)