Flank Runbook
This runbook covers day-2 operations for flank. Flank is the visual workflow editor — it owns no workflow data and runs no executions. Workflows, executions, adapters, and secrets live in brain; flank reaches them over HTTP. For incidents that are really about workflow execution or storage, use the brain runbook. Pair this with flank-oncall for paging policy.
Deploy
Section titled “Deploy”Flank is deployed to Railway as beef-flank, root apps/flank, config
apps/flank/railway.json. The GitHub workflow at .github/workflows/flank.yml runs
CI gating only (lint, typecheck, vitest) on PRs and pushes to main that touch
apps/flank/**, the shared ESLint configs, or the workflow. There is no GitHub-driven
deploy step. main is the only long-lived branch, and Railway deploys it to production
automatically.
Procedure (normal deploy)
Section titled “Procedure (normal deploy)”- Open PR. The required
flankCI job runs lint, typecheck, and tests whenapps/flank/**, the shared ESLint configs, or the workflow changes. Each check runs even if an earlier one fails. All must pass. - Merge to
main. Railway builds the commit and deploys it to production. - Watch logs in Railway for
server.started. Confirm the app comes up on its port and the/sign-inhealthcheck passes.
Rollback
Section titled “Rollback”Railway keeps prior deployments addressable. To roll back:
- Open the
beef-flankservice in Railway → Deployments. - Find the previous green deploy and choose Redeploy.
- Confirm
server.startedand the/sign-inhealthcheck.
Then revert the bad commit on main via PR, so the next deploy does not ship it again. Do
not push to main directly.
Editor can’t reach brain
Section titled “Editor can’t reach brain”Symptoms: the editor loads but workflow lists are empty, saves fail, or executions don’t appear; server-function calls error with brain fetch failures.
Root causes:
BRAIN_API_URLis unset or wrong onbeef-flank.- Brain is down or unreachable on the configured host.
- The minted Clerk JWT is rejected by brain (expired Clerk session, missing ADMIN role, or Clerk keys rotated without redeploy).
Procedure
Section titled “Procedure”- Confirm brain health first. If brain is down, flank cannot list, load, save, or execute anything — defer flank investigation. See the brain runbook.
- Check
BRAIN_API_URLon thebeef-flankRailway service resolves to the right brain host. - Check auth. A
401/403from brain means the Clerk session is invalid or the user lacks ADMIN. VerifyCLERK_SECRET_KEY/CLERK_PUBLISHABLE_KEYonbeef-flankand that the operator’s account has the ADMIN role in brain. - Stuck or failed executions are a brain concern. Brain re-enqueues executions left RUNNING by a crash on boot. Flank only reads execution traces — it cannot recover them. Escalate to brain on-call.
Secrets and adapters
Section titled “Secrets and adapters”Provider adapters and any secrets they need are owned by brain, not flank. Rotating a provider key or changing an adapter is a brain operation — see the brain docs. Flank’s role is limited to authoring the workflow graphs that reference brain’s adapters.
Legacy, retired (removed). Flank previously synced git-driven
seeds/to sirloin storage at boot (runSeedSync) and resolved adapter secrets from a sirloin-backed store (FlankResolveSecrets, encrypted withFLANK_ENCRYPTION_KEY, 5-minute per-process cache). Those paths have been deleted along with the flank engine and the sirloin flank storage surface.
Healthchecks and signals to watch
Section titled “Healthchecks and signals to watch”- Logger event
server.startedwithportandstage— boot succeeded. - Railway
/sign-inhealthcheck — the editor is serving. - Brain fetch errors in flank logs (
brain GET/POST … failed) — flank can’t reach brain; checkBRAIN_API_URL, brain health, and auth. 401/Unauthorizedon UI server functions — Clerk session/keys issue.
For escalation paths, see flank-oncall.