Skip to content

fix(sim-cli): publish when bundled packages change, complete third-party licenses, and fix docs drift - #10279

Merged
waleedlatif1 merged 9 commits into
stagingfrom
fix/sim-cli-qa6-publish-docs
Nov 21, 2026
Merged

waleedlatif1 merged 9 commits into
stagingfrom
fix/sim-cli-qa6-publish-docs

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Follow-ups from the workflows-as-code QA pass on the CLI, the SDK and the docs.

Publishing

  • publish-sim-cli now also watches table-cells, workflow-code, workflow-sdk, workflow-types and workspace-code. The CLI bundles all five, but a change to only one of them used to republish nothing, so npm users kept the old offline check and SDK types.
  • THIRD_PARTY_LICENSES adds @babel/parser, @noble/hashes and zod. All three are MIT and newly bundled.
  • New audit 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.
  • sim-cli goes to 2.3.0, set by hand in package.json and bun.lock as earlier minor releases were. bump-npm-package-versions keeps 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).
  • The workflow-sdk embedded-text generator becomes the generate:workflow-sdk-embedded-text / check:workflow-sdk-embedded-text pair, so bun run generate and check:audits pick it up. 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.

Behaviour fixes (each with a test that fails on the old code)

  • workflows outline with --output text|table printed block ids as 112f78c0 9170 4843 …. The contract now marks the outline's keys as data (dataKeys), and the renderer prints them as sent.
  • A workspace apply deleted a user-written tools/<key>.js once the server reprinted the tool as stored(), which destroyed the only local copy of the code. It now keeps the file, drops it from .sim/written.json and 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 with E_TOOL_CODE.

Docs

  • cli/scripting.mdx exit tables, checked against source-exit-codes.ts and each command's help:
    • source get now lists 10, 13, 130 and every cause of exit 1;
    • exit 10 for apply/create now covers any directory, since every source write locks --dir;
    • workspace status and check now list exit 10.
  • workflow-sdk README: without --yes and with no terminal to ask, apply and create print the plan and exit 14. CONFIRMATION_REQUIRED no longer exists.
  • code.mdx: step 5 of the agent loop is back inside the ordered list.
  • code.mdx, workspace-code.mdx and the audit-log page now document that apply and create send the git HEAD and the origin URL (credentials stripped) as provenance, and that the write's audit entry records them.
  • http/client.ts: the TSDoc for toRedirectError is back above toRedirectError.

Test plan

  • bun run type-check, bun run lint:check, bun run check:audits (70 audits), bun run check:cli-docs
  • sim-cli lint, type-check and tests (1033), workflow-sdk lint, type-check and tests, apps/docs lint, type-check and tests
  • check-block-registry.ts origin/staging
  • Red→green: reverting each guard turns its test red (the outline dataKeys flag, the tool-file keep, the unnamed-tool drop); check:sim-cli-bundle fails on staging's lists and check:workflow-sdk-embedded-text fails on an edited core.d.ts

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner November 21, 2026 08:50
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 21, 2026 10:39am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issues were found.

Summary

Updates CLI publishing, bundle checks, source-file preservation, and docs.

  • Workspace apply keeps tool code files that declarations no longer name.
  • Workflow outlines print block IDs exactly as the API sends them.
  • Bundled package changes can trigger a CLI release and are checked against the bundle.
  • Workflow-SDK embedded text has paired commands to generate and check its output.
  • CLI source guides explain exit codes, confirmation plans, and git provenance.

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

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 22 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/publish-sim-cli.yml Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

@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 cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 22 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

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.
@waleedlatif1
waleedlatif1 force-pushed the fix/sim-cli-qa6-publish-docs branch from 08ba7f5 to 6eb65be Compare November 21, 2026 10:34
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

@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 cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 22 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 8bc0ce2 into staging Nov 21, 2026
100 checks passed

This branch was successfully deployed

1 active deployment
Preview — 6eb65beb Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant