File size: 15,135 Bytes
d5e8630 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | # OpenEnv Harbor / TiTO qualification — agent handoff
Updated: 2026-09-15. All changes are local; nothing was pushed.
## Objective and operating constraints
Qualify the existing 29 Harbor adapters across OpenAI, native Anthropic, and Hugging Face evaluation routes, plus vLLM training with exact token-in/token-out (TiTO) capture. Show evidence and support tiers in Gradio. Do not force unsuitable adapters to pass by weakening capture checks. The user authorized stable, experimental, and unstable classifications.
Do not disturb existing training, checkpoint evaluations, services, or shared environments. Do not use hopper-extra. Work was performed in an isolated worktree and separate qualification jobs. The latest user request is to document the work for another agent, not to deploy it or start additional tests.
## Where to work
- Worktree: `logs/20260915/OpenEnv` relative to this experiment directory.
- Branch: `codex/harbor-29-provider-tito`; base: `781bfc9a`.
- Experiment tooling: `tools/`.
- Frozen final evidence: `logs/20260915/final-v1/`.
- Frozen qualified source: `logs/20260915/snapshots/release-final-v1/`.
The worktree initially included changes copied from an already-dirty checkout. Its entire Git diff is NOT solely attributable to this qualification effort. Review the files and evidence before cherry-picking; untracked files are important. The inventory below records current local state, not per-author attribution.
Do not modify frozen evidence or source snapshots. The subsequently expanded qualification documentation is newer than the frozen snapshot.
## Implemented changes
### Capture contract and provider compatibility
- Added the authoritative Harbor training export in `src/openenv/harbor/contract.py`; the environment wrapper reuses it.
- Explicit eval/train purpose: hosted evaluation may lack engine IDs, but eval traces cannot export a training contract. Training export preserves engine prompt IDs, sampled completion IDs, processed log probabilities, and loss masks; fatal findings reject export. No retokenization or zero-filled log probabilities as a substitute for engine evidence.
- Added provider-aware native Anthropic handling (`core/harness/capture/providers.py` and related routing/dialect/session code), retaining signed native blocks and supported metadata. Cross-protocol translation rejects semantics it cannot represent.
- Native Anthropic streaming bridge buffers upstream output and replays SDK-compatible events; it is not upstream first-token streaming.
- Fixed Google synthetic thought-signature base64 handling, dependent `top_logprobs` removal when repairing a rejected OpenAI logprob request, and HF route alias handling while preserving the upstream route.
- Added sampling/request validation and structured failure before resource allocation for invalid policies. Provider selection remains session-scoped.
- Preserved strict trajectory reconciliation. Prompt rewrites may produce multiple rows without invalidating sampled tokens; row cost and weighting remain separate concerns.
### Adapters and profiles
- Compatibility/install work covered OpenHands 0.49/Poetry, OpenClaw Node 24.16 and configuration upload, Copilot BYOK, Cline authentication, Grok model configuration, Kimi process-group isolation, and Antigravity CLI routing.
- ACP: explicit `opencode-1.18.30` profile. Partial native usage reconciliation is allowed only where known counts agree and missing-count steps match unique tool-call IDs; arbitrary missing/zero events are not discarded.
- NeMo: explicit `shell-1.9.0` workflow using the official NAT plugin inside the task sandbox. This does not qualify arbitrary NeMo workflows.
- `harness_profile=` is supported by rollout/trial configuration. Profile selection clones a seam locally instead of mutating the global adapter registry; unknown profiles fail explicitly.
- OpenClaw official export integration remains experimental: fixture tests pass, but the live bridge did not yield a valid per-call Harbor transcript. Its training profile remains failed.
### Gradio and qualification evidence
- Added `src/openenv/harbor/qualification.py` and evidence-aware support tiers.
- `OPENENV_HARBOR_QUALIFICATION_REPORT` selects the JSON report displayed by the UI.
- Stable harnesses are shown by default; experimental harnesses require opt-in; unstable harnesses are excluded. Without a report, adapters are unqualified and require experimental opt-in.
- Changing filters invalidates the previous selection; allowed selections are enforced on execution.
- The selected provider/purpose carries its qualified ACP or NeMo profile into the rollout and displays the profile in the label. Missing profile packages are not silently substituted.
- UI training downloads use the authoritative contract. Historical report evidence does not certify a newly entered endpoint or automatically pin a harness installation.
### Documentation
- Added `docs/source/guides/harbor-provider-qualification.md` and registered it in `docs/source/_toctree.yml`.
- Covers eval versus training capture, evidence gates, support tiers, Gradio configuration, profile scope, deterministic and live testing, and isolation.
- Subsequently added the dated final 29-adapter matrix, model profiles, counts, optimizer scope, and known limitations. All 29 matrix rows were checked against the frozen final report; Git whitespace checks passed.
## Final qualification results
All 116 harness/provider pairs were attempted on two fixed tasks per pair. These are compatibility smoke tests, NOT benchmark pass@1 scores or production-scale certification.
| Profile | Passing adapters | Model |
|---|---:|---|
| OpenAI evaluation | 21/29 | gpt-5.4-mini-2026-03-17 |
| Native Anthropic evaluation | 20/29 | claude-sonnet-4-5-20250929 |
| HF evaluation | 19/29 | Qwen/Qwen3.5-9B:together |
| vLLM capture + current optimizer evidence | 21/29 | Qwen/Qwen3.5-4B |
- **Stable (14):** claude-code, cline-cli, copilot-cli, gemini-cli, grok-build, kimi-cli, mimo, mini-swe-agent, opencode, openhands-sdk, pi, qwen-coder, terminus-2, vibe.
- **Experimental (9):** acp, antigravity-cli, codex, goose, nemo-agent, openclaw, openhands, swe-agent, trae-agent.
- **Unstable in this matrix (6):** antigravity-sdk, computer-1, cursor-cli, devin, eve, rovodev-cli.
Stable requires all three eval profiles and optimizer proof tied to current vLLM captures. Missing prerequisites do not establish universal incompatibility.
Important correction: ACP is experimental, not all-four passing. One OpenAI task failed. Its vLLM, Anthropic, and HF profiles passed.
### Reproduction profile
- vLLM 0.25.1; Qwen/Qwen3.5-4B revision `851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a`.
- TP=1, DP=1, BF16, 131072 context, eager mode; `qwen3_xml` tools, `qwen3` reasoning, thinking disabled; processed log probabilities and engine token IDs; prefix caching disabled; GDN Triton; image/video limits zero.
- Sampling: temperature 0.8, top_p 1, top_k -1.
- Fixed tasks: indices 8 and 9, `0000_430_430797_qa_4` and `0000_431_431678_qa_5`. Exact task/source hashes are in evidence.
- Smoke bounds: 17 model calls, 4096 output tokens, 600-second agent timeout, 1200-second driver timeout; E2B with bounded concurrency.
- HF route is pinned, but hosted weights are not an immutable revision.
## Validation completed
- Combined Harbor/core regression suite: **567 passed, 2 skipped, 2 warnings**. Log: `logs/20260915/harbor-regression-final.log`.
- Actual Anthropic SDK streaming replay passed separately in `.venv312`, covering the SDK dependency skip in the other environment.
- Experiment optimizer-evidence helper tests: 11 passed, including fixed-task identity enforcement.
- Ruff, usort, formatting, and Git whitespace checks passed for the final qualification changes.
- Real `AsyncGRPOTrainer` diagnostics consumed **99 current capture rows across 21 adapters**, with matching source hashes and row fingerprints.
- Optimizer jobs 79350, 79704, and 79761 completed. They processed 85, 8, and 18 rows respectively; their sum includes superseded captures, so it is not the current-row count.
- Diagnostics used the same 4B revision, paged_adamw_8bit, LR 3e-6, diagnostic advantage +1, and no weight synchronization. They verify trainer consumption and gradients, NOT reward-normalized learning, fair multi-row weighting, or a long training run.
- Final source snapshot contains 1,483 files with a SHA256 manifest. The last optimizer's release-candidate source differed from final only by verified AST-equivalent formatting in capture/compat.py.
## Known limitations to preserve
- Claude Code and other prompt-rewriting harnesses can produce many rows per rollout. Stable capture does not establish appropriate row budgets or weighting.
- Codex, Goose, and NeMo retain HF failures; Antigravity CLI retains OpenAI and Anthropic failures.
- SWE-agent timed out on Anthropic; Trae-agent captured no Anthropic calls.
- OpenHands and OpenClaw retain vLLM trajectory reconciliation failures. Antigravity SDK also failed strict reconciliation despite tool execution.
- Cursor, Devin, and Rovo Dev lacked required vendor credentials; Eve lacked its required application. Computer-1 requires desktop/vision qualification beyond this text-only profile.
- ACP partial native usage and NeMo missing independent native token counts are documented; engine capture is authoritative.
- An OpenCode transport failure was preserved alongside a successful same-profile fresh-tunnel retry. Do not erase first failures or claim a passing task reward is required for valid compatibility.
## Training isolation and resource cleanup
At the last read-only check on 2026-09-15, existing training job **79083** (`multi4-long-2b`) was RUNNING. Its command was:
`experiments/async_grpo_harbor_data_agent/logs/multi4-long-prod-20260915/source-snapshot/tools/launch_multi4_long.sh`
That launcher sets `CODE_ROOT=$TRAIN_RUN_ROOT/source-snapshot` and validates source hashes. The qualification worktree and documentation edits do not alter that snapshot. This is a dated observation, not an ongoing monitoring claim; recheck Slurm before reporting fresh status.
Qualification inference job **79176** was deliberately retired after consumers completed. Optimizer jobs completed, and cleanup found zero qualification-owned E2B sandboxes. Existing training/evaluation jobs were not canceled by qualification cleanup. No hopper-extra or shared-environment installs were used. Do not restart those services merely to review this handoff.
## CI/CD proposal — NOT implemented
The last response proposed the following; no new CI workflows have been added for this proposal:
1. Required PR checks: deterministic contract/provider/streaming/trajectory tests, sanitized response fixtures, malformed and truncated streams, retries, missing usage, tool calls, prompt rewrites, and concurrent-session isolation.
2. Scheduled/manual live matrix: two fixed tasks × 14 stable harnesses × four profiles = 112 rollouts. Experimental adapters weekly/on demand; unstable adapters remain outside required gates until prerequisites are met.
3. Weekly/pre-release optimizer diagnostics using fresh captures and exact provenance; no inherited optimizer pass for changed captures.
4. A separate weekly harness-upgrade sweep alongside pinned qualification runs.
5. Periodic concurrency testing for proxy isolation, cancellation, sandbox leaks, and throughput at intended load.
6. Publish matrix JSON, JUnit, sanitized logs, and capture/optimizer artifacts. Distinguish infrastructure errors, incompatibility, benchmark reward, and recovered flaky failures. Credentials only in trusted scheduled/manual runs; dedicated services, bounded capacity, no training interference.
Recommended next implementation: required regression workflow plus a reusable matrix CLI and scheduled report publication. Inspect existing experiment tools and repo CI first rather than rebuilding them blindly. No CI implementation or additional deployment is implied by the documentation request.
## Evidence entry points
- `logs/20260915/final-v1/REPORT.md`: matrix and explanation.
- `logs/20260915/final-v1/matrix.json`: exact cell provenance and capture/optimizer evidence.
- `logs/20260915/final-v1/completion-audit.md`: requirement audit.
- `logs/20260915/final-v1/support-limitations.json`: scoped failures.
- `logs/20260915/final-v1/final-checks.json`, `sha256.json`, `manifest.json`: checks and frozen artifact integrity.
- `logs/20260915/final-v1/teardown.json`, `sandbox-cleanup-audit.json`: cleanup evidence.
## Local file inventory at handoff
This includes inherited local changes; it is a review inventory, not a claim that every line was authored in this effort.
```text
M docs/source/_toctree.yml
M envs/harbor_env/harness.py
M src/openenv/core/env_server/http_server.py
M src/openenv/core/harness/capture/compat.py
M src/openenv/core/harness/capture/contract.py
M src/openenv/core/harness/capture/dialects/anthropic.py
M src/openenv/core/harness/capture/dialects/google.py
M src/openenv/core/harness/capture/dialects/openai_responses.py
M src/openenv/core/harness/capture/dialects/reasoning.py
M src/openenv/core/harness/capture/export.py
M src/openenv/core/harness/capture/forwarding.py
M src/openenv/core/harness/capture/graph.py
M src/openenv/core/harness/capture/runner.py
M src/openenv/core/harness/capture/server.py
M src/openenv/core/harness/capture/sessions.py
M src/openenv/core/harness/capture/upstream.py
M src/openenv/core/harness/capture/validate.py
M src/openenv/core/harness/capture/validate_llm.py
M src/openenv/harbor/atif.py
M src/openenv/harbor/client.py
M src/openenv/harbor/environment.py
M src/openenv/harbor/install_fixes.py
M src/openenv/harbor/models.py
M src/openenv/harbor/rollout.py
M src/openenv/harbor/runner.py
M src/openenv/harbor/seams.py
M src/openenv/harbor/serving.py
M src/openenv/harbor/shared_template.py
M src/openenv/harbor/startup.py
M src/openenv/harbor/ui.py
M tests/envs/test_capture_model_call_budget.py
M tests/envs/test_harbor_capture_level.py
M tests/envs/test_harbor_install_fixes.py
M tests/envs/test_harbor_per_session_engine.py
M tests/envs/test_harbor_reconcile.py
M tests/envs/test_harbor_rollout_contract.py
M tests/envs/test_harbor_seams.py
M tests/envs/test_harbor_session_factory.py
M tests/envs/test_harbor_shared_template.py
?? docs/source/guides/harbor-provider-qualification.md
?? examples/harbor/
?? src/openenv/core/harness/capture/providers.py
?? src/openenv/harbor/contract.py
?? src/openenv/harbor/e2b_stream.py
?? src/openenv/harbor/nemo_profile.py
?? src/openenv/harbor/qualification.py
?? tests/envs/test_harbor_acp_profile.py
?? tests/envs/test_harbor_capture_request_validation.py
?? tests/envs/test_harbor_e2b_stream.py
?? tests/envs/test_harbor_forwarding_lifecycle.py
?? tests/envs/test_harbor_google_signature.py
?? tests/envs/test_harbor_native_provider.py
?? tests/envs/test_harbor_nemo_profile.py
?? tests/envs/test_harbor_qualification.py
?? tests/envs/test_harbor_tito_training.py
?? tests/envs/test_harbor_ui_training_contract.py
```
|