Skip to content

feat: migrate workflow-agents to Render SDK 1.0.0 - #7

Open
Ho1yShif wants to merge 4 commits into
render-examples:mainfrom
Ho1yShif:main
Open

feat: migrate workflow-agents to Render SDK 1.0.0#7
Ho1yShif wants to merge 4 commits into
render-examples:mainfrom
Ho1yShif:main

Conversation

@Ho1yShif

Copy link
Copy Markdown

Bumps @renderinc/sdk to 1.0.0 and migrates to the new task API.

API changes

  • Every task handler takes a TaskContext as its first parameter.
  • task() returns a { name, func } definition instead of a callable. Subtasks now run through ctx.run(definition, ...args).
  • Retry config moved to retry: { maxRetries, waitDurationMs, backoffScaling }.

loader.ts needed the most work. Auto-discovery matched exported functions, which finds nothing now, so it checks for the definition shape instead. It also exports a localTaskContext whose run calls the target's func directly, which is how the in-process dev mode and the tests execute a workflow without a Render environment.

Also condenses the ASCII-box comment blocks to plain comments.

dev:workflows fix

npm run dev:workflows failed with start command exited before registering tasks. render workflows dev re-runs its start command for every task run, and the script pointed it at the gateway, which binds port 3000 on each of those runs. The start command is now the task-only entry (npm run start:workflow) and the gateway runs alongside it via scripts/dev-workflows.sh, reaching the task server over RENDER_LOCAL_DEV_URL.

This is independent of the SDK bump. I could not tell whether it broke on a CLI upgrade or was already broken.

Docs mismatch

The workflows-defining preview docs list retries: { maxAttempts, initialDelaySeconds } and instanceType. Shipped 1.0.0 RegisterTaskOptions declares retry: { maxRetries, waitDurationMs, backoffScaling } and plan. I used the names that compile.

Verification

Typecheck passes. 55 of 56 tests pass, with the Redis-dependent queue test skipped as before.

Ran against the local task server in both gateway dispatch modes. The task-run graph confirms real subtask dispatch: security and performance start 1ms apart under the code-review parent, judge waits for both, and ux is correctly absent on a PR with no frontend files. Running ux directly with a CSS patch confirms it works under the new signature.

🤖 Generated with Claude Code

Ho1yShif and others added 4 commits August 21, 2026 14:30
task() now takes a TaskContext as its first parameter and returns a
TaskDefinition instead of a callable, so subtasks run through ctx.run().

The loader matched exported functions and had nothing to call for in-process
dispatch, so it now matches the {name, func} shape and supplies a local
context that runs the graph inline.

Also fixes dev:workflows. The CLI re-runs its start command for every task
run, so pointing it at the gateway made each run try to bind port 3000 and
fail. The start command is now the task-only entry, with the gateway running
alongside it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Migrate workflow-agents to Render SDK 1.0.0
Same content as plain comments. The workshop's teaching notes stay; only the
borders and their padding go.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Condense the ASCII-box comment blocks
@Ho1yShif Ho1yShif changed the title Migrate workflow-agents to Render SDK 1.0.0 feat: migrate workflow-agents to Render SDK 1.0.0 Aug 21, 2026
@Ho1yShif
Ho1yShif requested review from R4ph-t and jacobprall and removed request for R4ph-t and jacobprall August 21, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant