Repository navigation
Add guarded standalone smoke Worker bootstrap - #12742
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Scope
This draft contains only the reviewed bootstrap files: the manual init workflow, the dependency-free bootstrap client, and its synthetic tests.
The workflow is restricted to the fixed repository and default
mainbranch, checks out exactlygithub.sha, and creates only the empty metadata object namedprivate-laptop-bridge-smoke. It never uploads code or changes deployments, routes, domains, workers.dev, previews, Gateway, or Worker settings. It verifies the returned Worker identity read-only and emits no account ID or credential values.The bootstrap checks full account identity and a protected full-account zone inventory, route absence, disabled subdomain/previews, no custom domains, no versions, and explicit empty deployment history. Only an exact fixed HTTPS Worker endpoint returning HTTP 404 with
success:false, a singleton numeric error code10007, and an absent/null result means the Worker is missing; the provider's prose message is deliberately ignored. Other 404 shapes, HTML, permission failures, wrong URLs, and ambiguous responses fail closed.Environment prerequisites
The
cloudflare-smoke-bootstrapGitHub environment, independent required reviewers, and main-only branch rules must be configured out of band. Required environment-only values are:CF_SMOKE_INIT_APPROVED_ACCOUNT_IDCF_SMOKE_INIT_EXPECTED_ZONE_IDS(complete account zone inventory as JSON)CF_SMOKE_INIT_WRITE_TOKEN(short-lived Workers Scripts Write for the one metadata create)CF_SMOKE_INIT_READ_TOKEN(Worker metadata/version/deployment reads, account-wide Zone Read, and Workers Metadata Read-only)No environment, secret, Cloudflare resource, or setting was accessed or changed, and no workflow was dispatched. This draft is intended to land first so the owner can perform the authorized init separately from the upload review.
Verification
node --test --test-reporter=spec pm-stack/private-laptop-bridge/bootstrap-smoke.test.mjs— 27/27 passed, including the provider's HTTP 404/code 10007 response with absent and null result, mismatched prose, string code, extra error, wrong response URL, non-worker 404, HTML, and authorization-denial cases.git diff --checkpassed.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.