Skip to content

improvement(workflow-code): clean slate for workflows and workspace as code - #10344

Merged
waleedlatif1 merged 7 commits into
stagingfrom
improvement/workflow-code-clean-slate
Nov 23, 2026
Merged

waleedlatif1 merged 7 commits into
stagingfrom
improvement/workflow-code-clean-slate

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Workflows and workspace as code are not rolled out, so this removes every compat path the feature kept for its own earlier shapes. Readers of users' stored canvas data (legacy block types, stored encodings, name-collision keys, raw handles) stay.

  • Removed:
    • version-less .sim/base.json, and the lock/base "upgrade" seams with nothing to upgrade;
    • numeric blob rev;
    • the SDK-major floor: E_SDK_MAJOR_OLD and OLDEST_SDK_MAJOR are gone, and any major other than the server's is E_SDK_MAJOR;
    • status retrying a 404 plan read as an apply dry run;
    • the client recomputing a dry run's refusal when the server omits refuses;
    • catalog caches and folder written.json records left by an older CLI;
    • old-server defaults for the resources sections;
    • get --primer. The primer is already the top of .sim/AGENTS.md; create's starter still prints it.
  • Catalog-level mayBeText: set on block output definitions (Function result, API data) and projected through the catalog. It replaces the TEXT_CAPABLE_OUTPUTS map in json-fields.ts.
  • The server names the paused run:
    • Execute, resume and run reads carry paused.runId, the run the pause is recorded under. For a resumed run that pauses again, that is the run it resumed, not the attempt's id.
    • Execute and resume also carry paused.points.
    • The CLI's next and runs wait build runs resume from those fields instead of searching output markers. The id validation and shell quoting are kept.
  • lookup-order sample: the OpenAPI example and fixtures now pair key lookup-order with a title that derives it (Lookup order).
  • table('daily_totals') vs key daily-totals: no extra resolution path.
    • tsc names the valid key: not assignable to parameter of type '"daily-totals"'.
    • check/apply hints Did you mean daily-totals?
  • Kept:
    • --full on source params, a real detail level;
    • the /workflows/workspace-code docs redirect, because that page shipped on the docs site;
    • the CLI's SDK-major equality guard;
    • x- extension fields.
  • Regenerated OpenAPI, the CLI API types, MCP operations, the CLI docs, the workflow-code docs and the SDK fixture catalog.

Type of Change

  • Improvement

Testing

  • Each behaviour change has a test that fails against the pre-change file:
    • the base version and blob rev;
    • the SDK major (0 and 2);
    • the plan-read single request;
    • refusal from refuses only (exit 15 vs 6);
    • the ignored folder record;
    • the paused field on the execute, resume and run routes;
    • the CLI resume command from paused.runId;
    • mayBeText against the real catalog.
  • New proof in apply-workflow-source.runtime.integration.ts on real Postgres: a resumed run pauses at a second human block, the resume names the original run, and resuming through it completes the run. It is red when the resume attempt's id is named instead.
  • The package suites pass: workflow-code, workspace-code, workflow-sdk, sim-cli, table-cells, workflow-persistence and utils.
  • apps/sim units, realtime units, apps/sim integration (both DB modes) and realtime integration all pass.
  • test:scripts, goldens, check:audits, check:test-types, check:migrations, docs compatibility, lint, root type-check, and check-block-registry.ts origin/staging all pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 23, 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 23, 2026 9:12pm UTC

Request Review

@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 82 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

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Removes compatibility paths for workflows and workspaces as code and makes the server name the run to resume.

  • Paused runs now name the run and points that can be resumed.
  • Source tools now require current versioned file shapes and use fewer compatibility paths.
  • Workflow source recognizes catalog outputs that can contain text.
  • Workflow code points out the listed key when a table name does not match.

The earlier timed-pause finding is fixed: the CLI prints commands only for waiting human pauses. Checks in this review were static; no tests were run.

Diagram

sequenceDiagram
  participant CLI
  participant API
  participant Run as Original run
  CLI->>API: Resume a human pause
  API->>Run: Continue the saved run
  Run-->>API: Pauses again
  API-->>CLI: Attempt runId and paused.runId
  CLI->>API: Resume paused.runId with contextId
Loading

Reviews (2) · Last reviewed commit: "test(workflow-code): version the Code ta..." · Reviewed by Greptile

…s code

Remove the feature's own compatibility paths now that nothing depends on them:
version-less bases and the lock/base upgrade seams, numeric blob revs, the
SDK-major floor (E_SDK_MAJOR_OLD), the plan-read dry-run fallback, the
client-side refuses fallback, older-CLI catalog caches and folder records,
old-server resource defaults, and get --primer.

Declare mayBeText on block outputs (Function result, API data) and read it
through the catalog in place of TEXT_CAPABLE_OUTPUTS. Name the run a pause is
recorded under in paused.runId on execute, resume and run reads, and build the
CLI resume command from it instead of searching output markers. Fix the stale
lookup-order sample.
…nd simplify the clean-slate removals

Execute and resume both return the run's pause through runPauseOf, the one rule
for the run a pause is recorded under, and present it through one presenter.
The primer rides only on the create scaffold, refusesApply is inlined, and the
remaining unversioned base fixtures carry version 1.
…run it resumed

Extend the runtime integration with a second human block, and tighten the
cleanup-audited tests so each can fail.
@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 23, 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 88 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 b627a8b into staging Nov 23, 2026
87 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/workflow-code-clean-slate branch November 23, 2026 21:23

This branch was successfully deployed

1 active deployment
Preview — c2b644b9 Deployed Nov 23, 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