Repository navigation
improvement(workflow-code): agent DX and check/server parity from the v6 benchmark - #10305
Conversation
… in source params
…ith 15, as the apply does
…at draft runs need --manual
…rations, as blocks get names it
…te removes as destructive
…hen the edit removes a variable
…ry run reports them
…on the operations path, and what export clears
…n the top-level and source group help
…ookbook, and print a core builder's doc in source params
… results, status counts and block deletes
…e the core.d.ts doc-comment walk
…n an error edge leaves it The executor takes an error edge whatever the stored errorEnabled flag says, and an operations edit that wires one leaves the flag false, so the outline reported the error output off while the path fired. The outline now reads the flag as the editor draws the port (flag or error edge).
…nd say to deploy it A deployed parent calling a child with no active deployment failed with "<child id>" failed: Child workflow is not deployed. The failure now carries the child's name and id and says a deployed run calls each child's deployed version.
…n operations edit writes beside one of them An operations edit now writes a canonical name (tableId) into its member field, so the only refusal left is a canonical name set beside one of its own members. That refusal now names every field sharing the name, with its mode, and the one the edit also set.
…tions, locks and child results - A while or do-while condition that is not a JavaScript expression once its references stand in as values is W_LOOP_CONDITION_SYNTAX, refused on an edited loop as E_APPLY_LOOP_CONDITION_SYNTAX: the run fails evaluating it. - A loop reading its own index by name in its condition is W_REF_OUT_OF_SCOPE with a <loop.index> hint: the condition is evaluated outside the loop's body. - check fails on a lock every apply and status refuses (a cap over its limit, bad JSON), and the lock refusal now says how to recover. - In a workspace directory, a reference to a child call's result.<key> whose child responds is W_CHILD_RESULT_PATH, with result.data.<key> as the hint.
The source apply reported a new block of an unregistered type three times: the compile's E_APPLY_INVALID_BLOCK_TYPE at its line, the placement gate's in other words, and the state check's E_APPLY_INVALID_STATE. A gate refusal the compile already made for the same block, and the state check's repeat of it, are dropped.
…g and an undeployed child at deploy - A reference to a Workflow block's result.<key> whose child holds an enabled Response block, where <key> is not data, status or headers, is a child-result lint finding naming result.data.<key>. The source apply reports it as a W_APPLY_LINT warning, never a refusal. - A deploy's lint reports a called child with no deployment, which a deployed run of the parent cannot call.
… new checks use - The offline child-result check finds references with the shared tokenizer and splits paths with parseStoredPath, reads the response block type and outputs from @sim/workflow-code, and shares calledWorkflowKey with the child input check. - The loop condition check reuses the canonicalizer's reference pattern. - The lint reads a response block's outputs from the registry, looks children up alongside the reference collectors, and renders value findings with one helper. - check reads the workspace declarations and compiles its workflows at once.
…op; trim comment and test noise
… Response-output helpers in the new checks The child lint reads the called workflow through getWorkflowInvocationTarget and the Response outputs through RESPONSE_OUTPUTS. collectStringLeaves moves to @sim/utils so the CLI check stops carrying a copy, and both source checks read their workspace declarations through one helper.
…e-count test for what it checks
…eir detail into help The longer summaries renamed the CLI reference headings, so the #create-workflow and #print-a-workflow-as-a-portable-json-document anchors broke. The Start block and the cleared workspace bindings are now said in each command's help instead.
…rewrote in the content baseline
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The reviewed changes appear safe to merge; no new actionable issues remain. SummaryThis PR improves CLI guidance and brings offline checks closer to server and run behavior.
|
There was a problem hiding this comment.
All reported issues were addressed across 67 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…member access after one parses A reference replaced by a bare 0 turned <start.text>.length into 0.length, which is not JavaScript, so check warned (and apply refused) a condition the run evaluates fine.
…ild ends at a Response block A child with a Response on one branch returns another block's output on the others, so W_CHILD_RESULT_PATH and the server's child-result lint now require every run to end at a root Response (alwaysEndsAtResponse in workflow-types, shared by the CLI check and the server). A deploy judges the child's active deployment, a draft write its draft, read in narrow batched queries; a failed child lookup no longer leaves an unhandled rejection. isElseConditionTitle and RESPONSE_BLOCK_TYPE move to workflow-types so every reader shares one rule.
The CLI guessed from each finding's kind/key whether it belonged to a held change, and E_PLAN_REF_DELETED names the held workflow while the server records it on the delete, so a dry run exited 15 for an apply that refuses. The dry run now carries refuses from the plan's own refusing list; the CLI falls back to the guess, minus that code, for older servers.
…rface On a trigger-mode block, a name shared by action and trigger fields (siteId) was written to the dormant action member.
…e error's line The cookbook wrote a status option and a column the orders table lacks and upserted on a column not declared unique; a check of the example against the cookbook workspace now guards it. The help says a source directory keeps its recorded workspace and what -w does with a variable holding the whole option.
|
@cubic-dev-ai review |
@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 88 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…y display name The run resolves <W.index> to loop w by normalized name, so the self-reference check compares normalized names too.
…root cycle, and for a __proto__ key Rows after a condition's first else never run, so only those up to it must be wired; a root cycle never runs to the Response block; and the canonical graph is built with own properties so a block keyed __proto__ is kept.
…source directory takes its workspace The orders table's orderId is unique, so the cookbook and the Support workflow upsert on it instead of inserting a second row for the same order.
|
@cubic-dev-ai review |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Follow-ups from the v6 agent benchmark and QA7: agent DX on the CLI and docs,
checkand lint parity with the server and the run, and clearer server and executor messages.CLI/docs
--stop-aftersetsselectedOutputsto the stop block when--select-outputis not given.blockOutputsthen holds what that block produced, under its key or id.outputstays empty.workflows run --helpsays what the result holds (status, notsuccess), how the command exits, and that draft runs need--manual.source paramstakes a block type:functionprintsfn, andtable_v2lists thetable.*builders. It also prints a core builder's doc.erroroutput, a Workflow block'sresult(result.data.x), theconditionsandinputFormatshapes,retry, and canonical names.-wandSIM_WORKSPACE, and the trap of putting--workspace <id>in one shell variable, are in the top-level and source group help.workflows createhelp says the draft holds a Start block.workflows exporthelp says workspace bindings print as null unless--include-workspace-bindings.table.upsertRow, ResponsedataMode: 'json', what a reference to a block that did not run resolves to, and loop results.plan.errorsandplan.warningscount what its dry run reports. A conflict counts as an error.destructiveand counted in the plan summary. It already needed--allow-delete. A workflow status names--allow-deletewhen the edit removes a variable.Check and lint parity
tableIdon a Table block), asblocks getand source name them. A string goes to the advanced member and anything else to the basic one, and the block's mode follows the member written. A canonical name set beside one of its own members is refused, and the refusal names every field that shares the name, with its mode.W_LOOP_CONDITION_SYNTAX: a while or do-while condition the run cannot parse. On an edited loop it is refused asE_APPLY_LOOP_CONDITION_SYNTAX.W_CHILD_RESULT_PATH: an offline check ofresult.<key>on a child that responds, where the value is atresult.data.<key>.child-result: the same finding on the server. A source apply reports it asW_APPLY_LINT.indexby name in its condition isW_REF_OUT_OF_SCOPE.checkfails on a lock every apply refuses (over the block or variable cap, or invalid JSON), and says how to recover.Server/executor messages
#create-workflowand#print-a-workflow-as-a-portable-json-documentanchors. The content baseline records the CLI code examples the new help rewrote.Recorded product decisions (not changed here)
.errorkeeps itsLine N: \code` -` prefix.workflows exportkeeps nulling workspace bindings by default. This is documented, not changed.workflows runkeeps a result withstatusand nosuccessfield. This is documented, not changed.--stop-afterdefault lives in the CLI. A server-side default (inexecuteManualWorkflowOperation) would cover API and MCP callers too, but it changes the v2 contract for every caller.