Repository navigation
fix(desktop-commander): promote is a no-op when the verified upload already serves 100% - #13479
Conversation
…lready serves 100% Run 45220751438 proved the --worker-id fix was necessary but not sufficient: the target version 37e2f6a3 was already the sole 100% deployment, and the baseline-only guard misread that success as drift. deploymentStatus() now classifies already-promoted / at-baseline / drifted (unit-tested), and promote.mjs exits 0 with a verification message when the desired end state already holds. Refs #13472
Codex Review Summary: ✅ CompletedThis 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. |
|
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 23 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. |
The new test imports ../promote.mjs; tsc needs a declaration for the plain-JS script. promote.d.mts types deploymentStatus and the minimal deployment/manifest shapes it reads. Refs #13472
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07178f0b04
ℹ️ 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".
| if (versions[0]?.version_id === manifest.baselineVersionId) { | ||
| return "at-baseline"; |
There was a problem hiding this comment.
Preserve null-baseline handling for the first promotion
On a first publish with no existing deployment, upload-version.mjs explicitly records baselineVersionId: null. If the deployment list is empty when promoting that upload, this comparison checks undefined === null and classifies the state as drifted, preventing the initial deployment. The previous implementation normalized a missing active version with ?? null, allowing this supported bootstrap path. Preserve that normalization when comparing against the baseline.
Useful? React with 👍 / 👎.
Closes #13472
What failed
Promote run 45219486455 failed because
cf workers versions getwas invoked with--worker; PR #13473 fixed that to--worker-id. The re-dispatched run 45220751438 then failed one step later: the live deployment's active version was37e2f6a3…— the exact version the manifest wants promoted, already the sole deployment — and the baseline-only guard refused it as drift:Fix
deploymentStatus(current, manifest)→already-promoted/at-baseline/drifted.already-promoted(verified upload already the sole 100% deployment) → exit 0 with a verification message — the promote workflow is idempotent, so re-running against the same upload run succeeds.drifted(anything else, including partial rollouts of the target) → still refuse, as before.test/promote.test.ts(vitest) covering all classifications; 9/9 pass locally. The script body is now wrapped inmain()behind a direct-invocation guard so the helper is importable, same pattern as the id-mail promoter.Acceptance (#13472)
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T16:53:13Z", "session_id": "ses_e5df6b325bdffeeE2S360rEUrH", "lane": null, "host": "amd", "worktree": "/home/user/git/code", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/git/code", "repo": "developing-today/code", "branch": "fix/dc-promote-idempotent-13472", "sha": "07178f0b04a80b6da47657e92343de16953b9e54" }, "auth_subject": "oc-code-05", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.