Repository navigation
fix: send the staging pinger with manual redirects - #678
Merged
Merged
Conversation
Cloudflare's runtime rejects redirect: "error" when it builds the Request, so every scheduled ping failed before reaching staging /health. Manual mode is accepted, and the existing response.ok check still fails the invocation on a 3xx response, now covered by its own test. Refs thomasluizon/orbit-tickets#1009 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the staging pinger’s redirect policy, regression tests, and deployment documentation.
- Manual redirects:
infra/workers/staging-pinger.mjsusesredirect: "manual", preserving the existing non-success rejection and failure logging without following redirects. - Regression coverage:
infra/staging-pinger.test.mjsasserts the exact redirect option and verifies that a 301 response rejects the invocation and retains its status in the failure log. - Documentation:
infra/README.mddescribes the manual redirect policy. All 34 infrastructure unit tests passed withnode --test infra/*.test.mjs; Cloudflare’s Request contract confirms that manual mode returns 3xx responses as-is. Live Worker deployment was not exercised.
openai/gpt-6.1-sol | 𝕏
|
This was referenced Oct 2, 2026
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.




Cloudflare's Workers runtime rejects
redirect: "error"when it constructs theRequest("Invalid redirect value, must be one of "follow" or "manual""), so every scheduled staging health ping would fail before it reachedhttps://api-staging.useorbit.org/health. Node'sRequest, which the unit tests use, accepts"error", which is why the suite stayed green.The Worker now sends
redirect: "manual". The existingresponse.okcheck already fails the invocation on any 3xx response, and a new test proves a redirect response fails the invocation instead of being followed.infra/README.mddescribes the behaviour.Found by Pullfrog on the redesign carry (#677, thread on
infra/workers/staging-pinger.mjs:29). By the carry rule, the fix lands onmainfirst and is cherry-picked into the carry.Refs thomasluizon/orbit-tickets#1009
Test evidence
redirect: "error"and the updated assertion,node --test infra/staging-pinger.test.mjs: 14 pass, 1 fail (the request option assertion).node --test infra/staging-pinger.test.mjs15 pass;node --test infra/*.test.mjs34 pass, 0 fail.Requestwith each redirect mode;manualwas accepted anderrorthrew before any network I/O.Assumptions
manualplus the existing non-success check is the correct way to refuse redirects at the edge, as the runtime's own error message recommends. Rejectedfollow, which would let a redirect hide an unhealthy staging host.Manual steps
None. The Worker is not deployed yet: its targeted apply still waits on Workers Scripts Edit for the Cloudflare token (#1009).
🤖 Generated with Claude Code