Repository navigation
fix(workflow-code): staging QA fixes for runtime, promote, workspace and CLI source - #10262
Conversation
… in sync runs findChildSpanOutput compared the normalized span name with the caller's raw block ref, so a capitalised or spaced child block name was silently omitted while the parent and streaming paths matched it.
…an this iteration resolveSourceBlockId took the first incoming block whose state said executed, and a block state keeps that flag across loop iterations, so the edge drawn first won. It now reads executedBlocks, which the loop clears between iterations.
…to the block The ops path (Copilot, API, sim workflows operations apply) only set block.name, leaving <oldname.field> references dangling, so runs emitted the raw template. The reference rewrite moves to lib/workflows/references/block-rename.ts and the editor rename, workflow import, and ops rename all use it; the editor store's inline copy (unescaped regex, stateful global test) is gone.
…ount on the ops path An operations batch stored iterations: "3" or count: "2" as a string, which the loader then reset to its default (1 iterations, 5 branches) with no error. A numeric string is now stored as its number, as slider inputs coerce; any other value is an input validation error that keeps the current count, so --atomic refuses it.
…ink the explicit-any baseline
… since the last one A resource the promotion record holds that the directory no longer declares stays in the base, so the apply plans its delete and refuses it without --allow-delete, as an apply to the directory's own workspace does. Only resources no promotion left in the target are named W_PROMOTE_DELETES_TARGET_ONLY.
…e record Deleting .sim/targets/<id>.json made the next promotion overwrite every change made in the target since, rows its workflows wrote included, while the hint read as keeping the target's version. The hint now offers only the flows that keep the target's data and says what deleting the record does.
…wn transaction The strip ran after commit in the background and moved the managed rows' version after the apply recorded it, so the next status reported server row drift and a delete of the table was refused as stale. For a managed table the strip now commits with the reshape, so the recorded version holds it.
…gs say what to do A workflow create refused for a taken name gets its file and a hint, without the use case's 'or in another folder', which a directory cannot express; the workspace guide's exit table names E_NAME_TAKEN. E_TABLE_FOLDER and E_KB_FOLDER name the folders create command, and the credential finding no longer reads 'has no a slack credential'.
…drift hints the target The plan line of a resource refused as stale said 'kept as the server has it'; it now says the edit is refused as stale. A promotion's W_SERVER_CHANGED pointed at a get of the directory's own workspace; it now names a get of the target.
…orkflow once A workflow's commit runs its pipeline again and re-reported every finding its plan had found, so a real apply listed each warning twice. A write's finding now replaces the plan's (matched without the block id the commit gave it).
A table over 10,000 rows (or any resource the get cannot read as source) was only counted in the result, with the reason in .sim/skipped.json. The get now prints each skipped resource with its reason.
…her kind's stale finding has The workflow pipeline's E_APPLY_STALE carried its single-directory advice in the message and no hint; a workspace plan now reports it as staleFinding does for every other kind, naming the folder and the get to run.
…d drops the stale plan line
…ock in check and apply alike
…s E_CODE_FILE_PATH
…t keeps the id already follows
… version already matches
…k leaves the next command's lock The lock's interrupt release stayed installed while the command removed the folders it created, and it removed the lock path by name. A second command could take the lock in that window, and an interrupt then deleted the second command's lock. The release targets the lock only until this command removes it.
… parallel's collection and conditions renameBlock rewrote references only in sub-blocks, so a loop iterating <fetch.items> kept the old name after Fetch was renamed and failed at run time. It now also rewrites the collection, while and do-while conditions a loop or parallel holds in data, which the loop and parallel records are rebuilt from.
|
@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.
1 issue found across 89 files
Confidence score: 3/5
- In
command-lock.ts, a deferred SIGINT can makermSyncdelete a lock created by another command if the asynchronous removal hasn’t finished. Verify the cleanup still owns the lock before removing it.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/sim-cli/src/commands/protocol/source-dir/command-lock.ts">
<violation number="1" location="packages/sim-cli/src/commands/protocol/source-dir/command-lock.ts:198">
P1: `released` is set only after asynchronous `rm` resolves. If another command recreates the lock before that continuation runs, a deferred SIGINT still makes `rmSync(lock)` delete the new command’s lock. Remove the lock synchronously or verify ownership before signal cleanup targets it.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…till names this command Clearing a flag after the async rm left a window: once the folder was gone, another command could create the lock before the flag was set, and an interrupt then deleted it. The interrupt release now reads the lock's owner record and removes the lock only when it names this process and host (before the record is written, the lock is this command's by construction).
|
@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.
1 issue found across 89 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/sim-cli/src/commands/protocol/source-dir/command-lock.ts">
<violation number="1" location="packages/sim-cli/src/commands/protocol/source-dir/command-lock.ts:211">
P3: If the lock removal throws, `disposeSignalRelease()` is never reached, so the SIGINT/SIGTERM listener stays installed. Previously it was released before `rm`. Wrap the removal in `try { ... } finally { disposeSignalRelease() }` so the listener is always released.</violation>
</file>
|
@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.
No issues found across 89 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Re-trigger cubic
Summary
Fixes from end-to-end QA of workflows and workspace as code on staging, after #10237 and #10238. Five QA lanes ran (CLI workflow, workspace, editor and non-code, stress and safety, maintainability), plus an independent review of the fixes. No P0s were found. Every behaviour fix has a test that was seen to fail with the fix reverted.
Runtime and editing
rewriteBlockNameReferences. This also removes the editor store's copy, which had an unescaped regex and a stateful global regex.iterationsor parallelcountto a number. Any other value is refused; before, it was silently reset.Workspace source and promote
--allow-delete. Resources that exist only in the target are kept and listed. Deleting them needs the new--delete-target-onlyflag, which is accepted only together with--toand--allow-delete. The promotion record no longer records target-only entries.Compiler and CLI
statusand apply ignore function files that nocodeFile()names, in both workflow and workspace directories.checkand the server agree on an unknown dropdown option on a changed field. Option lists that depend on the deployment stay a warning in the offline check.E_CODE_FILE_PATH.apply --deploydoes not redeploy.paths:patterns now cover the folders from wave 2.Contract changes
--delete-target-onlyflag for promotions.optionsVarymarker. The OpenAPI spec and the CLI types are regenerated.apply --deployskips the deploy when the live version already matches. To re-register webhooks or schedules, usesim workflows deploy.Testing
check:audits,check:test-types, migrations, docs compatibility, lint and the root type-check.