From cbd37a26ec1afaa947ba3f7ab9cf2609b8add60a Mon Sep 17 00:00:00 2001 From: can1357 Date: Sun, 17 May 2026 05:48:06 +0200 Subject: [PATCH] docs(robomp): updated references from pi-artifacts to pi:image/pi-base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced `oh-my-pi/artifacts:dev` image references with `oh-my-pi/pi:dev`. - Updated `PI_ARTIFACTS_IMAGE` → `PI_BASE` in compose and script descriptions. - Replaced `/work/pi/Dockerfile` artifact stage with `/Dockerfile` pi-runtime stages. - Added `pi:image` and `pi:run` commands to development command reference. --- python/robomp/AGENTS.md | 14 ++++++++------ python/robomp/README.md | 8 ++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/python/robomp/AGENTS.md b/python/robomp/AGENTS.md index 2e2d1bd5e..893516792 100644 --- a/python/robomp/AGENTS.md +++ b/python/robomp/AGENTS.md @@ -23,7 +23,7 @@ Webhook → durable queue → async dispatcher → per-issue git worktree → om - `src/prompts/` — Mustache-style `{{var}}` templates loaded by `persona.py` via `@cache` and `importlib.resources`. Shipped as package data (`pyproject.toml` `package-data`). - `tests/` — pytest suite. `test_worker_smoke.py` is gated on `ROBOMP_INTEGRATION=1`. - `data/` — runtime state (sqlite + WAL, `workspaces/`, `logs/`). Never committed. -- `/work/pi/Dockerfile` — produces `oh-my-pi/artifacts:dev` (pi-natives `.node` + omp-rpc wheel). Built once per pi-source change via `bun run robomp:pi-artifacts`; roboomp's runtime image consumes it via `COPY --from=`. +- `/Dockerfile` (pi root) — produces `oh-my-pi/pi:dev` (pi runtime image: python + bun + rustup + pi-natives + omp_rpc + `/usr/local/bin/omp` shim + the full pi source under `/pi`). Stages: `natives-builder` → `wheel-builder` → `pi-base` → `pi-runtime` (default). Built via `bun run pi:image`. Robomp's image extends `pi-base` via `FROM ${PI_BASE}` in `/Dockerfile.robomp`. ## Development Commands @@ -38,11 +38,13 @@ bun run robomp:serve # python -m robomp serve on the host Docker inner loop: ``` -bun run robomp:build # pi-artifacts (if pi changed) + docker compose build +bun run pi:image # build oh-my-pi/pi:dev (one-time / on pi change) +bun run pi:run # docker run -it oh-my-pi/pi:dev (smoke-test the shim) +bun run robomp:build # pi:image (if pi changed) + docker compose build bun run robomp:dev # build + up -d + follow logs bun run robomp:up / robomp:down / robomp:restart / robomp:logs bun run robomp:rebuild # docker compose build --no-cache -bun run robomp:reset # `down -v` + drop the pi-artifacts image +bun run robomp:reset # `down -v` + drop the pi image ``` Frontend (Vite + SolidJS, in `web/` — still a bun workspace): @@ -95,8 +97,8 @@ Lint + format: TypeScript via Biome (config in `biome.json`), Python via Ruff (c - `src/cli.py` — Click CLI (`serve`, `triage`, `replay`, `status`, `cleanup`). - `src/dashboard.py` — single-page HTML dashboard served from `/`. - `pyproject.toml` — packaging + pytest config (`asyncio_mode = "auto"`, `testpaths = ["tests"]`). -- `Dockerfile` — slim runtime; consumes `oh-my-pi/artifacts:dev` (built from `/work/pi/Dockerfile`) for `pi_natives.linux-*.node` + `omp_rpc-*.whl`. Tini entrypoint, exposes `8080`, `VOLUME /data`. -- `docker-compose.yml` — `build.args.PI_ARTIFACTS_IMAGE`, mounts `$PI_ROOT:/work/pi:ro`, `./data:/data`, `~/.omp/agent/models.container.yml:ro` (mapped to `models.yml` inside the container — kept separate from the host's `~/.omp/agent/models.yml` so the host omp doesn't pick up gateway routing intended only for the container), `extra_hosts: llm-gateway.internal:host-gateway`. +- `/Dockerfile.robomp` (pi root) — robomp's image. `FROM ${PI_BASE}` (default `oh-my-pi/pi:dev`), adds the SolidJS dashboard bundle, the robomp Python package, and the `robomp-entrypoint` shim. Tini entrypoint, exposes `8080`, `VOLUME /data`. The toolchain (python + bun + rustup + pi-natives + omp_rpc + `omp` shim) comes from `pi-base` — no duplication in this file. +- `docker-compose.yml` — `build.args.PI_BASE`, mounts `$PI_ROOT:/work/pi:ro`, `./data:/data`, `~/.omp/agent/models.container.yml:ro` (mapped to `models.yml` inside the container — kept separate from the host's `~/.omp/agent/models.yml` so the host omp doesn't pick up gateway routing intended only for the container), `extra_hosts: llm-gateway.internal:host-gateway`. - `entrypoint.sh` — validates `PI_ROOT`, creates `/data/{workspaces,logs}` + build caches. - `.env.example` — authoritative list of required runtime env vars. - `README.md` — full architecture + operational reference. Authoritative for end-to-end flow, host-tool spec, security posture, and configuration reference. @@ -108,7 +110,7 @@ Lint + format: TypeScript via Biome (config in `biome.json`), Python via Ruff (c - **Task runner**: `bun` (root `package.json` `scripts`). Always reach for an existing `bun run` recipe before invoking `docker compose` or `pytest` directly. - **Container runtime**: Docker Compose v2. The image embeds Bun 1.3.14 + a rustup launcher and exposes `omp` via a `/usr/local/bin/omp` shim; `ROBOMP_OMP_COMMAND=omp` should not need changing. - **Required env** (set in `.env`, see `.env.example`): `GITHUB_WEBHOOK_SECRET`, `ROBOMP_BOT_LOGIN`, `ROBOMP_GIT_AUTHOR_NAME`, `ROBOMP_GIT_AUTHOR_EMAIL`, `ROBOMP_REPO_ALLOWLIST`, plus model knobs (`ROBOMP_MODEL`, `ROBOMP_THINKING`, optional `ROBOMP_PROVIDER`) and rate-limit / concurrency / timeout overrides. **GitHub auth is mode-exclusive**: either set `ROBOMP_GH_PROXY_URL` + `ROBOMP_GH_PROXY_HMAC_KEY` (gh-proxy mode; PAT lives only in the sidecar container — the bundled compose default), or set `GITHUB_TOKEN` directly (single-process PAT mode). `Settings._validate_proxy_or_pat` rejects a `.env` that sets both. -- **PI_ROOT resolution**: roboomp lives inside the oh-my-pi monorepo at `python/robomp/`. `bun run robomp:pi-artifacts` builds the parent monorepo (`../..`) as its docker build context, and `docker-compose.yml` mounts that same path read-only at `/work/pi`. Override `PI_ROOT` only when pointing the build/mount at a different oh-my-pi checkout. Inside the container the path is always `/work/pi`. Build invalidation stays bounded: Python-only edits in roboomp never trigger a natives recompile. +- **PI_ROOT resolution**: roboomp lives inside the oh-my-pi monorepo at `python/robomp/`. `bun run pi:image` builds the parent monorepo (`../..`) as its docker build context to produce `oh-my-pi/pi:dev`; `docker-compose.yml` extends that image via `PI_BASE` and mounts the same parent path read-only at `/work/pi` for the orchestrator to see live source. Override `PI_ROOT` only when pointing the build/mount at a different oh-my-pi checkout. Inside the container the path is always `/work/pi`. Build invalidation stays bounded: Python-only edits in roboomp never trigger a natives recompile. - **Forbidden**: no docker-in-docker, no extra service containers, no new background workers outside `WorkerPool`. The container itself is the isolation boundary; per-issue isolation is the git worktree. ## Testing & QA diff --git a/python/robomp/README.md b/python/robomp/README.md index 16b9a9804..bc74bf913 100644 --- a/python/robomp/README.md +++ b/python/robomp/README.md @@ -63,7 +63,7 @@ $EDITOR .env openssl rand -hex 32 # ROBOMP_GH_PROXY_HMAC_KEY openssl rand -hex 32 # GITHUB_WEBHOOK_SECRET -bun run robomp:pi-artifacts # build oh-my-pi/artifacts:dev (one-time / on pi change) +bun run pi:image # build oh-my-pi/pi:dev (one-time / on pi change) bun run robomp:build && bun run robomp:up curl -fsS http://localhost:8080/healthz ``` @@ -75,8 +75,8 @@ comment out `ROBOMP_GH_PROXY_URL` / `ROBOMP_GH_PROXY_HMAC_KEY` and set rejects a `.env` setting both). Build invalidation is bounded: editing roboomp Python touches only the -runtime layer; editing pi source rebuilds `oh-my-pi/artifacts:dev`, which -roboomp's Dockerfile consumes via `COPY --from=`. +runtime layer; editing pi source rebuilds `oh-my-pi/pi:dev`, which +roboomp's `Dockerfile.robomp` extends via `FROM ${PI_BASE}`. ### Public URL @@ -186,7 +186,7 @@ The integration test spawns a real `omp --mode rpc` against an | `refusing to push: commit author identity mismatch` | Some commit not authored as `ROBOMP_GIT_AUTHOR_*`. The error lists the offending shas; `git commit --amend --reset-author --no-edit`. | | `refusing to push: working tree is dirty` | Uncommitted agent edits. Or just call `gh_open_pr`, which auto-commits `bun run fix` output. | | `bun check failed before PR creation` | Fix the reported failure and retry `gh_open_pr`. | -| `Failed to load pi_natives` | Wrong arch / missing native. `bun run robomp:pi-artifacts` then `bun run robomp:build`. | +| `Failed to load pi_natives` | Wrong arch / missing native. `bun run pi:image` then `bun run robomp:build`. | | `No API key found for ` | `~/.omp/agent/models.container.yml` mount missing or provider id mismatch with `ROBOMP_MODEL`. | ## Layout