Skip to content

Building a runner instance should need only this repository #45

Description

@davidleomay

Goal, from the owner: building a new runner instance should need only this repository. Today it needs two — agent for the skills and store, and a second, private one for the runner that actually turns a GitHub mention into a job.

This issue is to agree where that lands and who does it, not to propose a design.

Where the line runs today

Already here, and clearly right:

Still only in the runner repo, roughly 5 400 lines of bash across 3 binaries and 15 libraries:

ingest GitHub notifications → a job, with actor/repo/job-type policy applied fail-closed
dispatch claims a job, prepares a worktree, starts a detached tmux worker
supervise finalises a job: outcome, done_kind, work_performed, contract_followed
job, prune, status, doctor queue as a filesystem, retention, health
install, install-cron deployment and the five cron lines
worker, github, instance_config tmux sessions, gh calls, per-instance config split

Plus 11 test files, a Dockerfile, a compose example and docs/CONTAINER.md.

Note the name collision that keeps confusing this discussion: that repo is named after the first bot to use it, but nothing in it is bot-specific. Both bots run it. Only policy.json / runner.json are per-instance.

What is not obvious from the outside

agent supervise --session and the runner's supervise are different things that share a word. The first watches a session; the second finalises a job and decides whether work was actually performed — the check that catches a DONE marker emitted over an unfinished review. Folding one into the other is a design question, not a move.

Questions

  1. Is this already in progress? The recent supervise/session work looks adjacent, and I would rather not duplicate it.
  2. Does the runner move as bash, or get rewritten in Python alongside the rest of this CLI? The bash targets 3.2 for a macOS host; in a Linux container that constraint is gone.
  3. What happens to the container packaging — does the image move here too, so docker compose up against this repo is the whole instance setup?
  4. Where does per-instance config live afterwards — still a small private repo per bot, or something this repo describes?

Why it is being asked now

A second instance is being brought up on the existing image and hit two things worth knowing regardless of the answer:

  • the image has no ps, so the runner's lock cannot build its owner token; mara_die fires inside a command substitution, so the caller continues with a lock that is silently ineffective rather than failing. One-line fix open as a PR against the runner repo.
  • an agent store created natively on macOS (PostgreSQL 17) cannot be mounted into the image (PostgreSQL 15) — major version mismatch. device.json carries the pairing, so a fresh cluster keeps the identity and loses only task history, but it is a migration step rather than a copy.

Neither blocks the question above; both are cheaper to fix once, wherever the runner ends up living.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions