Operations runbook
Production-style setup, scheduling, monitoring, recovery, and cleanup for Roark operators.
Last updated
#Host Setup
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.
#Repository Setup
Run from the target repository checkout:
roark initReview:
.roark/config.json.roark/WORKFLOW.md.roark/.gitignore- verification command
- lifecycle hooks
- ignored local file copying
- label policy
#Token and Permission Checklist
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#Scheduler Checklist
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
#Safe Scheduling Defaults
Recommended command shape:
roark auto --cwd /srv/roark/repos/app --repo owner/repo --limit 1Use explicit --cwd and --repo in non-interactive contexts.
#Monitoring
Review:
- scheduler logs
- issue comments posted by Roark
- labels such as
roark-failedandroark-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#Failure Response
- Find the issue or PR from scheduler logs or labels.
- Open
summary.json. - Open
verification.mdandreadiness.md. - 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.
#Workspace Cleanup
List workspaces:
roark workspace listRemove one clean workspace:
roark workspace remove --issue 123Prune old clean workspaces:
roark workspace prune --older-than 30dUse --force only when you have confirmed that dirty work is disposable.
#Upgrade Procedure
- 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.
#Rollback Procedure
- 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.
#Next Steps
- Use Scheduling for cron, launchd, and GitHub Actions examples.
- Use Troubleshooting for specific failure symptoms.
- Use Security and secrets for boundary review.