Skip to content

Prevent large run output from blocking the queue - #159

Merged
asselstine merged 1 commit into
mainfrom
fix/large-run-output-queue
Sep 18, 2026
Merged

asselstine merged 1 commit into
mainfrom
fix/large-run-output-queue

Conversation

@asselstine

Copy link
Copy Markdown
Collaborator

Summary

  • encode large byte arrays in bounded chunks so transcript encryption cannot overflow the JavaScript argument stack
  • isolate cleanup, polling, and launch failures per run so one broken run cannot starve the durable queue
  • add regression coverage for multi-megabyte Unicode transcripts and alarm batch continuation

Production failure

A completed run with a large transcript caused String.fromCharCode(...value) to throw RangeError: Maximum call stack size exceeded during encryption. The Durable Object alarm failed during polling before it reached queued work, leaving later runs queued despite available capacity.

Verification

  • npm run check in packages/app
  • 148 unit tests passed
  • 7 end-to-end tests passed
  • TypeScript check passed
  • Cloudflare Worker deployment dry-run passed
  • git diff --check passed

@github-actions
github-actions Bot enabled auto-merge September 18, 2026 01:30
@asselstine
asselstine disabled auto-merge September 18, 2026 01:33
@asselstine
asselstine added this pull request to the merge queue Sep 18, 2026
Merged via the queue into main with commit 236e7f0 Sep 18, 2026
2 checks passed
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