Repository navigation
Let CI on main be started by hand so a missed push still deploys - #252
Conversation
When GitHub created no push run of CI for a merge commit on main (#249), nothing could redeploy the web editor or the website: CI had no manual trigger, both deploy gates accepted only push runs, and main only takes pull requests, so the recovery was an empty-commit PR. Add workflow_dispatch to CI and let both deploy gates judge the latest CI run for the workflow revision on main whether it came from a push or from Run workflow. The gates still require the same commit, branch main and a successful latest run; pull request runs never count. The event is filtered in jq because the runs API takes a single event. With several runs per revision, a re-run keeps its created_at, so the gates now pick the attempt started last (run_started_at). The release gate still requires a push run for the tagged commit.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: hwantage/CanvaSlide/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe CI workflow can now run manually. Both deployment gates consider eligible push and manual CI runs and select the latest attempt. Deployment instructions describe how to recover when a merge on ChangesManual CI deployment recovery
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant Operator
participant CI
participant GitHub Actions
participant Deployment workflows
participant GitHub API
Operator->>CI: Manually run CI on main
CI->>GitHub Actions: Complete CI run
GitHub Actions->>Deployment workflows: Trigger workflow_run
Deployment workflows->>GitHub API: Query CI runs for workflow revision
GitHub API-->>Deployment workflows: Return push and workflow_dispatch runs
Deployment workflows->>Deployment workflows: Select latest attempt and check success
Merge Risk: ⚪ Minimal · up to This change lets maintainers recover deployments by manually running CI on main when a merge had no push run. Tests and docs were updated, and the release gate is unchanged. No concrete merge-blocking risk was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Manual CI recovery adds a route to production deployment, but deployments still require successful CI for the matching revision on main. Who may start manual runs and whether deployment environments require approval should be confirmed. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Deploying canvaslide with
|
| Latest commit: |
dd82ed0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://54cd6b92.canvaslide.pages.dev |
| Branch Preview URL: | https://chore-ci-dispatch-redeploy.canvaslide.pages.dev |
Summary
If GitHub ever skips the CI run for a merge on
main, a maintainer can now press CI → Run workflow onmain(or rungh workflow run ci.yml --ref main), and when that run passes the web editor and the website deploy as usual. No empty-commit PR is needed anymore.What Changed
ci.yml: addworkflow_dispatch.deploy-web-editor.yml,deploy-website.yml: the gate now judges the latest CI run for the workflow revision onmainwhose event ispushorworkflow_dispatch. It still requires the same commit, branchmainand a successful latest run; pull request runs never count. The event is filtered in jq because the runs API accepts a singleevent. Because a revision can now have several runs and a re-run keeps itscreated_at, the gates pick the attempt started last (run_started_at, falling back tocreated_at).docs/CLOUD-SHARE.md,website/README.mdanddocs/RELEASE.md, which also notes that the release gate still requires a push run.Why
For #248 (merge commit dea1d96) GitHub created no
pushrun of CI, so production kept the old bundle (#249).ci.ymlhad no manual trigger, both deploy gates accepted only push runs (so Web editor → Run workflow skipped the deploy), and themainruleset only takes pull requests, so the only recovery was the empty-commit PR #250.Rejected alternatives:
wrangler pages deployscript would need the Cloudflare token on a workstation and could publish code that never passed CI.release.ymlis unchanged: a tag still needs a CI run from a push tomain.Linked Issue
Fixes #251
Visual Proof
No visual change: only GitHub Actions workflows, their tests and documentation change.
Testing
Run on macOS in this worktree. A fresh-context adversarial review found the re-run ordering issue above, which is fixed in this PR; it also noted that
docs/RELEASE.mdgives no way to release a merge commit that has no push CI run, which stays out of scope (#251).pnpm check— exit 0.node --test config/scripts/workflow-hardening.test.mjs config/scripts/workflow-policy.test.mjs— 42 passed, 0 failed.deploy-web-editor.ymlrestored tomain, the new and updated gate tests fail (3 tests); with only its ordering reverted tocreated_at, the re-run cases fail (1 test). So the tests exercise both parts of the change.bash config/scripts/check-actionlint.sh— exit 0.Not verifiable before merge: a real CI → Run workflow on
maintriggering theWeb editorandWebsitedeployments. After merge, the push CI of the merge commit should deploy as before.Desktop check: none — no app or desktop code changes.
Platform Notes
N/A
Checklist
pnpm checkpnpm rust:fmt:check && pnpm rust:clippy && pnpm rust:test—src-tauri/unchangedpnpm test:site—website/code unchanged (README only)pnpm bundle:local— bundling unchangedSummary by CodeRabbit
Workflow Improvements
Documentation