refactor(routes): drop the complete Flight worker message - #838
Conversation
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 detectedLatest commit: 52e88b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a083891a0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
The generated Flight worker has streamed its render as
chunkmessages followed byendsince #718. The dev server's production invocation host still carried acompletebranch that enqueued a whole buffered document and closed the stream, kept alive only for artifacts compiled before that change and restored from the epoch store across a dev-server restart. No current producer emits it, so the branch was unreachable for any artifact this repository builds. This removes the union member and both branches. An artifact that old now falls through to the terminal error path and fails its render withCompiled route worker failed.until the project rebuilds.Three further items from the same inventory are not in this PR. Each one's required edits land in files owned by the open PR #810 (
refactor: remove legacy API compatibility paths), so they are deferred rather than conflicted:CompiledAgentRoute.resultSchemaStaterequired needs hand-built route literals fixed intests/{route-graph,route-invocation-service,normalization,web-config,cli-routes,cli-projection}.test.ts.{ kind: 'resource' }for resource and App contract fixtures needspackages/agent-bundle/README.mdto stop documenting the bare{}form as accepted.before/preflighttrigger needsdocs/diagnostics.mdandtests/function-authoring.test.ts.Removal matrix
'complete'member of the FlightWorkerMessageunion insrc/dev/routes/route-invocation-production.tssrc/build/entry-shell.tsemits onlychunk,end,error,progress, and theobserved-*messages, andtests/entry-shell.test.tsalready pinsgeneratedRouteFlightWorkerSourceagainst emittingtype: 'complete'completeenqueue branch and the `endNo test asserted the removed branch, so none was deleted. The
'complete'AgentRenderEventthat route invocation publishes to consumers is a different type and is untouched.Blast Radius
One dev-server module on the compiled-artifact render path. A pre-#718 artifact surviving in an epoch store now fails closed with an error instead of rendering, which a rebuild fixes. Nothing on the build, install, or packed paths changes.
Verification
Run in a worktree at
origin/main(64492dd).pnpm buildpnpm typecheckpnpm lintpnpm test:unitpnpm test:integration:runpnpm docs:site:buildThe integration pool includes
route-invocation-dev-server.test.tsandroute-invocation-service.test.ts, which render compiled artifacts through this worker host over thechunk/endtransport.Follow-up
Codex P1 (docs for restored pre-#718 epochs) not changed, with this reason. The
'complete'Flight message was an internal dev worker protocol that no page documents. A stale pre-#718 dev epoch fails withCompiled route worker failed.until the next successful rebuild replaces it, which the changeset states. Recorded in #850.