Repository navigation
feat: add Environment Server compliance checks for agent servers - #5441
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test ea1f7cf |
0fd4ec4 to
5548957
Compare
|
/ok to test 5548957 |
5548957 to
69d8800
Compare
|
/ok to test 69d8800 |
69d8800 to
37f7a45
Compare
37f7a45 to
99cfcd0
Compare
99cfcd0 to
26d0b2b
Compare
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43416801255 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43422358792 |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-authored-by: svcnvidia-nemo-ci <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
… guide Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
aa677f6 to
a4b3090
Compare
|
/ok to test a4b3090 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43427155596 |
Preserve the non-blocking compliance contract introduced by #5441: publish valid completed findings as neutral and let successful reporting exit zero. Keep all rule findings, locations, tested commit and artifact links visible. Missing, malformed, stale or contradictory evidence, failed probes and publication errors still fail closed. The shared strict reporting helper, agent APIs and compliance rules are unchanged. Validation: 253 focused reporting/conformance tests passed; all five findings from the previous CI artifacts are retained; pre-commit passed with the private catalog unavailable. Signed-off-by: Arnab Dhara <[email protected]>
…VIDIA-NeMo#5314) * feat(partner_if): add advertised tool-call checker Signed-off-by: Arnab Dhara <[email protected]> * docs(partner_if): record checker integration validation Signed-off-by: Arnab Dhara <[email protected]> * feat(partner_if): pin published dataset 2.1.5 Signed-off-by: Arnab Dhara <[email protected]> * feat(partner_if): integrate Prime child report sessions Signed-off-by: Arnab Dhara <[email protected]> * docs(prime_agent): remove local Docker smoke notes Signed-off-by: Arnab Dhara <[email protected]> * fix(ci): annotate public Prime integrity hashes Signed-off-by: Arnab Dhara <[email protected]> * feat(partner_if): add bounded recorded-context evaluation Pin the validated dataset and runtime assets, route the recorded-context task through agent sessions, and stop at a decisive ordering prefix. Keep private inputs external and use synthetic public fixtures. Retain Prime child observations and permit an explicit OpenCode snapshot setting. Signed-off-by: Arnab Dhara <[email protected]> * test(partner_if): declare no external tool servers in replay fixture Signed-off-by: Arnab Dhara <[email protected]> * fix(partner_if): declare replay search dependency and catalog manifest Signed-off-by: Arnab Dhara <[email protected]> * fix(partner_if): validate registry refs and preserve replay evidence Signed-off-by: Arnab Dhara <[email protected]> * chore(partner_if): refresh recorded-context dependency locks Align both recorded-context component locks with the OpenAI 2.45.0 requirement already on main. Regenerated using CI uv 0.13.4; no application code changes. Signed-off-by: Arnab Dhara <[email protected]> * test(partner_if): cover task and replay contract validation Exercise invalid prerequisite graphs, live-agent harness metadata, backend bundle layout, and pinned replay asset/path validation in the core test suite. All 52 new cases pass; combining their coverage with the five original CI artifacts raises coverage from 94.99% to 95.05% with the existing 95% gate unchanged. No production code or benchmark results change. Signed-off-by: Arnab Dhara <[email protected]> * fix(ci): keep completed compliance findings advisory Preserve the non-blocking compliance contract introduced by NVIDIA-NeMo#5441: publish valid completed findings as neutral and let successful reporting exit zero. Keep all rule findings, locations, tested commit and artifact links visible. Missing, malformed, stale or contradictory evidence, failed probes and publication errors still fail closed. The shared strict reporting helper, agent APIs and compliance rules are unchanged. Validation: 253 focused reporting/conformance tests passed; all five findings from the previous CI artifacts are retained; pre-commit passed with the private catalog unavailable. Signed-off-by: Arnab Dhara <[email protected]> * refactor(partner_if): reuse single_agent_turn for recorded replay Move bounded verifier-directed activations into the existing single-agent environment and use its typed episode protocol through the dispatcher. Keep ordering decisions and immutable capture checks in partner_if, preserving saved-prefix reuse, scoped evidence, and grading bindings. Validate with 2323 targeted tests, available pre-commit checks, and one fresh pif_029 evaluation each for Super and Astra. Both executions were healthy and unmasked; private guardword catalog was unavailable locally. Signed-off-by: Arnab Dhara <[email protected]> * fix(partner_if): install ripgrep in CI test environments Declare the pinned replay search dependency in the isolated Resources component and provision system ripgrep through the shared CI setup for core integration tests. Preserve startup validation and keep root package metadata and unrelated component locks unchanged. Validated with 2,585 regression tests, clean-PATH resource and core integrations, six installer tests, lock freshness checks, and all available pre-commit hooks. The private guardword catalog was unavailable locally. Signed-off-by: Arnab Dhara <[email protected]> * refactor(partner_if): run replay within the existing Gym lifecycle Move the bounded prefix loop into the response agent and retain trusted review receipts in PartnerIF Resources. Restore stock single_agent_turn and server-runtime types, keep continuation controls out of actor input, and validate the ordinary lifecycle with local HTTP integration tests. Signed-off-by: Arnab Dhara <[email protected]> * refactor(partner_if): reuse stock agents and Prime lifecycle Run recorded-context tasks with the stock Gymnasium agent and move frozen simulation, Explore, ordering checks and call budgets into PartnerIF Resources. Remove the dedicated agent and replay protocol, isolate ordinary grading, and keep the existing Gym core and Environment Servers unchanged. Reuse Prime session installation and lifecycle, restrict sandbox provider configuration to nemo, pin task wheels, and align deadlines and concurrency. Mask tool-schema recursion failures and retain supported recursive schemas. Refresh documentation and remove the obsolete validation history. Component and supplemental regressions and pre-commit pass. The real pif_029 Astra smoke passed. Prime live pairing/reproducibility, latest-main integration, and dataset publication/repinning remain explicit merge requirements. Signed-off-by: Arnab Dhara <[email protected]> * fix(partner-if): pin published dataset 2.1.8 Signed-off-by: Arnab Dhara <[email protected]> * refactor(partner-if): finish Prime session lifecycle Signed-off-by: Arnab Dhara <[email protected]> * fix(prime): lock shared runtime dependency installation Signed-off-by: Arnab Dhara <[email protected]> * fix(prime_agent): include cache writes in prompt usage Signed-off-by: Arnab Dhara <[email protected]> * fix(partner_if): address grading and replay review findings Validate advertised tool schemas for empty responses, release recorded-context state on checkpoint retirement, and preserve empty search input. AGA job 2098260 passed 738 PartnerIF tests. With Astra as policy and judge, 75 rollouts per revision on the same 25 tasks gave 82.67% to 84.00% full IF pass and 92.72% to 92.80% partial IF credit, with zero exclusions after rerunning the five simulated-tool tasks through OpenSandbox on both revisions. All nine rollouts on the three added tasks scored 1.0. Signed-off-by: Arnab Dhara <[email protected]> * fix(partner_if): retain scoped grading and interrupted delivery evidence Keep independent IF grading available when a completion-only tool registry is invalid. Normalize recorded probe options, reject virtual file and directory collisions before writes, and recover already delivered Prime reports from the SDK journals after confirmed supervisor interruption. AGA job 2102039 passed 752 PartnerIF and 168 Prime tests, including four real Linux supervisor interruption cases. AGA job 2101999 scored 1.0 on each of pif_027, pif_028, and pif_029, with three healthy rollouts and zero containers remaining. Signed-off-by: Arnab Dhara <[email protected]> * fix(partner_if): keep rejected shell commands from changing replay state Signed-off-by: Arnab Dhara <[email protected]> * fix(partner_if): handle recorded shell and parser edge cases Signed-off-by: Arnab Dhara <[email protected]> --------- Signed-off-by: Arnab Dhara <[email protected]>
What does this PR do?
Adds a non-blocking CI check that flags legacy patterns in agent servers. For each agent directory a PR changes, it installs the agent's venv the way Gym does for its tests, imports there the entry point that the agent's default config (
configs/<component>.yaml) names, orapp.pywhen it names none, and checks the concrete server classes that file defines:run().aggregate_metrics.A2 is structural: it passes when the agent implements session seed and close, directly or by inheritance. It does not check that the session path serves the task the way
/rundoes. #6035 lists inheriting agents whose sessions do not (agentic_turn_simulation_agent,gdp_pdf_agent,labbench2_vlm_agent,langchain_deepagents_agent,pi_sandboxed_agent,vision2code_agent). A2 passes for them, andAGENT_SESSION_AGENT_TYPESstays the source of truth for which agents serve sessions.Findings are
::warningannotations with the file and line, and the result is published as "Environment Server compliance (non-blocking)". The scheduled run ofcicd-main.ymlskips it. A manual dispatch ofcicd-main.yml, or a change to the suite itself (scripts/environment_server_compliance/,scripts/check_suites/or its workflow), checks every agent. Also skips harness conformance for changes underscripts/environment_server_compliance/. Stacked on #5370.A rule is a
checkon the class under test plus the ids of the rules itrequires. A rule whose required rules did not pass does not apply, and rules share facts about the class throughTarget.once, so a rule that runs the agent fits the same shape. The suite is split intoengine.py(rule types and evaluation, standard library only),component.py(default config, entry point and server classes),rules.py(the rules) andinspection.py(the entry point that the agent's venv runs).Also:
selecttakes--compare {branch,commit}like harness conformance, so a push tomainis compared with the commit before it.PYTHONPATH, as Gym does when it starts a server, so apps that import sibling modules by name (such asscicode_agent) load.checkout-ref, the merge commit of a PR mirror), and posts the check run to the event head, as harness conformance does.scripts/environment_server_compliance/README.mdlists the rules and how to run the check locally. The harness guide (add-or-update-a-harness.mdx) points new adapters to it.tests/unit_tests/tooling/test_ci_environment.pyleaves the new job out of the failure-notification gate, as it does for harness conformance.Validation
tests/unit_tests/tooling/test_environment_server_compliance.pyandtests/unit_tests/tooling/test_harness_conformance_ci.pypre-commit runon the changed filesci checkrun locally on all 65 agents:3 compliant, 62 with findings, 0 unavailable.langchain_deepagents_agentis checked at its entry point,reasoning_search_agent.py, not at the abstract base inapp.py.cicd-main.ymldispatch (41627950847): all 62 agents were inspected and the check run read1 compliant, 60 with findings, 1 unavailable. The one unavailable agent,scicode_agent, is fixed by thePYTHONPATHchange above.Rollouts
N/A: CI-only change.
Compatibility and benchmark impact
None. The check is a separate workflow job and does not gate other jobs.
🤖 Generated with Claude Code