Repository navigation
improvement(workflow-code): sim workspaces source apply --run tests workflows, gating deployments/ - #10450
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 13 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
[Medium impact] The PR appears safe to merge; no new blocking issue was found. SummaryAdds
|
|
@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 13 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. |
There was a problem hiding this comment.
All reported issues were addressed across 13 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…orkflows, gating deployments/ - `apply --yes --run <key>='<input>'` (repeatable, JSON or @file): after the apply, dry-run each named workflows/<key>/ draft as `sim workflows run --dry --input` does; one `runs` entry each in the result; a run that does not complete exits 1, maps its failing block to file:line, and leaves the applied drafts in place. - With --run, deployments/ is applied in a second write only after every run completed, so a `live: 'draft'` deployment publishes only a tested draft. - Refused before anything is sent: beside --dry or --to, an --only without workflows, an unknown key (naming the keys there), a repeated key, or input that is not JSON. - Primer, AGENTS.md pointer, `source --help`, the advanced guide and docs teach the one-call loop `check && apply --yes --run <key>='{…}'`.
- Gate a managed deployments/ on the runs even when no deployment file is left, so a failed run never undeploys a workflow. - Read the deployments write before the runs and refuse it when a workflow or deployment file changed while they ran, so only tested drafts deploy. - Drop the first write's W_DEPLOYED_DRAFT_CHANGED for deferred deployments before it prints. - Help names runs[].sideEffects.unchecked and .omitted.
…ainst the whole apply
…d between the first write and the runs
417dcdd to
388013d
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 13 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…r apply's draft goes live - A stored chat output reads by the block's name in the draft, else in the live version it serves, so a chat whose output block an earlier apply re-created is rewritten when that draft deploys (the apply --run deployments write), instead of keeping the deleted block id. - Help says the test run executes code and sends GET fetches; the primer and pointer say one --run per changed workflow.
|
@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 17 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…st every draft a deploy publishes
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
sim workspaces source apply --yes --run <key>='<input>': after the apply, dry-runs each namedworkflows/<key>/draft assim workflows run --dry --inputdoes (input JSON or@file, repeat--runper workflow), mirroringsim workflows source apply --runruns(workflow key and id, status, output, side effects); a run that does not complete exits 1, maps its failing block to file:line inworkflows/<key>/, names the same apply asnext, and leaves the applied drafts in place--run, the first write leavesdeployments/out, and a second write (only: workflow, deployment) applies it only after every run completed, solive: 'draft'publishes only a tested draft (the server vouches for it through the workflow folder bases the first write saved; no new deploy path). The first write'sW_DEPLOYED_DRAFT_CHANGEDfor those workflows is dropped, since the second write decides them--runwith--dryor--to, an--onlywithout workflows, an unknown key (naming the keys there), a repeated key, or input that is not JSONworkspaces source --help, the advanced guide, exit codes and docs teach the one-call loopsim workspaces source check --dir . && sim workspaces source apply --dir . --yes --run <key>='{…}'TestRun/testRunResultmove toworkflow-run-follow.tsso both apply commands share themType of Change
Testing
workspace-source-apply.test.ts--runblock: completed run (two writes, deployments in the second), failed run (exit 1, file:line, no second write), unknown key, not-JSON input,--toand--dryrefusals; each fails on the pre-change code, and the gating tests fail with the deployment split revertedbun run generate,bun run lint,bun run type-check,bun run check:audits(incl. client-boundary and sim-cli bundle audits), rootbun run test, block-registry checkChecklist
test-auditauthoring gate)