Skip to content

feat(harness): first-class omp (oh-my-pi) harness#962

Open
czxtm wants to merge 9 commits into
paradigmxyz:mainfrom
czxtm:feat/omp-harness
Open

feat(harness): first-class omp (oh-my-pi) harness#962
czxtm wants to merge 9 commits into
paradigmxyz:mainfrom
czxtm:feat/omp-harness

Conversation

@czxtm

@czxtm czxtm commented Jul 8, 2026

Copy link
Copy Markdown

Adds HarnessType::Omp as a first-class harness: registration across the enum/DB constraint (migration 0036), container-arg mapping, and an OmpHarness server 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 on agent_end, and a normalizer mapping omp's event stream (message_update deltas, toolcall start/delta/end, usage) onto the blocks protocol.

Also included:

  • sandbox image: omp + bun (>= 1.3.14) installed in the agent image; 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)
  • fix: engines with no auth-mode env (the amp pattern — omp too) no longer force a harness auth fragment, so iron-proxy deployments boot without a placeholder fragment for engines whose credentials arrive as plain env or proxy replace rules
  • chart: sandbox.harnessEngine docs mention omp; rustfmt pass over harness-server

Running 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.

czxtm added 9 commits July 7, 2026 03:11
- 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
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant