Skip to content

feat(agentvista): add original and OpenCode evaluation pipelines - #5772

Merged
yfw merged 37 commits into
NVIDIA-NeMo:mainfrom
bpritam14:feat/agentvista-opencode-integration
Nov 16, 2026
Merged

yfw merged 37 commits into
NVIDIA-NeMo:mainfrom
bpritam14:feat/agentvista-opencode-integration

Conversation

@bpritam14

@bpritam14 bpritam14 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Approved-PR conflict resolution

Merged current main (a349aa68) with a signed merge commit, retaining the reviewed AgentVista harness/verifier unchanged. Resolved three conflicts in telemetry/Slurm tests and rendered fixtures: keep upstream's node-local collector/copy-out lifecycle and retain explicit Slurm account propagation. No rebase, force-push, review dismissal or branch-rule change.

Approval status: GitHub automatically dismissed the prior approvals from yfw and chtruong814 when this merge commit was pushed (review IDs 5913673361 and 5914337237; timeline dismissal commit matches this head). The earlier API-visible rule inspection did not predict this behavior. The approvals were not preserved, and fresh reviewer approval is required; no review or branch-protection bypass was attempted. All 365 telemetry/Slurm tests and 105 native AgentVista/resource/core tests passed on the merged tree. Full pre-commit and secret scanning passed; the optional private guardword catalog was unavailable locally. New model smoke: N/A for fixture conflict resolution; AgentVista adapter files match the previously approved/live-tested head.

CI passed on 59aeee16baca63ca945bfe28866bf047694acbb2: main CI, wheel build/validation. All four core shards, all eight server shards, sandbox tests, AgentVista/CrewAI compliance and selected harness conformance passed. Combined core coverage is 95.03%, above the unchanged 95% threshold. All 85 check runs completed with no failure/pending state. Approval preservation failed: the original approvals were automatically dismissed on this push; current review decision is REVIEW_REQUIRED.

AgentVista provides two evaluation-only protocols through NeMo Gym: the original greedy harness and OpenCode CLI 1.17.11 with the original four tools over MCP. Both route policy traffic through Gym and use the original answer judge. Preparation, source checks, runtime builders and benchmark code live in Gym. No separate issue is needed for these CI integration repairs to the benchmark introduced by this PR.

Latest reviewer fixes

  • Reject default-harness output budgets outside 0 < output_tokens < context_tokens as masked agentvista:setup failures before source loading or inference, matching OpenCode. Invalid settings no longer reach upstream's empty-answer scoring path.
  • Cache only completed, consistent binary judge verdicts. Failed, timed-out, cancelled, malformed and preexisting incomplete attempts are archived with their diagnostics. A JudgeError reaches Gym's standard /verify failsafe as judge_failed, preserving the exact saved answer for a later verification. Measured zero/one verdicts remain reusable across retries and restarts; concurrent duplicates share one judge subprocess. No automatic retries or manifest-reverification support are added.
  • Validation: all 101 native/CLI/agent/resource tests, the four core manifest/import-boundary tests, the exact resource CI command (25 tests plus offline verifier fixtures), full pre-commit and secret scanning passed. Four invalid-budget cases and ten judge-recovery cases all failed against the previous production code in an isolated subprocess, confirming the regressions detect the bugs. Private guardwords were unavailable locally; remote CI remains the gate.
  • Fresh bounded Kimi API evidence is recorded in review-v5-recovery-api.json. The endpoint now requires top_p=0.95; the first attempts at the benchmark default 1.0 were rejected and masked. Reruns use an explicit per-row provider override, leaving benchmark defaults unchanged. The receipt reports actual outcomes and execution-health limits; it is not a benchmark accuracy estimate.

Upstream main at 76116d5d is merged so GitHub can construct a testable merge revision. The one CrewAI timeout-test conflict retains upstream's deterministic deadline trigger and the exact request-count assertion; both affected CrewAI tests passed. The merged AgentVista/native/core suite passed 105 tests. AgentVista and VLLM adapter files are byte-for-byte unchanged from the live-smoke commit. Previous-head CI passed on f034c038cc45eb85fcaf4a6ef4d00a455b8263f2: main CI, wheel build and validation. All four core shards, all eight server shards, sandbox tests, AgentVista/CrewAI compliance and the selected harness probes passed. Combined core coverage is 95.04%, above the unchanged 95% gate. Secrets, lint, copyright, DCO, guardwords and Linux/macOS lock checks passed.

CI failures addressed

  • Register agentvista_agent in AGENT_SESSION_AGENT_TYPES; configuration composition now recognizes the session hooks.

  • Add the verifier's required task_data.py with hash-bound task identity and legacy verifier_metadata placement. Bind the agent's dataset to the Resources Server so collation selects that schema.

  • Correct the manifest to name the agentvista implementation rather than the agentvista_resources runtime instance. Use the verifier profile and four offline fixtures (positive, negative, missing reference, unparseable provider). CI validates the production judge adapter with only the external provider/source module replaced; no fabricated example rollouts or metrics are committed.

  • Give runtime paths documented container defaults so manifest/fixture validation resolves without cluster-only environment variables. Source and worker defaults match the runtime image; datasets remain external and every real run checks source/task hashes.

  • Repair shared timing-sensitive tests: real HTTP retry-budget correctness is asserted by one actual request and exact fake-clock tests, without a scheduler-dependent 150ms ceiling. CrewAI deadline fixtures allow cold imports, require partial output/readiness, and retain deadline, cancellation, usage and sandbox-cleanup assertions. Product timeouts/retry policies are unchanged.

  • Remove CrewAI's redundant rejection-only run() override. It now inherits Gym's standard terminal 422 refusal (previously 409); its normal agent-session execution is unchanged. The refusal regression and the actual CrewAI compliance probe both pass with no findings.

  • Add core verifier-boundary regressions for measured-zero preservation, concurrent retry sharing, durable receipts, actor-score rejection, missing evidence, aggregate metrics, incomplete receipts and failed judge subprocesses. The previous complete CI passed all four core and eight server shards plus both compliance probes; its combined coverage was 94.94%. Replaying its five coverage artifacts with these new tests reaches 95.03%, above the unchanged 95% gate. Core tests import types from their defining modules; the exact repository import-boundary check and all three manifest/verifier tests pass together.

Episode and scoring ownership

Gym's single_agent_turn_legacy Environment Server owns seed → activate → close → verify. Its name refers to the flat-row adapter; it does not relay to a custom agent /run. The agent implements real session hooks and defines neither run() nor aggregate_metrics().

The dedicated Resources Server owns the original judge and score aggregation. Gym strips VERIFIER_* credentials from actor workers; the native loop's terminal score callback records its original assistant-response list. Only the verifier establishes measured rewards, rechecks task/image identity, and persists completed verdicts so HTTP retries do not invoke the judge again. Provider/parse/binding/process failures stay masked; a measured wrong answer stays an unmasked zero. Verifier deadlines/cancellation kill its process. Unsupported borrowed sandboxes and required external tool grants are refused with 422; close cancels an active worker and returns cleanup confirmation plus an explicit observation gap.

Harness 5.0.0 needs freshly prepared rows with agent seed context and fresh outputs. Both benchmark config names and Factory's --agent agentvista_agent selector remain unchanged. Training, checkpoint continuation, arbitrary pairings, typed tool/model joins and complete usage are unsupported. Admission/retry bindings support one server worker. Stock opencode_agent generalization remains separate work.

Code-tool isolation

Both harnesses run the original code_interpreter in a mandatory Bubblewrap sandbox. Gym's AsyncSandbox supervises the fixed launcher; the local process provider itself is not the isolation boundary. Bubblewrap unshares the filesystem/process/network namespaces, clears the environment and drops capabilities. There is no host fallback.

  • Read-only mounts contain only the trusted Python runtime/libraries and three verified original tool modules. Writable state is ephemeral. Dataset files, reference answers, host homes, credentials and host process environments are excluded. A runtime prefix overlapping protected data is rejected.
  • Inputs cross the sandbox channel as image bytes. Outputs return as bytes and are decoded into new host filenames. Unknown image references and unsafe labels cannot make the original host-side image loader follow arbitrary paths.
  • The stateful Jupyter kernel, original tool schemas, image variables and image feedback remain available. Jupyter lifecycle/readiness handling replaces the upstream ten-second connection-file poll, which failed during a cold shared-storage test. Code has no network access; the original search and visit tools remain trusted host-side services.
  • Startup/transport faults are recorded and mask the episode. Cancellation removes the namespace and detached descendants. A sandbox failure never silently turns into a scored model zero.

bwrap and a host/container policy allowing nested user namespaces are required. Both image builders provision Bubblewrap; rebuild older worker images. Namespaces share the host kernel and do not provide VM isolation. Runtime prefixes must be trusted code/library trees, and resource admission remains the deployment's responsibility.

Validation

  • 860 focused data/configuration/retry/agent-verifier regressions passed. A final 200-test wiring/retry run including the new metadata/manifest checks also passed (these runs overlap).
  • The exact failing server command now passes: gym env test +entrypoint=resources_servers/agentvista +should_validate_data=true, including all ten server tests and the four offline verifier cases. The manifest's implementation binding and dataset schema have dedicated regression tests.
  • A full parallel local CrewAI 1.15.34 run passed 93 tests and exposed the same startup assumption in one retry-sleep deadline case. After fixing that case, both its variants passed in a focused rerun. The other two revised deadline tests pass with retained tool output and cancellation evidence. The preceding full CI head passed every server shard, including the complete CrewAI suite.
  • 303/303 managed locks, pre-commit run --all-files, git diff --check, and the exact secrets-detector hook passed. The optional private guardword catalog was unavailable locally; no CI exclusions were added. New commits carry DCO sign-off. Main 76116d5d is merged.
  • Earlier validation at the session migration included 72 native/CLI agent tests, five verifier tests and 705 broader environment/session/manifest regressions; the new focused runs specifically cover the CI gaps those checks missed.

Two fresh bounded Kimi K3 API smokes loaded the actual benchmark YAML includes, validated prepared rows with the Resources schema, and exercised Environment Server → agent sessions → Resources Server → original judge. Both retained valid measured zeros. OpenCode made two tool calls with no native/tool errors and reached its 240-second actor deadline with retained output, scored under the existing policy; this is not healthy-execution qualification or a benchmark accuracy estimate. Receipt: review-v5-ci-wiring-api.json.

No full-dataset evaluation or new runtime image build is claimed. Previous-head trusted CI passed on 17b23b7dea401f353c96a132db4ee5e46dc4227c: main CI, wheel build/validation. All four core shards, all eight server shards, sandbox tests, both AgentVista/CrewAI compliance probes and all selected harness conformance probes passed. Combined core coverage is 95.03%, clearing the unchanged 95% gate. Secrets, copyright, DCO, lint, guardwords and Linux/macOS lock checks passed. The earlier 94.94% coverage failure and subsequent test-import boundary failure are resolved on this exact head.

Benchmark questions, answers, prompts and judge rules are unchanged. Existing frozen cluster campaigns are untouched. Shared Slurm/account and bound-directory changes remain split into #6116 and included in this branch; #6015 has not been rebuilt on that dependency here.

Public dependencies and licensing

The unmodified original implementation is a runtime dependency pinned to hkust-nlp/AgentVista a3385d51d0c3dd0c8501350a08d52065e3e94ab4, not vendored or relicensed into Gym. Runtime source hashes are recorded in responses_api_agents/agentvista_agent/runtime/source-pin.json. The public Warrieryes/AgentVista dataset is pinned to release revision 61de767ad8c72e258ac71a0aef952b89ca920a16 and licensed CC-BY-4.0. Gym-owned integration files retain NVIDIA SPDX notices; external data/source/assets are provisioned separately.

Secrets-detector baseline

The earlier fix contains 51 exact reviewed non-secret provenance-digest/revision fingerprints, including 26 source digests verified against pinned upstream Git objects. Existing baseline entries, detector plugins and exclusions were preserved; a fresh synthetic entropy control remained detected. This CI repair adds no detector exclusions or suppressions.

@copy-pr-bot

copy-pr-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Nov 6, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added feature New capabilities, enhancements, or enablement work area:agent Agent harnesses and Responses API agent behavior labels Nov 7, 2026
@bpritam14 bpritam14 changed the title feat(agentvista): integrate OpenCode evaluation and training adapters feat(agentvista): add default and OpenCode evaluation pipelines Nov 10, 2026
@bpritam14
bpritam14 marked this pull request as ready for review November 12, 2026 18:38

@yfw yfw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HOLD. Four setup and CI breaks block merge. The scoring comments explain what to change after that. The design comment recommends a larger change that does not block merge.

AgentVista is a useful benchmark to have in Gym. The work is careful: pinned upstream sources, hash-bound task data, separate failure kinds and sanitized evidence.

Design: Gym's direction is environments that any session harness can run. The OpenCode half of this PR duplicates opencode_agent with a second launcher on the deprecated /run relay. The comment on benchmarks/agentvista/config.yaml:39 says what to change, and how a coding agent can do it with the add-harness skill. Our Harness-Ready Environments runbook walks through this move step by step. The move does not block merge, and the choice is yours. We recommend it in this PR.

Evidence: the live runs in the description used earlier commits and private infrastructure, so reviewers cannot repeat them. The last commit also breaks server setup.

Process: CI ran only the DCO and lock-freshness jobs, and both pass. The other workflows wait for a maintainer to approve this head. The PR has no merge conflict with main. Local runs at this head: pre-commit passes. The full core unit suite has 3 failures that this PR causes, at requirements.txt:1, test_requests.py:123 and slurm_script.py:234. The CI server suite also fails on the missing agent README, noted at app.py:9. gym env test for the agent stops at setup until requirements.txt is removed.

Generated by Claude Code

Comment thread benchmarks/agentvista/config.yaml Resolved
@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-maintainers Waiting on maintainers to respond label Nov 13, 2026
@bpritam14 bpritam14 changed the title feat(agentvista): add default and OpenCode evaluation pipelines feat(agentvista): add original and OpenCode evaluation pipelines Nov 13, 2026
@bpritam14

bpritam14 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Synced current main 705c76e0; final head eb1462ef1dcde00f09fd905c0e86fa5a40044602. Post-sync validation: 1566 core tests + 1150 managed vLLM tests + 55 AgentVista tests passed; all 298 tracked project locks passed uv lock --check; pre-commit passed (optional private guardword catalog unavailable). Both bounded Kimi K3 live smokes reached the original judge and retained measured zeros. Replies to all 27 review comments are posted; #6116 holds the shared orchestration dependency. The sandbox/resources-server migration remains explicitly deferred, and the integration does not claim host-code isolation. DCO and Autobot lock-freshness are now both green after the main sync. Full CI still needs maintainer authorization for this external head.

@bpritam14

Copy link
Copy Markdown
Contributor Author

/ok to test 17b23b7

Comment thread resources_servers/agentvista/app.py Resolved
@bpritam14

Copy link
Copy Markdown
Contributor Author

/ok to test 382bd12

@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 15, 2026 23:27
@bpritam14

Copy link
Copy Markdown
Contributor Author

/ok to test f034c03

yfw
yfw previously approved these changes Nov 16, 2026
chtruong814
chtruong814 previously approved these changes Nov 16, 2026
@yfw
yfw added this pull request to the merge queue Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43825877505

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 16, 2026
@bpritam14
bpritam14 dismissed stale reviews from chtruong814 and yfw via 59aeee1 November 16, 2026 17:23
@bpritam14

Copy link
Copy Markdown
Contributor Author

/ok to test 59aeee1

@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 16, 2026 17:26
@yfw
yfw enabled auto-merge November 16, 2026 17:51
@yfw
yfw added this pull request to the merge queue Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43925909654

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Nov 16, 2026
Merged via the queue into NVIDIA-NeMo:main with commit b7d38d5 Nov 16, 2026
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants