Title: pkarr-worker(deploy): workerExists() treats any cf error as 'worker does not exist' — a transient/auth probe failure silently reroutes a standard deploy into the bootstrap cf deploy path · Issue #4865 · developing-today/code · GitHub
Open Graph Title: pkarr-worker(deploy): workerExists() treats any cf error as 'worker does not exist' — a transient/auth probe failure silently reroutes a standard deploy into the bootstrap cf deploy path · Issue #4865 · developing-today/code
X Title: pkarr-worker(deploy): workerExists() treats any cf error as 'worker does not exist' — a transient/auth probe failure silently reroutes a standard deploy into the bootstrap cf deploy path · Issue #4865 · developing-today/code
Description: Finding pkgs/pkarr-worker/deploy.mjs's workerExists() treats any failure of cf workers get pkarr as "the Worker does not exist": // current main (eefeab5af), pkgs/pkarr-worker/deploy.mjs:130-142 function workerExists() { try { execFileSy...
Open Graph Description: Finding pkgs/pkarr-worker/deploy.mjs's workerExists() treats any failure of cf workers get pkarr as "the Worker does not exist": // current main (eefeab5af), pkgs/pkarr-worker/deploy.mjs:130-142 fu...
X Description: Finding pkgs/pkarr-worker/deploy.mjs's workerExists() treats any failure of cf workers get pkarr as "the Worker does not exist": // current main (eefeab5af), pkgs/pkarr-worker/deploy....
Opengraph URL: https://github.com/developing-today/code/issues/4865
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pkarr-worker(deploy): workerExists() treats any cf error as 'worker does not exist' — a transient/auth probe failure silently reroutes a standard deploy into the bootstrap cf deploy path","articleBody":"## Finding\n\n`pkgs/pkarr-worker/deploy.mjs`'s `workerExists()` treats **any** failure of `cf workers get pkarr` as \"the Worker does not exist\":\n\n```js\n// current main (eefeab5af), pkgs/pkarr-worker/deploy.mjs:130-142\nfunction workerExists() {\n try {\n execFileSync(\"cf\", [\"-q\", \"workers\", \"get\", WORKER], { ... });\n return true;\n } catch {\n return false;\n }\n}\n```\n\nand the caller (deploy.mjs:85) routes on that boolean:\n\n```js\nconst bootstrapping = !workerExists();\n```\n\n## Evidence\n\n- Introduced by PR #3241 (merged, merge commit fdd8811ad, verified an ancestor of current main) — \"fix(pkarr): bootstrap a brand-new Worker via cf deploy (#1829)\". Its purpose was only the genuinely-new-Worker case: `cf workers versions create` refuses to create a brand-new Worker.\n- Verified on current main `eefeab5af648ac612899c65a4c575c20808ef0e1` via two independent contents-API reads: the catch-all `catch { return false; }` is unchanged, and stderr is piped away (`stdio: [\"inherit\", \"pipe\", \"pipe\"]`), so nothing distinguishes a not-found response from an auth failure, a network error, a rate limit, or a broken `cf` install.\n\n## Why it matters\n\nWhen the Worker **does** exist but the probe fails for any transient reason (expired/insufficient token, Cloudflare API blip, network error), the script silently takes the bootstrap path and runs `cf deploy`, which uploads **and deploys at 100% immediately** — bypassing the deployment standard's versions flow (`versions create` → `?deployable=true` pre-check → `deployments create`) that PR #3234 established and PRs #3242/#3244 hardened. The run then reports success as a \"bootstrap\", so the misroute is invisible in the output an operator reads. A probe error should be a stop, not a silent change of deploy mechanism.\n\nRelated but distinct from the already-filed deploy.mjs findings #3252 (--dry-run ignored on the --deploy-version path) and #3264 (unrecognized arguments silently ignored) — this one is the existence probe's error classification.\n\n## Acceptance criteria\n\n- [ ] `workerExists()` (or its replacement) returns \"does not exist\" only for the actual not-found response from `cf workers get`; any other failure (non-not-found exit, spawn error) aborts the deploy with the cf error visible.\n- [ ] The bootstrap `cf deploy` path is unreachable when the existence probe errored for a reason other than not-found.\n- [ ] A probe/dry-run demonstration: simulated not-found → bootstrap path chosen; simulated auth/network failure → deploy refuses before uploading anything.\n- [ ] The genuinely-new-Worker bootstrap from PR #3241 still works unchanged.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-03T11:30:50Z","url":"https://github.com/developing-today/code/issues/4865"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6e1cce2a-7847-c3be-27d2-0cdafc28c065 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 808E:2E0249:CC28B2:108C8EB:6B064243 |
| html-safe-nonce | 12175009bedc3a14b30887df37cbb20f655928a6e0bf5d008d32347c7be707ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDhFOjJFMDI0OTpDQzI4QjI6MTA4QzhFQjo2QjA2NDI0MyIsInZpc2l0b3JfaWQiOiIxNjQzNjA0OTA3MDM2OTE4MzQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ca6b9773d50fe3f991674a2a87e248e18fa247ab331a464647e3416338280e25 |
| hovercard-subject-tag | issue:6181676718 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/4865/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6ecd722b440172ebc7f927a7d9d965f7745315312d6b43cc5cb2aa9f688bcd97/developing-today/code/issues/4865 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6ecd722b440172ebc7f927a7d9d965f7745315312d6b43cc5cb2aa9f688bcd97/developing-today/code/issues/4865 |
| og:image:alt | Finding pkgs/pkarr-worker/deploy.mjs's workerExists() treats any failure of cf workers get pkarr as "the Worker does not exist": // current main (eefeab5af), pkgs/pkarr-worker/deploy.mjs:130-142 fu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac613d3698d3d8565651455086e1f74da07bf277 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width