Repository navigation
fix(workflow-code): DX fixes from the staging A/B runs - #10229
Merged
Merged
Conversation
…N_REF_UNTYPED After a block rename, every JSON field reading the renamed block holds the new key while the stored field still holds the old one, so the compile's stored-value comparison treated each as edited and reported W_JSON_REF_UNTYPED on blocks nobody touched. The comparison now reads the stored workflow through the apply's renames (looking a block up under its new or stored key and rewriting the stored text's references as the apply does), and the server's recompile for renames materialize infers (name and const both changed) also settles these findings.
`sim workflows source status` and `sim workspaces source status` counted the dry run's errors and warnings in the plan line but never showed them, in any output format. Both now print them as an apply does (stderr frames in a display format, `diagnostics` in the JSON document), from the same filter that counts them.
Agents pass --yes to every write after `workflows source apply --yes`, and `workflows deploy` refused it as an unknown option. A command contract can now accept the flag without a confirm gate (acceptsYes), and deploy does.
`sim blocks get condition` never said what an operation's connection handle for an else-if row is (`else-if-0`, …); agents learned it from a refusal. The block's best practices, which blocks get prints, now list `if`, `else-if-<n>` and `else`.
… of a container `workflows operations apply` accepted an edit carrying params.parentId, answered applied, and left the block where it was: the edit handler never read the key. It now moves the block into the loop or parallel parentId names (null moves it out), keeping its id, through the same container checks and placement insert_into_subflow and extract_from_subflow use, and declines a parentId that is no container with the reason. The contract and CLI help name the key.
…le is an error A $ref in a function code file that names no block or variable was a warning everywhere, so `source check` and the dry run passed it on a block the lock binds and the apply saved code that fails at run time. The apply now refuses it as E_APPLY_UNRESOLVED_REF on a block whose code the source changed, and an offline check does the same on a function file whose digest differs from the one the get recorded, in every strict mode; code the stored workflow already holds keeps the W_UNRESOLVED_REF warning, so a workflow saved with a dangling reference still applies. A head that is a key the workflow had and source no longer declares gets a hint naming the one unbound block as the probable rename. A rename itself needs no hand edits: the apply rewrites $ref.<old key> to the new key (and the lock-ident and inferred-rename paths already resolve it in check and dry run). The primer now says so, and that an unresolved $ref in an edited file is an error.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
[Medium impact] The changes affect workflow editing and the CLI workflows developers use to check and apply source. Fix parent-cycle checks and batch parent references before merging. FindingsSummaryThis PR improves workflow-source checks and CLI feedback.
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 30 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…self params.parentId naming the block itself, or a container nested inside it, made a parent cycle that default layout followed forever. The edit now declines it with the reason.
…h adds A batch adding a loop under a readable id and moving a block into it left params.parentId pointing at the pre-normalization id, so the move was declined as targeting no container. The id normalization now rewrites parentId as it does subflowId.
…nvas position Taking a block out of a container added only that container's offset, so a block leaving a loop nested in another landed short by every outer container's offset. It now adds the offset of each enclosing container, for an edit's null parentId and extract_from_subflow alike.
…runcated The status listing kept only errors and warnings, so it dropped the info I_FINDINGS_TRUNCATED and presented a cut list as complete. It now keeps that marker, counted as neither.
… at once The rewriter applied renames one after another, so swapped or chained renames rewrote a token a second time (a swap of a and b turned <a. back into <a.). It now rewrites every token in one pass.
…ited Renaming a function file without changing its code made a stored dangling $ref an E_APPLY_UNRESOLVED_REF in an offline check, because the new path had no recorded digest. The check now compares a moved file against the digest of the path the lock bound its block to, as the server compares the block's code.
…f renames at once The apply rewrote references after restoring the stored block's inactive values, under the source rule that skips a rename whose old key the source still declares. Restored text names blocks by stored keys only, so a chain (fetch to report, report to summary) left <report. on the wrong block and a swap rewrote nothing. A restored block now takes every rename in one pass before it is restored; source text keeps the rule compile resolves it by.
…r inside itself Inserting an existing loop or parallel into a container nested inside it made a parent cycle, as an edit's parentId did. Both now share the guard that declines it with the reason.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes for what agents hit in the staging A/B runs of workflows as code (#10220 live).
$refin an edited function file is an error (E_APPLY_UNRESOLVED_REF, server and offlinecheck). A rename already rewrites$refkeys; code the stored workflow already holds keeps the warning. New hint names the renamed block. Primer says what a rename does.W_JSON_REF_UNTYPEDfor a rename's reference rewrite: the unchanged-field comparison reads the stored workflow through the rename map.source statusprints the findings it counts (stderr, anddiagnosticsin JSON), workflow and workspace.editwithparams.parentIdmoves the block into/out of a loop or parallel keeping its id (was a silent no-op); a non-container parent is skipped with a reason.workflows deployaccepts-y/--yesas a no-op, like the other write commands.if,else-if-N,else) in the block's best practices.Each fix has a test that fails without it. Generated OpenAPI, CLI
v2-api.ts, MCP operations and CLI docs regenerated.🤖 Generated with Claude Code