Repository navigation
ci(router): deploy the router only after this commit's web deploy succeeds - #154
Conversation
…ceeds The router rewrites public paths onto web pages (arelay.to/<handle> -> /u/<handle>). When #150 merged, Deploy Router finished first and arelay.to/agent-relay returned 404 for ~10 minutes until Deploy Web caught up. The router job now waits (up to 40 min) for Deploy Web (Cloudflare) on the same commit and refuses to deploy if it failed. Manual dispatch is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe router deployment workflow now waits for the web deployment run for the same commit on push events. It continues after success and fails if the run completes unsuccessfully or the wait times out. ChangesRouter deployment gate
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant RouterWorkflow
participant GitHubActionsAPI
participant WebDeployment
RouterWorkflow->>GitHubActionsAPI: Look up web deployment run for current commit
GitHubActionsAPI-->>RouterWorkflow: Return run status
loop While status is unresolved, up to 240 attempts
RouterWorkflow->>GitHubActionsAPI: Retry lookup after 30 seconds
GitHubActionsAPI-->>RouterWorkflow: Return run status
end
alt Web deployment succeeds
RouterWorkflow->>RouterWorkflow: Continue router deployment
else Completed non-success or timeout
RouterWorkflow->>RouterWorkflow: Fail the job
end
Merge Risk: ⚪ Minimal · up to For push-triggered deployments, the router waits for the matching web run to succeed and fails on an unsuccessful run or timeout. No concrete deployment-order issue remains to resolve before merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. A rabbit checks the workflow gate, Comment |
|
Preview deployed!
This is a Cloudflare Workers preview version of this PR's build. |
Web deploys queue in their own concurrency group, so a 40-minute wait could expire behind a backlog and drop the router release. On timeout the error now says to re-run the workflow. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
View guided diff | Turn on auto-fix | Re-trigger cubic
Under bash -eo pipefail a non-2xx from gh api (5xx, rate limit) aborted the wait; treat it as not ready yet and poll again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Why
When #150 merged at 01:30Z, Deploy Router finished before Deploy Web. The new router rewrote
arelay.to/agent-relayonto/u/agent-relaybefore the web deploy had created that page, so our agent's public page returned 404 for about 10 minutes. The founder had just sent an agent to that URL.Change
deploy-router.ymlgets a first step onpush:actions/workflows/deploy.yml/runs?head_sha=…), every 30 s for up to 40 min;completed success;Deploy Webruns on every push tomain, so a run always exists for the commit. Manualworkflow_dispatchskips the wait. Permissions: addsactions: read.Validation
actionlintclean. It takes effect on the first router change after merge. #151 (registry router) is the next one.🤖 Generated with Claude Code
Note
Low Risk
CI-only ordering change in GitHub Actions; no application runtime, auth, or data-path changes.
Overview
Prevents router deploys from racing ahead of the web app on the same commit, which previously caused public URLs like
arelay.to/<handle>to 404 until the web deploy caught up.deploy-router.ymlnow runs a push-only gate before checkout: it polls the Deploy Web (Cloudflare) workflow (deploy.yml) for the currentGITHUB_SHAvia the GitHub API every 30 seconds (up to ~2 hours). The router job proceeds only when that run iscompleted success; it fails if the web deploy finished with any other conclusion, and times out with a re-run hint if web never succeeds in time. Manualworkflow_dispatchskips this step. Workflow permissions addactions: readso the job can inspect other workflow runs.Reviewed by Cursor Bugbot for commit 6ec26c0. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Prevents the router from deploying before the web deploy of the same commit finishes, so it never routes to pages that don't exist yet. After #150, the router shipped first and
arelay.to/agent-relayreturned 404 for about 10 minutes until the web deploy caught up.deploy-router.ymlnow waits up to 2 hours for the Deploy Web (Cloudflare) run for the same commit, polling every 30 seconds.workflow_dispatchruns skip the wait, and the workflow now needsactions: readpermission.Written for commit 6ec26c0. Summary will update on new commits.
Agent Relay sessions
claudesession1e2adfbe· opened viagh pr create· last active 2026-10-08