Skip to content

Clarify core runtime comments and compression terminology - #3111

Merged
NathanColosimo merged 2 commits into
mainfrom
codex/runtime-comment-cleanup
Jul 27, 2026
Merged

Clarify core runtime comments and compression terminology#3111
NathanColosimo merged 2 commits into
mainfrom
codex/runtime-comment-cleanup

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

What

  • remove historical narration from the core replay/runtime comments
  • keep concise comments for current determinism, ordering, cancellation, and retry invariants
  • correct compression terminology across core/world code: zstd is preferred, gzip is the portable fallback

Why

Several comments described how the runtime evolved rather than what the current code requires, and some still described compression as gzip-only. That made the most complex code harder to read and occasionally misleading.

Impact

Documentation-only source changes; runtime behavior is unchanged.

Verification

  • pnpm --filter @workflow/core... build
  • pnpm --filter @workflow/core typecheck
  • pnpm --filter @workflow/world-vercel typecheck
  • pnpm --filter @workflow/world exec vitest run src/spec-version.test.ts (5 passed)
  • focused Biome checks and git diff --check

@changeset-bot

changeset-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 85d151a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@workflow/core Patch
@workflow/world Patch
@workflow/world-vercel Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
workflow Patch
@workflow/world-testing Patch
@workflow/world-local Patch
@workflow/world-postgres Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/nuxt Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jul 27, 2026 5:13pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jul 27, 2026 5:13pm
example-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-astro-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-express-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-fastify-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-hono-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-nestjs-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-nitro-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workbench-vite-workflow Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jul 27, 2026 5:13pm
workflow-swc-playground Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workflow-tarballs Ready Ready Preview, Comment Jul 27, 2026 5:13pm
workflow-web Ready Ready Preview, Comment Jul 27, 2026 5:13pm

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

E2E Test Summary

Summary
Passed Failed Skipped Total
✅ ▲ Vercel Production 1455 0 239 1694
✅ 💻 Local Development 1621 0 227 1848
✅ 📦 Local Production 1621 0 227 1848
✅ 🐘 Local Postgres 1621 0 227 1848
✅ 🪟 Windows 154 0 0 154
✅ 📋 Other 1020 0 212 1232
✅ vercel-multi-region 27 0 0 27
Total 7519 0 1132 8651
Details by Category

✅ ▲ Vercel Production

App Passed Failed Skipped
✅ astro 126 0 28
✅ example 126 0 28
✅ express 126 0 28
✅ fastify 126 0 28
✅ hono 126 0 28
✅ nextjs-turbopack 151 0 3
✅ nextjs-webpack 151 0 3
✅ nitro 126 0 28
✅ nuxt 126 0 28
✅ sveltekit 145 0 9
✅ vite 126 0 28

✅ 💻 Local Development

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 📦 Local Production

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 🐘 Local Postgres

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 🪟 Windows

App Passed Failed Skipped
✅ nextjs-turbopack 154 0 0

✅ 📋 Other

App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 128 0 26
✅ e2e-local-dev-tanstack-start- 128 0 26
✅ e2e-local-postgres-nest-stable 128 0 26
✅ e2e-local-postgres-tanstack-start- 128 0 26
✅ e2e-local-prod-nest-stable 128 0 26
✅ e2e-local-prod-tanstack-start- 128 0 26
✅ e2e-vercel-prod-nest 126 0 28
✅ e2e-vercel-prod-tanstack-start 126 0 28

✅ vercel-multi-region

App Passed Failed Skipped
✅ nextjs-turbopack 27 0 0

📋 View full workflow run

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

📊 Workflow Benchmarks

commit 85d151a · Mon, 27 Jul 2026 17:33:33 GMT · run logs

Backend: vercel · app: nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 1309 (+36%) 🔻 1427 🔴 (+23%) 🔻 1477 🔴 (+24%) 🔻 1538 🔴 (+2.7%) 30
TTFS stream 426 (+48%) 🔻 1429 🔴 (+21%) 🔻 1493 🔴 (+22%) 🔻 1531 🔴 (+12%) 30
TTFS hook + stream 1244 (-4.9%) 1717 🔴 (+9.8%) 1827 🔴 (+11%) 2628 🔴 (+50%) 🔻 30
STSO 1020 steps (1-20) 193 (+2.7%) 358 🔴 (+17%) 🔻 457 🔴 (+21%) 🔻 631 🔴 (+65%) 🔻 19
STSO 1020 steps (101-120) 191 (-5.0%) 250 🔴 (-15%) 277 🔴 (-24%) 💚 308 🔴 (-20%) 💚 19
STSO 1020 steps (1001-1020) 466 (-10%) 566 🔴 (-11%) 668 🔴 (+0.6%) 709 🔴 (-14%) 19
WO 1020 steps 404108 (-9.1%) 404108 (-9.1%) 404108 (-9.1%) 404108 (-9.1%) 1
SL stream latency 105 (-3.7%) 163 🔴 (-66%) 💚 203 🔴 (-72%) 💚 255 🔴 (-77%) 💚 30
SO stream overhead (text) 133 (-0.7%) 219 (-9.5%) 273 (-12%) 310 (-44%) 💚 30
SO stream overhead (structured) 125 (-6.0%) 218 (-11%) 249 (-16%) 💚 296 (-34%) 💚 30
📜 Previous results (1)

ceac800

Sat, 25 Jul 2026 01:01:29 GMT · run logs

vercel / nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 218 (-70%) 💚 1261 🔴 (+21%) 🔻 1303 🔴 (+18%) 🔻 1352 🔴 (+17%) 🔻 30
TTFS stream 216 (-78%) 💚 1276 🔴 (+18%) 🔻 1332 🔴 (+15%) 🔻 1381 🔴 (+7.8%) 30
TTFS hook + stream 389 (-69%) 💚 1474 🔴 (+4.8%) 1488 🔴 (+2.7%) 1647 🔴 (-1.7%) 30
STSO 1020 steps (1-20) 168 (-16%) 💚 235 🔴 (-15%) 299 🔴 (-13%) 325 🔴 (-16%) 💚 19
STSO 1020 steps (101-120) 173 (-20%) 💚 236 🔴 (-16%) 💚 357 🔴 (+20%) 🔻 381 🔴 (+1.1%) 19
STSO 1020 steps (1001-1020) 484 (-1.0%) 573 🔴 (+2.3%) 689 🔴 (+16%) 🔻 746 🔴 (+23%) 🔻 19
WO 1020 steps 394846 (-4.3%) 394846 (-4.3%) 394846 (-4.3%) 394846 (-4.3%) 1
SL stream latency 85 (-14%) 151 🔴 (+15%) 🔻 167 🔴 (+13%) 403 🔴 (+94%) 🔻 30
SO stream overhead (text) 122 (-6.2%) 253 🔴 (+17%) 🔻 304 (+24%) 🔻 482 (+79%) 🔻 30
SO stream overhead (structured) 118 (-16%) 💚 191 (-14%) 217 (-13%) 480 (-31%) 💚 30
ℹ️ Metric definitions & methodology

Best/P75/P90/P99 deltas compare against the most recent benchmark run on main at the time of this run. 🔻 flags a delta worse than +15%, 💚 one better than −15%.

Metrics — TTFS: time to first step body (in-deployment start() → first step body, deployment clocks) · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (whole-run time outside step bodies, in-deployment anchored) · SL: stream latency (in-deployment write → read propagation, readAt - writtenAt) · SO: stream overhead (end-to-end write+consume time beyond the modelled generation window)

Scenarios — step: one trivial no-op step, no stream; no hooks, so the run stays in turbo mode (in-process fast path) · stream: one streaming step; no hooks, so the run stays in turbo mode (in-process fast path) · hook + stream: registers a hook before one step, which exits turbo mode (dispatch path) · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges, and WO is the whole-run overhead outside step bodies · stream latency: parallel reader/writer steps on a dedicated stream; SL is the in-deployment write->read propagation (readAt - writtenAt) · stream overhead (text): writer streams 300 variable-length text token deltas paced at 100/s for 3s (a haiku-size LLM's token throughput) while a parallel reader drains the whole stream; SO is the end-to-end write+consume time beyond the 3s generation window (overhead/backpressure) · stream overhead (structured): same workload as stream overhead (text), but each delta is an AI-SDK-style structured object ({ type: 'text-delta', id, text }) instead of a raw string, so the SO gap vs the text scenario is the added serialization cost

🔴 marks a percentile over its target (within target is left unmarked). Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · SO 250/500/1000 · STSO (1-20) 20/30/60 · STSO (101-120) 30/45/90 · STSO (1001-1020) 40/60/120

All metrics are measured from deployment-side timestamps only. Runs are triggered by an in-deployment route that stamps the anchor (clientStart) right before start(), so the CI runner’s request and its path through api.vercel.com sit outside every measured window. TTFS = in-deployment start() → first step body (turbo uses the in-process fast path, non-turbo the dispatch path), and includes the VQS dispatch hop plus any /flow cold start. STSO/WO are measured between step bodies on the deployment. SL is measured inside the workflow (parallel reader/writer steps), so it no longer includes the api.vercel.com read path.

Cold starts are kept in the numbers on purpose — they are part of real bursty-workload latency. The workbench deployment cold-starts the /flow invocation for a large fraction of runs, inflating P75+; the Best column shows the fastest (warm-start) sample for comparison.

@NathanColosimo
NathanColosimo marked this pull request as ready for review July 27, 2026 16:58
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code owners July 27, 2026 16:58
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 27, 2026 17:17
@NathanColosimo
NathanColosimo merged commit 8c12358 into main Jul 27, 2026
310 of 318 checks passed
@NathanColosimo
NathanColosimo deleted the codex/runtime-comment-cleanup branch July 27, 2026 18:17
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 8c12358 (AI decision).

This is a comment-only cleanup that rewords existing source comments; it fixes no user-visible defect and changes no runtime behavior, so it does not qualify as a stability fix for the maintenance line. Much of it also describes main-only code: packages/core/src/serialization/codec.ts and packages/core/src/runtime/step-executor.ts do not exist on stable, and packages/world/src/spec-version.ts there tops out at SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT (3) with no SPEC_VERSION_SUPPORTS_COMPRESSION, so the zstd/gzip terminology corrections have no counterpart on stable.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

8c12358075897ef1fdcc4ce3847579df63c8ca7a

pranaygp added a commit that referenced this pull request Jul 27, 2026
* origin/main:
  Prewarm only appended replay payloads (#3131)
  feat: publish each run's X25519 public key on the run entity (#3095)
  feat(core): route sealed envelopes through the serialization layer (#3094)
  docs: redirect retired migration-guides URLs to comparisons (#3127)
  feat(core): add `encp` sealed-box encryption primitive (#3093)
  chore(core): clarify runtime comments (#3111)
  Remove obsolete world factory aliases (#3112)
  feat(core): deterministic sandbox hardening (#3045)
pranaygp added a commit that referenced this pull request Jul 28, 2026
…ry-2

* origin/main: (292 commits)
  feat(core): seal forwarded stream writes to the owner's public key (#3098)
  feat(core): seal hook payloads to the target run's public key (#3096)
  [e2e] Rebuild the event-log corruption repro around step-count divergence (#3147)
  feat: decrypt sealed payloads in the dashboard and CLI (#3146)
  Prewarm only appended replay payloads (#3131)
  feat: publish each run's X25519 public key on the run entity (#3095)
  feat(core): route sealed envelopes through the serialization layer (#3094)
  docs: redirect retired migration-guides URLs to comparisons (#3127)
  feat(core): add `encp` sealed-box encryption primitive (#3093)
  chore(core): clarify runtime comments (#3111)
  Remove obsolete world factory aliases (#3112)
  feat(core): deterministic sandbox hardening (#3045)
  Remove retired v1 step route plumbing (#3061)
  [core] Don't count racing invocations' duplicate step_started events toward the maxRetries ceiling (#3069)
  [world-testing] Isolate each spawned test server's data directory (#3055)
  fix: upgrade postcss to >=8.5.18 to address GHSA-r28c-9q8g-f849 (#3102)
  [next] Respect .gitignore in dev watcher to avoid EMFILE on large monorepos (#3085)
  [ci] Backport only stability fixes to `stable`, default to claude-opus-5 (#3092)
  perf(core): immediate leading-edge dispatch for idle streams (flush window default 0) (#3088)
  Optimize `processImportSpecifier` by computing `shouldFollowImportsFromFile` once per file (#3052)
  ...

# Conflicts:
#	docs/components/geistdocs/desktop-menu.tsx
#	docs/components/geistdocs/mobile-menu.tsx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/upgrading-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/agent-cancellation.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/human-in-the-loop.mdx
#	docs/content/docs/v5/cookbook/common-patterns/batching.mdx
#	docs/content/docs/v5/cookbook/common-patterns/idempotency.mdx
#	docs/content/docs/v5/cookbook/common-patterns/rate-limiting.mdx
#	docs/content/docs/v5/cookbook/common-patterns/saga.mdx
#	docs/content/docs/v5/cookbook/common-patterns/scheduling.mdx
#	docs/content/docs/v5/cookbook/common-patterns/sequential-and-parallel.mdx
#	docs/content/docs/v5/cookbook/common-patterns/timeouts.mdx
#	docs/content/docs/v5/cookbook/common-patterns/webhooks.mdx
#	docs/content/docs/v5/cookbook/common-patterns/workflow-composition.mdx
#	docs/content/docs/v5/cookbook/index.mdx
#	docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx
#	docs/content/docs/v5/cookbook/integrations/chat-sdk.mdx
#	docs/content/docs/v5/cookbook/integrations/sandbox.mdx
#	docs/next.config.ts
#	docs/proxy.ts
#	docs/scripts/lint.ts
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
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.

2 participants