diff --git a/.changeset/remove-legacy-route-shapes.md b/.changeset/remove-legacy-route-shapes.md new file mode 100644 index 000000000..9f83be653 --- /dev/null +++ b/.changeset/remove-legacy-route-shapes.md @@ -0,0 +1,5 @@ +--- +"agent-bundle": minor +--- + +Drop the `complete` Flight worker message from the development server's production route invocation path. Generated workers have streamed `chunk` and `end` since #718, so an artifact compiled before that and restored from the epoch store now fails its render with `Compiled route worker failed.` instead of rendering one buffered document. Rebuild the project to restore rendering. (#838) diff --git a/packages/agent-bundle/src/dev/routes/route-invocation-production.ts b/packages/agent-bundle/src/dev/routes/route-invocation-production.ts index 3362bc93b..7dce4cf7b 100644 --- a/packages/agent-bundle/src/dev/routes/route-invocation-production.ts +++ b/packages/agent-bundle/src/dev/routes/route-invocation-production.ts @@ -68,7 +68,6 @@ interface WorkerMessage { readonly status?: 'failed' | 'mounted'; readonly type: | 'chunk' - | 'complete' | 'end' | 'error' | 'observed-handler' @@ -348,11 +347,7 @@ const streamFromWorker = ( } pending.delete(message.id); entry.dispatchSignal.removeEventListener('abort', entry.abort); - // `complete` is the whole render in one message from a Flight worker - // compiled before #718; the epoch store restores such artifacts across - // dev-server restarts until the project rebuilds. - if (message.type === 'complete' && message.bytes !== undefined) entry.controller.enqueue(message.bytes); - if (message.type === 'end' || message.type === 'complete') { + if (message.type === 'end') { entry.controller.close(); return; }