Operations runbook
Run Roark on a server, runner, or scheduler.
Last updated
#Set up the host
Use a dedicated machine, VM, runner, or user account. Avoid sharing a control checkout with humans.
Install:
bun --version
git --version
gh --version
roark --help
roark --versionAuthenticate:
gh auth status
gh repo view owner/repoPin Roark to a tag or commit. Upgrade deliberately.
#Set up the repository
Run from the target repository checkout:
roark initCheck:
.roark/config.json.roark/.gitignore- verification command
- lifecycle hooks
- ignored local file copying
- label policy
#GitHub permissions
The account running Roark needs enough permission to:
- read issues and comments
- assign issues when assignment is enabled
- create and edit labels required by Roark
- create branches
- push commits
- open pull requests
- read PR review comments for
revise-pr - post issue or PR comments
In GitHub Actions, set job permissions explicitly:
permissions:
contents: write
issues: write
pull-requests: write#Before scheduling
Before enabling a scheduler:
- run
roark auto --repo owner/repo --limit 1 --dry-run - run one manual or targeted issue
- verify artifacts are written where expected
- verify failed attempts can be continued
- configure log capture
- serialize runs
- keep
--limit 1until the workflow is trusted
#Scheduler command
Example:
roark auto --cwd /srv/roark/repos/app --repo owner/repo --limit 1Use explicit --cwd and --repo in non-interactive contexts.
#Monitor runs
Watch:
- scheduler logs
- issue comments posted by Roark
- labels such as
agent-failedandagent-pr-opened .roark/runs/issue/<n>/attempts/<k>/summary.json.roark/runs/issue/<n>/attempts/<k>/verification.md- disk usage under
~/.roark/workspaces
Use:
roark status --all --repo owner/repo
roark workspace list#Recover a failed run
- Find the issue or PR from scheduler logs or labels.
- Open
summary.json. - Open
verification.mdandreadiness.md; inspectreadiness.jsonfor the exact gate state. - Inspect the managed workspace if uncommitted work matters.
- Fix host, config, hook, secret-path, or verification issues.
- Run:
roark continue 123 --repo owner/repoDo not delete the workspace until recoverable work is no longer needed.
#Delete workspaces
List workspaces:
roark workspace listRemove one clean workspace:
roark remove 123Prune old clean workspaces:
roark workspace prune --older-than 30dUse --force only when you have confirmed that dirty work is disposable.
#Upgrade
- Stop scheduled jobs.
- Check the current Roark version with
roark --version, or record the pinned commit. - Update the Roark checkout deliberately.
- Run:
bun install
bun test
bun run typecheck
roark --help
roark --version- Run
roark auto --dry-run. - Run one targeted issue or continue a known safe attempt.
- Re-enable scheduled jobs.
#Roll back
- Stop scheduled jobs.
- Return the Roark checkout to the previous pinned tag or commit.
- Reinstall globally if needed.
- Verify
roark --helpandroark --version. - Re-run
roark status --all. - Continue failed attempts only after confirming artifact compatibility.