Repository navigation
fix(deploy): finish rollouts despite stale application list versions - #2732
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 49 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. |
|
|
@coderabbitai review |
Action not completed
|
|
Production verification passed on merged main Deploy Production 43610800149 completed successfully:
The exact failure mode occurred again during this verification: the pinned VM-agent rollout completed target 1142 while the application list still reported 1141. The new diagnostic recorded the stale-list disagreement and the gate passed. The sandbox matched version/target 1622. No retry or deployment override was used. Together with the proven pre-fix failing HTTP regression, 120 passing deployment tests, specialist reviews, green PR/main CI, and the staging target1627/list1626 proof, this completes the requested fix. The separate unexplained old-agent-after-completed-rollout investigation remains open. |



Summary
Production run 43601089742 timed out for 20 minutes after its container rollout finished: Cloudflare's application list stayed at 1140 while application GET and the completed 100% rollout target were 1141. The gate now accepts the completed pinned rollout and logs the stale-list disagreement. Application behavior, deployed contents, rollout configuration, timing and API calls are unchanged.
Rule 74:
Validation
accepts completed pinned rollout when list is stale and application GET is currentproved RED before implementation: timeout at 100ms, completed target 5 / list 4 / detail 5. GREEN after the fix.Staging Verification
Task-scoped human exception: Raphaël directed “ship straight to prod” in source chat
5a56608e-1467-4c1b-9269-75fc1cf44254, user message01M7D8BWDE6Q416BFMWCZPQC6G, 2026-11-14 14:46:13Z (verified through SAM session search). Staging is no longer a release gate for this urgent fix; CI, local review, CodeRabbit request/wait and production verification remain required. The attempted policy save failed at the project policy cap, so this cites the actual human message.Non-blocking exact-candidate run 43605665349, head
a2f1f13510d55eca469efb53aa63c293a899277f: Wait for container rollout completion passed at 14:55:11Z, after waiting from 14:49:25Z. Full workflow and browser smoke passed. The decisive final VM-agent poll hadstatus=completed, list version1626, target1627, and logged the stale-list diagnostic before passing; the sandbox matched1912. This exercises the exact production failure mode live. Deployment was coordinated with the GCP and project-event write task owners before dispatch.This read-only deployment gate changes no VM provisioning/runtime path. The workflow's rollout wait, subsequent CLI/health steps and browser smoke tests are the relevant end-to-end checks; no extra VM fixture is needed.
End-to-End Verification
deploy-reusable.ymlsnapshots container identities before deploying the API, then runswait-container-rollout.ts→createRolloutApi→waitForContainerRollouts. The HTTP-boundary test feeds real adapter responses and asserts gate resolution with a stale list and current detail.A live production read at 14:23Z independently confirmed list array version 1140, detail object version 1141 and completed rollout target 1141 with completed 34% then 100% steps; configuration/secret fields were omitted. A bounded read-only production unchanged-image snapshot/wait passed at 14:31:56Z with that stale list and the new diagnostic; the matching-version sandbox path also passed. Post-merge workflow verification remains required.
Post-Mortem
What broke
Healthy Worker deployments ended in false failure. CLI build/upload, health check and the successful-production record were skipped.
Root cause
PR #2722 (
a7f8f665c) made application-list version equality a second veto after authoritative rollout completion. Cloudflare list data can stay stale after completion.Class of bug
A gate keyed on a correlated stale signal rather than its condition (rule 74).
Why it wasn't caught
Mocks synchronized application-list version with rollout completion, and the previous completion test required the same proxy behavior. No test kept the list stale while rollout/detail reached the target.
Process fix included in this PR
The HTTP-boundary divergence regression and pending/current-version controls directly exercise existing
.claude/rules/74-proxy-signals-must-match-the-condition.md. The self-hosting guide and staging reference now describe rollout authority. No additional standing rule is needed.Post-mortem file
tasks/active/2026-11-14-container-rollout-stale-list.md. The separate old-agent-after-completed-rollout investigation on idea01M7BQJ14BKVMPMKRA2GCSP8MJremains open.Specialist Review Evidence
a2f1f13510d55eca469efb53aa63c293a899277fdoc-sync re-review passed. No findings; independently passed 36 tests. Operational staging/release gates tracked separately.CodeRabbit Review Evidence
Requested once with the
coderabbit-reviewlabel at 2026-11-14 15:06:13Z, after hosted CI and local review passed. Trusted request workflow 43608344658 fired. Waited through 15:21:13Z (over 15 minutes). Final review/comment/thread reconciliation found no review findings or unresolved threads. The trusted request workflow succeeded. At 15:07:30Z CodeRabbit reported its free OSS review limit was reached (next review in 49 minutes), with no review findings. This is recorded as unavailable under the best-effort policy; no retrigger or quota-reset wait. The initial automatic review had skipped because the author is a bot; the opt-in request is separate.Agent Preflight
Classification
External References
https://developers.cloudflare.com/containers/configuration/rollouts/ consulted before coding. Read-only live production API independently verified response shape and divergence at 14:23Z.
Codebase Impact Analysis
Only
scripts/deploy/container-rollout.ts, its tests, two rollout descriptions and the task record change. Both shared and legacy deploy paths use the same adapter/gate. No API/Worker/UI/VM binary content changes.Documentation & Specs
Updated the self-hosting guide and staging verification reference to describe authoritative completed 100% pinned rollouts and stale-list diagnostics. No public interface or configuration changes.
Constitution & Risk Check
Principles X/XI: smallest complete change; existing configurable timeout/poll defaults retained. The main risk is accepting an unfinished/older rollout; existing pin/history/status/every-step/100% checks and negative controls preserve those protections.