feat(harness): first-class omp (oh-my-pi) harness#962
Open
czxtm wants to merge 9 commits into
Open
Conversation
- HarnessType::Omp (wire "omp") + sessions CHECK-constraint migration 0036
- harness-server: OmpHarness adapter driving per-turn `omp -p --mode json`
(argv prompt, --session-dir + -r resume, OMP_BIN/OMP_MODEL/bridge overrides,
amp-style zero settle), full omp JSONL event normalizer + tests
- sandbox image: @oh-my-pi/pi-coding-agent@16.3.5 (bun >= 1.3.14), ~/.omp/agent
- harness/omp/{config.yml,models.yml}: LiteLLM-first model roles (glm-local
alias; see fuzzy-merge trap comment) with entrypoint base-URL substitution
…keys in sandboxes)
…races role resolution
…ness fragment placeholder_env -> infra_fragment -> fragments() runs unconditionally at startup (even with iron-proxy disabled); with engine=omp (or amp) the resolved_auth_mode api_key fallback then demands a fragment that doesn't exist and api-rs fails to boot. Explicit auth-mode env still forces resolution.
… back to OpenRouter glm-local has no fallback on the gateway (every turn 503s while the hosted_vllm box is down); glm-5.2-fp8 falls back cleanly. The models.dev fuzzy-merge trap that motivated the alias only affects discovery-based registries — the static models.yml definition ships the id unchanged (verified empirically both ways during the 2026-07-07 outage).
…er deployments) GITHUB_APP_ID/GITHUB_APP_PRIVATE_KEY in the sandbox env (via SESSION_SANDBOX_PASSTHROUGH_ENV) yield a short-lived installation token: GITHUB_TOKEN/GH_TOKEN + a github.com-scoped credential store, so agents clone/push and reply on GitHub. Installation selection prefers the login match and deprioritizes enterprise-typed installs (the empty-enterprise shadowing bug, effect-github-app 20ed762). Fail-soft on mint errors.
… sleeps to prove api-rs restart resume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
HarnessType::Ompas a first-class harness: registration across the enum/DB constraint (migration 0036), container-arg mapping, and anOmpHarnessserver implementation (crates/harness-server/src/omp.rs) driving the omp CLI (@oh-my-pi/pi-coding-agent, a pi-mono fork) per turn in JSON mode — argv prompt with--guard,-r <id>session resume, model fall-through to the agent config dir, amp-style terminal settle onagent_end, and a normalizer mapping omp's event stream (message_update deltas, toolcall start/delta/end, usage) onto the blocks protocol.Also included:
harness/omp/config fragments (LiteLLM-first static model registry; see the models.yml comment on discovery races)workflows/restart_survival_demo.py: checkpointed steps + durable sleeps proving restart resume (validated live: api-rs killed mid-sleep resumes at scheduled wake, pre-kill checkpoints byte-identical, attempts=1)sandbox.harnessEnginedocs mention omp; rustfmt pass over harness-serverRunning in production on our k3s cluster (sessions, GitHub-bot jobs, PR auto-reviews all drive this harness through the session API). Disclosure: developed with AI assistance; validated by the crate's test suite (84 passing in harness-server incl. 26 omp normalizer/adapter tests) and live E2E turns.
Happy to split the workflow demo or the fragment fix into separate PRs if preferred.