Repository navigation
improvement(workflow-code): agent efficiency — typed child results, commands use the source directory's workspace, primer and cookbook fixes - #10388
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 58 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 blocking issue remains. SummaryThe latest change restores the workflow-variable rename warning and shortens the primers without changing their command examples.
Reviews (7) · Last reviewed commit: "fix(cli): the primers keep the one-workf..." · Reviewed by Greptile |
… the child's Response body A parent reading <call.result.data.<field>> of a child workflow that responds on every run had no declared type, so a JSON field stored it bare with W_JSON_REF_UNTYPED and every such edit paid an extra check cycle. compileWorkflow and printWorkflow now take childResults (child workflow key -> typed top-level fields of its Response data, from childResultFields), so compile and print type the reference the same way: a text field is stored quoted and prints bare, a typed one is stored and printed bare. - CLI: a check in a workspace directory reads the fields from the workflows it already compiles. Block digests for .sim/stored-edges.json stay untyped, so a printed block a child types does not count as edited. - Server: every source apply, dry run and get reads the fields of the children the workflow calls. A workspace apply reads a child it submits from its folder, and any other child from its stored draft in the workspace (loadChildResults, once per request). A single-workflow apply or get reads the stored children, so a workspace folder applied on its own stores what a workspace apply stores.
…er rename and rejoin wording - A command run inside a source directory (nearest .sim/base.json at or above the cwd) acts on that directory's workspace when neither --workspace nor SIM_WORKSPACE names one. Precedence: flag > env > directory > profile, documented in sim --help. sim login opts out so a directory never becomes the profile's stored workspace. Source commands now refuse a SIM_WORKSPACE naming another workspace (SOURCE_OTHER_WORKSPACE), as they refuse the flag. - Primers: a display-name rename also rewrites $ref.<key> in function files; any number of display-name or const renames per apply, both of one block only one per apply. - Cookbook: one Response after condition branches rejoin, a function picking the value with ??.
…ll; promote-record and lock-layout docs match the code
…atched child reads, childSources on the per-apply loads
…equest layer, stored-edges under the printed typing - resolveProfile is back to flag, env and config. The terminal reads the workspace the working directory names once before each action (enclosingWorkspace, the same rule recordedWorkspace uses: base, workspace folder, starter), and actingProfileFrom/clientFrom apply it below --workspace and SIM_WORKSPACE. 'directory' leaves SettingSource; whoami and the 404 wording read workspaceDirectory. sim login needs no opt-out. A starter directory now chooses the workspace for every command, as it does for source create. - explicitWorkspaceSetting lives in config and is the one "flag then env" check. - .sim/stored-edges.json digests blocks under the child results the get printed with: a workspace get/apply types each folder by the folders it answered with, a workflow get, create or apply into a workspace folder by that workspace directory's folders. The check compares its typed compile directly, so the untyped recompile is gone. - A workspace check compiles each workflow once, with its env names, and reuses that compile for a workflow whose calls no child result types.
…ildren, the same on CLI and server - An offline compile (storedUnread) leaves stored() on a block the lock binds unread instead of refusing it, so a child holding a secret still compiles and types its callers; the server compiles a submitted child folder with its lock through the same folderCompileInput. - resolveChildResults types each workflow's Response fields by its callees' fields, callees first (strongly connected components; a call within a cycle stays untyped), shared by the workspace check, the stored-edges records, the apply and the read paths. - The stored read lifts a child's own calls to keys, so a forwarded field is typed as the compile types it. - The primers say source commands refuse a -w naming another workspace.
4395482 to
69ad970
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
…alog; child results never fail a written apply
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…from until create
|
@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. |
There was a problem hiding this comment.
All reported issues were addressed across 64 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 64 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.
No issues found across 64 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.
Turn on auto-fix | Re-trigger cubic
Summary
Removes the recurring agent frictions measured in A/B benchmark runs of the workflows-as-code loop.
Typed child results
<call.result.data.<field>>is typed from the child's Response when the child always responds, so it no longer warnsW_JSON_REF_UNTYPED, which cost every cross-workflow benchmark run an extra check-and-apply round.Commands use the source directory's workspace
sim tables …and other commands act on that directory's workspace. Today they fall back to the profile's and 404.-w, thenSIM_WORKSPACE, then the source directory (base, its workspace directory, or a starter), then the profile.resolveProfilestays flag/env/config.SIM_WORKSPACEnaming another workspace is refused by source commands (SOURCE_OTHER_WORKSPACE), as-walready was.Primer and cookbook
$ref.<key>too. Renaming both the const and the display name works for one block per apply. The old "one variable per apply" line was wrong both ways.??; a block that didn't run reads asnullin code and''in text.Also
packages/sim-cli/scripts/print-source-primers.tsprints both primers as JSON for the mothership worker's preloadedworkflow-sourceskill.Type of Change
Testing
bun run generate,bun run lint,bun run type-check,bun run check:audits,check-block-registry.ts origin/staging, rootbun run test.SIM_WORKSPACErefusal;test-auditauthoring gate.Checklist
test-auditauthoring gate)