feat(rollout): submit harbor run jobs to a Rollout Server #2
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2"
general
weight: 0.35
KunWuLuan
Summary
harbor runcan now execute complete trials remotely on a kube-rl Rollout Server instead of locally. Passing--rollout-server <url>keeps the entire job experience intact — CLI, job directory layout, metrics, pass@k, result tables, resume, andharbor view— while the environment, agent, and verifier execute on the server's Kubernetes workers. No local Docker, sandbox credentials, or agent dependencies are required on the submitting machine.What it does
With
--rollout-serverset, each trial:1. Resolves its task directory locally (registry/git tasks downloaded as usual) and archives it as
task.tar.gz.2. Submits the archive plus the resolved run configuration (agent name/import path, model, kwargs + env, verifier settings, timeout multiplier, quota queue) to the server's
POST /api/v1/runs/asyncendpoint.3. Polls the run's status to a terminal state.
4. Fetches the server-recorded full
TrialResult(rewards, timings, step results) and materializes it into the local trial directory, patched with local identity fields — so every downstream consumer keeps working unchanged.A
rollout.jsonmarker next toconfig.jsonrecords the server-siderun_id, status, and result URI.Usage
| Flag | Purpose |
|---|---|
|
--rollout-server <url>| Enable remote execution ||
--rollout-token <t>| Bearer token (falls back toROLLOUT_SERVER_TOKEN) ||
--rollout-queue <q>| Spark-style quota queue with its own concurrency/rate limits ||
--rollout-llm-proxy <url>| LLM proxy for RL token/logprob capture ||
--rollout-retries <n>| Server-side retries per trial (defaults to--max-retries) ||
--rollout-detach| Submit all trials and exit; re-run to collect ||
--rollout-fetch-artifacts| Download reward/trajectory files after completion |The same settings are supported in job config files via a
rollout_server:section. A tutorial chapter is added atdocs/content/docs/tutorials/rollout-server.mdx.Resume & detach semantics
rollout.jsonwithoutresult.json; re-running the job re-attaches to the same server-siderun_idinstead of resubmitting.--rollout-detach: fire-and-forget submission; collecting later requires no extra flags.max_retries). The local queue never re-runs a remote trial, so the layers cannot multiply.--print-configoutput.Implementation notes
RolloutServerConfigonJobConfig(+ matchingRolloutServerLockin the job lock). Behavior knobs (detach / fetch / polling) are excluded from replay equality so a detached submission can be collected by a later run without the flag; replay inputs (server / queue) still break equality as expected.install_onlyand regrade jobs are rejected in this mode.harbor/rollout/client.py— async HTTP client for the server's public API: preflight (health +GET /api/v1/capabilities/agentsvalidation), submission, status polling, result fetch, with error classification (retryable vs permanent) driving backoff.harbor/trial/remote.py—RemoteTrial:TrialConfig → AgentRunRequestmapping (agent env${VAR}templates resolved locally and forwarded viaextra_env), tar packaging, terminal-status-driven result materialization with local identity patching,rollout.jsonmarker lifecycle.TrialQueueaccepts an injectabletrial_factory(local execution path untouched);Jobwires it, zeroes local retries in rollout mode, and preserves marker directories across resume.Validation
RemoteTriallifecycle (completion materialization, detach leaves noresult.json, resume re-attaches without resubmitting, failure recording, submission rejection).models+clisuites pass: 472 tests.reward=1.0materialized locally (~8s wall clock); detach → collect and resume paths verified on the live server.Compatibility notes
--agent-import-pathmust be importable inside the server's worker image.docker_imageto match the pool template; ACK-backed deployments build arbitrary task Dockerfiles in-cluster (GET /api/v1/capabilities/environmentsreports what a given server accepts).