feat(workers): preserve native deployments and exact plans - #33
Merged
Merged
Conversation
dxiongya
marked this pull request as ready for review
September 21, 2026 01:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wrangler imports and project deployment commands could lose framework build intent, misclassify generated metadata, and expose low-level Artifact primitives without a clear normal workflow. The deployment preview also depended on whatever output happened to exist locally, while
pushcould create a Worker or managed resources before discovering that the application build was invalid.This PR preserves native Wrangler packaging, keeps public
varsseparate from Secrets, and defines the normal flow asinit → plan → push → inspect → promote:workers planruns the configured local build with credential-shaped environment variables removed, validates the exact native Artifact and assets, then compares the desired project with live xAPI state without remote writes.workers pushuses the same preparation path before any Worker, budget, resource, Artifact, or Deployment mutation, presents the final plan, applies it, health-checks the public URL, and returns a read-only inspection.workers inspectaggregates Worker, environment, active Deployment and Artifact, routing, resources, Secret metadata, environment-scoped domains, and billing freshness. Optional read failures remainUNKNOWN; Secret values are excluded.--format jsonremains machine-readable.build/upload/deployprimitives.This complements xapi-backend #248/#250 and does not reimplement backend Artifact, static asset, Smart Placement, resource-location, or completeness-validation behavior. First-class
plain_textbindings and Worker-to-AI correlation tracing remain recorded as backend follow-up work.Validation:
bun install --frozen-lockfilebun run typecheckbun run buildbun run test— 527 passed, 0 failednpm pack --dry-run --ignore-scripts— 82 filesgit diff --checkcf65a-production-all-resources-20260918-v1with 23 rates, valid JSON stdout