open-pilot
Open Pilot is a self-hosted Gitea + OpenCode automation service: a webhook receives ready-issue events, a local queue/worker claims the job, OpenCode edits in a git worktree, tests run, and the branch is pushed back as a PR.
Status: the core issue-to-PR runner, webhook receiver, durable queue, dashboard, logging, supervisor/autopilot helpers, and smart scheduler are implemented. Treat it as a trusted self-hosted MVP, not a hardened multi-tenant service; see docs/security.md before exposing it broadly.
Workflow
Gitea issue -> webhook -> queue -> runner -> OpenCode -> tests -> commit/push -> PR
Repository:
- Local path:
/home/onnwee/Projects/subcult/open-pilot - Remote URL:
ssh://[email protected]:2222/PatrickFanella/open-pilot.git
Docs:
docs/architecture.mddocs/runner-lifecycle.mddocs/webhook-setup.mddocs/security.mddocs/open-pilot-plan.mddocs/autopilot-planning.mddocs/supervisor-loop.mddocs/smart-scheduler.mddocs/deployment.md
Manual runner demo command:
open-pilot run-issue PatrickFanella/paqr 13
The default runtime remains conservative: FIFO queueing, one worker at a time, dashboard disabled, and scheduler disabled unless explicitly enabled.
Optional runtime features:
OPEN_PILOT_POLICY_PATHfor per-repo policy profilesOPEN_PILOT_DASHBOARD_ENABLEDandOPEN_PILOT_DASHBOARD_TOKENfor the local dashboardOPEN_PILOT_SCHEDULER_ENABLEDto switch from FIFO claims to score-based scheduling; leave itfalseuntil the scheduler rollout gate passesOPEN_PILOT_OPENCODE_SESSION_MODEandOPEN_PILOT_OPENCODE_SESSION_FORK_ANCHORto control OpenCode session reuseOPEN_PILOT_SANDBOX_ENABLEDfor containerized OpenCode runsOPEN_PILOT_REVIEWER_LOOP_ENABLEDfor the pre-PR critique pass
Logging:
OPEN_PILOT_LOG_LEVEL=WARNINGby default so JSON CLI output stays clean.OPEN_PILOT_LOG_FORMAT=textorjson.- CLI overrides are available with
--log-leveland--log-format. - Captured agent/test output is redacted before being logged or stored.
Docker packaging is documented in Dockerfile and docker-compose.yml.
Common commands
make install
make test
make compose-config
make compose-build
make scheduler-explain
make scheduler-locks
Runtime notes
- Webhook jobs require
ready-for-agentandagent:queuedlabels, an allowlisted repo, and a trusted sender. OPEN_PILOT_ALLOWED_REPOS=*andOPEN_PILOT_TRUSTED_USERS=*are supported for private/internal deployments, but they deliberately widen the trust boundary.- Dashboard routes (
/dashboard,/dashboard.json) requireOPEN_PILOT_DASHBOARD_ENABLED=true; ifOPEN_PILOT_DASHBOARD_TOKENis set, callers must sendX-Open-Pilot-Dashboard-Token. - Smart scheduler mode is enabled with
OPEN_PILOT_SCHEDULER_ENABLED=true; it scores queued jobs, enforces one active job per repo by default, and records scheduler events/history in SQLite. - OpenCode session state is stored in the SQLite runtime DB under
.open-pilot/open-pilot.db; default continuity isper-repo-forkwith a rolling repo anchor.