docs/ci-cd-runbook.md
This runbook documents how Flow CI/CD is wired today and how to debug it quickly when jobs fail.
.github/workflows/pr-fast.yml: fast PR gate (Linux) using vendored hydrate + cargo check..github/workflows/canary.yml: runs on every push to main, publishes/updates the canary release/tag..github/workflows/nightly-validation.yml: scheduled full cross-target validation (plus host SIMD) without publishing..github/workflows/release.yml: runs on tag pushes matching v*, publishes stable releases.push skips docs-only changes (docs/**, **/*.md).workflow_dispatch to force a Canary run when needed after docs-only changes.scripts/vendor/vendor-repo.sh hydrate immediately after checkout in each build job.lib/vendor/* from the pinned commit in vendor.lock.toml before Cargo builds..vendor/flow-vendor, lib/vendor, lib/vendor-manifest) keyed by vendor.lock.toml.readme.md naming via scripts/ci/check-readme-case.sh.build-linux-host-simd (Linux x64 with --features linux-host-simd-json).--bin f only (release artifacts package f; avoids duplicate flow alias build cost).canary tag to current main commit).release waits for both build and build-linux-host-simd.Flow uses task-driven mode switching (not manual workflow edits):
github mode:
ubuntu-latest.blacksmith mode:
host mode:
[self-hosted, linux, x64, ci-1focus].Check/switch mode:
f ci-blacksmith-status
f ci-blacksmith-enable
f ci-blacksmith-enable-apply
f ci-host-enable
f ci-host-enable-apply
f ci-blacksmith-disable
f ci-blacksmith-disable-apply
Preferred path (painless, idempotent):
f ci-host-setup
If infra host is not configured yet:
f ci-host-setup <user@ip>
What f ci-host-setup does:
gh auth and infra host config.ci-1focus self-hosted runner on the Linux host.host mode with commit + push.f ci-blacksmith-statusf ci-host-runner-statusf ci-host-runner-installf ci-host-runner-removeStable release flow:
main.vX.Y.Z.Release workflow.Canary flow:
main.Canary workflow.canary tag moved and release assets updated.PR flow:
main.PR Fast Check (cargo check + cargo test --no-run shard).gh run list --workflow Canary --limit 10
gh run list --workflow Release --limit 10
gh run view <run-id> --log-failed
gh run watch <run-id>
If failure shows:
failed to load source for dependency 'axum'Unable to update .../lib/vendor/axumNo such file or directory (os error 2)then vendored deps were not hydrated before build.
Usually means self-hosted runner routing issue.
f ci-blacksmith-status
f ci-host-runner-status
python3 ./scripts/ci_host_runner.py health --repo nikivdev/flow
Expected healthy state is:
activeonlineci-1focusIf not healthy, run:
f ci-host-runner-install
python3 ./scripts/ci_host_runner.py wait-online --repo nikivdev/flow --timeout-secs 120 --interval-secs 5
f ci-blacksmith-status
If wrong:
f ci-host-enable-apply
# or:
f ci-blacksmith-enable-apply
# or:
f ci-blacksmith-disable-apply
Hydration depends on vendor.lock.toml pin and vendor repo availability.
Quick checks:
scripts/vendor/vendor-repo.sh status
scripts/vendor/vendor-repo.sh hydrate
Expected:
vendor.lock.toml is non-empty,hydrated <crate> -> lib/vendor/<crate>,lib/vendor/axum/Cargo.toml and lib/vendor/reqwest/Cargo.toml exist after hydrate.If CI cannot clone SSH URL from lock, vendor-repo.sh now falls back to HTTPS clone for GitHub URLs.
curl ... install.sh does not fetch expected fresh buildFlow installer defaults to canary unless FLOW_VERSION is set differently. Check if canary moved:
git ls-remote --tags origin canary
Then verify in sandbox (recommended) using:
docs/rise-sandbox-feature-test-runbook.mdThat runbook gives an isolated rise sandbox smoke test for:
curl -fsSL https://myflow.sh/install.sh | sh
~/.flow/bin/f --version
Re-run:
f ci-host-setup
The installer path is idempotent (it removes old service/config before re-registering). If failure persists, inspect:
f ci-host-runner-status
gh api repos/nikivdev/flow/actions/runners