Skip to content

refactor(routes): drop the complete Flight worker message - #838

Merged
ScriptedAlchemy merged 3 commits into
mainfrom
legacy/routes
Sep 25, 2026
Merged

ScriptedAlchemy merged 3 commits into
mainfrom
legacy/routes

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

The generated Flight worker has streamed its render as chunk messages followed by end since #718. The dev server's production invocation host still carried a complete branch 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 with Compiled 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:

  • Making CompiledAgentRoute.resultSchemaState required needs hand-built route literals fixed in tests/{route-graph,route-invocation-service,normalization,web-config,cli-routes,cli-projection}.test.ts.
  • Requiring { kind: 'resource' } for resource and App contract fixtures needs packages/agent-bundle/README.md to stop documenting the bare {} form as accepted.
  • Deleting the AB4840 before/preflight trigger needs docs/diagnostics.md and tests/function-authoring.test.ts.

Removal matrix

Removed Callers migrated Deleted surface
'complete' member of the Flight WorkerMessage union in src/dev/routes/route-invocation-production.ts None. src/build/entry-shell.ts emits only chunk, end, error, progress, and the observed-* messages, and tests/entry-shell.test.ts already pins generatedRouteFlightWorkerSource against emitting type: 'complete' The complete enqueue branch and the `end

No test asserted the removed branch, so none was deleted. The 'complete' AgentRenderEvent that 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).

Command Result
pnpm build pass
pnpm typecheck pass
pnpm lint pass, 1518 files, 88 rules
pnpm test:unit pass, 311 files, 4494 tests, 4488 passed, 6 skipped, 0 failed
pnpm test:integration:run pass, 104 files, 1187 tests, 1183 passed, 4 skipped, 0 failed
pnpm docs:site:build pass, language parity checked, 0 broken links over 30551 anchors

The integration pool includes route-invocation-dev-server.test.ts and route-invocation-service.test.ts, which render compiled artifacts through this worker host over the chunk/end transport.

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 with Compiled route worker failed. until the next successful rebuild replaces it, which the changeset states. Recorded in #850.

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-bot

changeset-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 52e88b6

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

This PR includes changesets to release 2 packages
Name Type
agent-bundle Minor
create-agent-bundle 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T00:51:01.372760Z a083891 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .changeset/remove-legacy-route-shapes.md Outdated
@ScriptedAlchemy
ScriptedAlchemy merged commit b9fbc2e into main Sep 25, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 25, 2026
@ScriptedAlchemy
ScriptedAlchemy deleted the legacy/routes branch September 25, 2026 03:51
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