Repository navigation
fix(sim-cli): publish when bundled packages change, complete third-party licenses, and fix docs drift - #10279
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] The PR appears safe to merge; no actionable new issues were found. SummaryUpdates CLI publishing, bundle checks, source-file preservation, and docs.
The earlier, unnumbered git-fields finding is fixed: all three pages now explain that either field may be absent. The previous-review merge bases differed, so this review covered the full PR diff. Reviews (3) · Last reviewed commit: "docs: say git provenance fields are sent..." · Reviewed by Greptile |
There was a problem hiding this comment.
All reported issues were addressed across 22 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. |
workflows outline in text or table output printed block ids as '112f78c0 9170 4843 ...' because the field-name humanizer ran on the keys of the blocks map. A record whose every value is an object is a map keyed by data, so its keys are now printed verbatim.
… it as stored() A workspace apply deleted a user-written tools/<key>.js once the server kept the tool's code as stored(), so the only local copy of that code was gone. A workflow folder keeps the same kind of file and warns. The workspace apply now does the same: the file stays on disk, leaves .sim/written.json, and is named in a warning. A tool code file its declaration does not name is no longer sent, as a workflow's unnamed function file is not, so the next apply is not refused with E_TOOL_CODE.
…y bundled license Since workflows as code, the CLI bundles @sim/workflow-code, @sim/workflow-sdk, @sim/workspace-code, @sim/workflow-types and @sim/table-cells, but publish-sim-cli only watched sim-cli and utils, so a compiler or SDK change never reached npm. The bundle also gained @babel/parser, @noble/hashes and zod, all MIT, with no notice in THIRD_PARTY_LICENSES. check:sim-cli-bundle bundles the CLI's build entry points in memory and fails when either list disagrees with the bundle, so the next bundled package cannot slip through.
Workflows and workspaces as code add a command family, and every command now exits 13 on a 401 and 9 on a 429 instead of 1. A minor bump tells users who pin ~2.2. The publish workflow keeps a manifest version above the latest published one, so main publishes 2.3.0 as written.
…k pair The text the CLI embeds from workflow-sdk (core.d.ts, the cookbook, the workspace SDK) was regenerated only by a hand-run script that bun run generate skipped. It is now generate:workflow-sdk-embedded-text with a check: pair that check:audits runs. workspace-text.generated.ts joins its three siblings in biome's ignore list so the check compares the generator's own output byte for byte.
…code page - scripting.mdx: source get lists exit 10, 13, 130 and every exit-1 cause its help names; apply/create exit 10 covers any directory, as every source write now locks --dir; workspace status and check list exit 10. - workflow-sdk README: without --yes and a terminal, apply and create print the plan and exit 14; CONFIRMATION_REQUIRED is gone. - code.mdx: step 5 of the agent loop is back in the list. - code.mdx, workspace-code.mdx, audit logs: apply and create send the git commit and origin URL, which the write's audit entry records.
…ool code-path rule - workflows outline declares dataKeys in its contract instead of the renderer guessing from a record's shape, so a resource that only holds nested objects keeps its humanized labels. - toolOfCodeFile maps tools/<key>.js to its declaration once, for the reader and the apply's warning. - check:sim-cli-bundle builds its four findings through one helper.
08ba7f5 to
6eb65be
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Follow-ups from the workflows-as-code QA pass on the CLI, the SDK and the docs.
Publishing
publish-sim-clinow also watchestable-cells,workflow-code,workflow-sdk,workflow-typesandworkspace-code. The CLI bundles all five, but a change to only one of them used to republish nothing, so npm users kept the old offlinecheckand SDK types.THIRD_PARTY_LICENSESadds@babel/parser,@noble/hashesandzod. All three are MIT and newly bundled.check:sim-cli-bundle. It bundles the CLI's build entry points in memory with a metafile and fails when the license notices or the publish trigger paths disagree with what the bundle actually holds. Before these fixes it flagged exactly the 3 missing notices and 5 missing paths.package.jsonandbun.lockas earlier minor releases were.bump-npm-package-versionskeeps a manifest version that is higher than the latest published one. This release adds the source command family and changes the exit codes for 401 and 429 (13 and 9).generate:workflow-sdk-embedded-text/check:workflow-sdk-embedded-textpair, sobun run generateandcheck:auditspick it up.workspace-text.generated.tsjoins its three siblings in biome's ignore list, so the check compares the generator's own output byte for byte.Behaviour fixes (each with a test that fails on the old code)
workflows outlinewith--output text|tableprinted block ids as112f78c0 9170 4843 …. The contract now marks the outline's keys as data (dataKeys), and the renderer prints them as sent.tools/<key>.jsonce the server reprinted the tool asstored(), which destroyed the only local copy of the code. It now keeps the file, drops it from.sim/written.jsonand prints a warning, as workflow folders already do. A tool code file that its declaration does not name is no longer sent, just like an unnamed function file, so the next apply is not refused withE_TOOL_CODE.Docs
cli/scripting.mdxexit tables, checked againstsource-exit-codes.tsand each command's help:source getnow lists 10, 13, 130 and every cause of exit 1;--dir;statusandchecknow list exit 10.--yesand with no terminal to ask, apply and create print the plan and exit 14.CONFIRMATION_REQUIREDno longer exists.code.mdx: step 5 of the agent loop is back inside the ordered list.code.mdx,workspace-code.mdxand the audit-log page now document that apply and create send the gitHEADand theoriginURL (credentials stripped) asprovenance, and that the write's audit entry records them.http/client.ts: the TSDoc fortoRedirectErroris back abovetoRedirectError.Test plan
bun run type-check,bun run lint:check,bun run check:audits(70 audits),bun run check:cli-docscheck-block-registry.ts origin/stagingdataKeysflag, the tool-file keep, the unnamed-tool drop);check:sim-cli-bundlefails on staging's lists andcheck:workflow-sdk-embedded-textfails on an editedcore.d.ts