Skip to content

ci(router): accept a later successful web deploy that includes this commit - #165

Merged
khaliqgant merged 3 commits into
mainfrom
ci/router-wait-descendant
Oct 8, 2026
Merged

khaliqgant merged 3 commits into
mainfrom
ci/router-wait-descendant

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Bug (from #154, mine)

The router waits for its own commit's web deploy. A newer push supersedes a queued web deploy in the deploy-web-production group, which keeps one pending run, so that run ends cancelled. The router then exits with "did not succeed". That's what happened to #162's router: it never shipped.

Fix

The router ships once any successful web deploy includes this commit: its own, or a later main push whose head is ahead of or identical to this commit (via the compare API). It still refuses if this commit's own web deploy actually failed (failure, timed_out, startup_failure). A cancelled run means it keeps waiting for a descendant. Manual dispatch is unchanged. actionlint is clean.

🤖 Generated with Claude Code


Note

Medium Risk
Changes production deploy ordering and which git SHA the router ships; mis-handling compare or checkout could still desync router and web or block deploys.

Overview
Fixes router deploys that never shipped when this commit’s web deploy was cancelled because a newer push superseded it in the deploy-web-production concurrency group.

The wait step now proceeds once any successful main web deploy includes this commit: own SHA on success, or the latest successful run whose head is ahead or identical per the compare API. It still fails fast if this commit’s own web run ended in failure, timed out, or startup failure. On success it writes steps.wait.outputs.sha and checkout uses that ref so the router deploy matches the web pages revision, not a router-only SHA that might be ahead or behind.

Reviewed by Cursor Bugbot for commit b14f49b. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Fixes the router deploy job so it ships once any successful web deploy includes this commit, instead of waiting only for its own commit's deploy.

  • A newer push supersedes a queued web deploy, cancelling it, so the router gave up and never shipped.
  • The job now also accepts a later successful web deploy whose head is ahead of or identical to this commit, checked via the compare API.
  • The router checks out the accepted revision so router and pages always match.
  • It still refuses if this commit's own web deploy failed; a cancelled run or a transient API lookup error keeps waiting.

Written for commit b14f49b. Summary will update on new commits.

View guided diff Turn on auto-fix


Agent Relay sessions

  • claude session 1e2adfbe · opened via gh pr create · last active 2026-10-08

…ommit

A newer push supersedes a queued web deploy in its concurrency group, so a
router run waiting for its own commit's web deploy saw it cancelled and gave
up (#162's router never shipped). Ship once any successful web deploy of this
commit or a descendant exists; still refuse if this commit's own web deploy
failed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T07:41:57.579072Z 6316b05 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You'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 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d0e2cd16-cdcd-4aff-9f83-44e8790327aa
📥 Commits

Reviewing files that changed from the base of the PR and between 6316b05 and b14f49b.

📒 Files selected for processing (1)
  • .github/workflows/deploy-router.yml

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 66b75037-e51b-4611-a0c6-5f0c1c2121ad
📥 Commits

Reviewing files that changed from the base of the PR and between 8d467d8 and 6316b05.

📒 Files selected for processing (1)
  • .github/workflows/deploy-router.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The push-only router workflow now waits for a successful web deployment for the same commit or a qualifying successful deployment from main. It stops on specified same-commit failures and reports a timeout after 240 polling attempts.

Changes

Router deployment wait

Layer / File(s) Summary
Poll web deployment results
.github/workflows/deploy-router.yml
The workflow accepts a successful same-commit web deploy or a successful main web deploy whose commit is ahead of or identical to the router commit. It stops on same-commit failure, timed_out, or startup_failure; other conclusions continue polling. Polling remains at 30-second intervals for up to 240 attempts.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 6316b

The router waits for a qualifying successful web deployment and times out after bounded polling. No concrete merge-blocking issue is established; it appears ready subject to normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: allowing the router to accept a later successful web deploy that includes the commit.
Description check ✅ Passed The description is directly related to the changeset. It explains the cancelled web deploy issue and the updated router deploy behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

A rabbit checks the deploy queue,
Thirty seconds pass; it checks anew.
A matching success clears the way,
A main deploy may also say,
“Ahead or equal—go today!”

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6316b05bbb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/deploy-router.yml Outdated

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread .github/workflows/deploy-router.yml Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/deploy-router.yml Outdated
Comment thread .github/workflows/deploy-router.yml Outdated
Comment thread .github/workflows/deploy-router.yml Outdated
- Check out the revision whose web deploy succeeded (this commit or the later
  one that contains it), so router and pages always match.
- Only look for a later deploy after this commit's own deploy was read and
  is not a failure; a transient lookup error just retries.
- An identical SHA is accepted through the same path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0893a66. Configure here.

Comment thread .github/workflows/deploy-router.yml
…nding

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@khaliqgant
khaliqgant merged commit d830fe5 into main Oct 8, 2026
5 checks passed
@khaliqgant
khaliqgant deleted the ci/router-wait-descendant branch October 8, 2026 08:10
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://bc978f33-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant