From a083891a0c8348984b8ca4c3bad5655e572cae4d Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Fri, 25 Sep 2026 00:48:24 +0000 Subject: [PATCH 1/2] refactor(routes): drop the complete Flight worker message Generated Flight workers have streamed chunk and end since #718. The production invocation host kept a complete branch for artifacts compiled before it, and the epoch store could restore one across a dev-server restart. Such an artifact now fails its render until the project rebuilds. --- .changeset/remove-legacy-route-shapes.md | 5 +++++ .../src/dev/routes/route-invocation-production.ts | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 .changeset/remove-legacy-route-shapes.md diff --git a/.changeset/remove-legacy-route-shapes.md b/.changeset/remove-legacy-route-shapes.md new file mode 100644 index 000000000..72ca44d62 --- /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. (#PR) 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; } From 271454ceef3e20134bcb7ba5f38b904a6ec41134 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Fri, 25 Sep 2026 00:48:55 +0000 Subject: [PATCH 2/2] docs(changeset): reference the pull request number --- .changeset/remove-legacy-route-shapes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/remove-legacy-route-shapes.md b/.changeset/remove-legacy-route-shapes.md index 72ca44d62..9f83be653 100644 --- a/.changeset/remove-legacy-route-shapes.md +++ b/.changeset/remove-legacy-route-shapes.md @@ -2,4 +2,4 @@ "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. (#PR) +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)