Skip to content

fix(ci): repair the secrets baseline JSON - #6083

Merged
ananthsub merged 1 commit into
mainfrom
cwing/fix-secrets-baseline
Nov 12, 2026
Merged

ananthsub merged 1 commit into
mainfrom
cwing/fix-secrets-baseline

Conversation

@cwing-nvidia

Copy link
Copy Markdown
Contributor

What changed and why

#5775 merged a .github/workflows/config/.secrets.baseline that is not valid JSON: the benchmarks/healthbench_professional/prepare.py entry stops after "line_number": 25, without "is_secret": false and its closing } and ],. detect-secrets then fails with "Unable to read baseline", so the secrets-detector check fails on every PR.

This restores those three lines. No entries are added or removed.

No issue: CI breakage on main since #5775.

Validation

  • The file parses as JSON.
  • detect-secrets-hook 1.5.0 (the version CI installs) reads the baseline and passes on benchmarks/healthbench/prepare.py and benchmarks/healthbench_professional/prepare.py.

Rollout evidence

N/A: CI config only.

🤖 Generated with Claude Code

#5775 left the benchmarks/healthbench_professional/prepare.py entry unterminated, so detect-secrets cannot read the baseline and the secrets-detector check fails on every PR. Restore the missing is_secret field and closing brackets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Chris Wing <[email protected]>
@cwing-nvidia
cwing-nvidia requested a review from a team as a code owner November 12, 2026 20:31
@cwing-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test a239175

@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 12, 2026 20:32
@cmunley1

Copy link
Copy Markdown
Contributor

/review

@ananthsub
ananthsub merged commit b2a2791 into main Nov 12, 2026
73 checks passed
@ananthsub
ananthsub deleted the cwing/fix-secrets-baseline branch November 12, 2026 20:51
yaoyu-33 pushed a commit that referenced this pull request Nov 12, 2026
#5775 left the benchmarks/healthbench_professional/prepare.py entry unterminated, so detect-secrets cannot read the baseline and the secrets-detector check fails on every PR. Restore the missing is_secret field and closing brackets.

Signed-off-by: Chris Wing <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit b2a2791)
Signed-off-by: yaoyu-33 <[email protected]>
khazic pushed a commit to khazic/Gym-lao that referenced this pull request Nov 13, 2026
…box (NVIDIA-NeMo#5003)

* feat(environment): bind the agent's resources server when single_agent_turn names none

A legacy_agent relay names no resources server: the agent's /run uses its
own. A single_agent_turn_legacy server that replaces the relay had to pin
one, and a pinned name breaks a benchmark that reaches the server through
an _inherit_from rename of the agent. The rename also renames the
resources server, and Gym follows renames only for agent references, so
the pinned name dangles (for example indic/math_500 through
math_with_judge's server).

resources_server is now optional. Unset, the server binds the resources
server the bound agent names, as the relay did, so it follows the agent
rename. A server that sets none in front of an agent that names none
fails at startup instead of on the first episode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* feat(scripts): switch simple_agent relays to single_agent_turn_legacy

About 307 configs reach simple_agent through a legacy_agent relay, so a
crash repeats the whole episode. Under single_agent_turn_legacy, it
repeats only the current step, and simple_agent resumes inside its turn
(GYMINT-549).

add_legacy_agent_environment_servers.py gains --switch-simple-agent. It
replaces each relay in front of a simple_agent with a
single_agent_turn_legacy server of the same name, so rows keep their
routing. The server names no resources server, so it binds the agent's,
as the relay did, and follows an agent rename. It grants direct HTTP
access to the resources server's tools, the routes the agent's /run
called.

It resolves each config with its own config_paths, as Gym does, since
instance names are unique only within a run. A relay stays, listed with
its reason, when its agent binds no resources server, declares a grant
simple_agent sessions reject (a required MCP access or a second direct
HTTP access), binds a resources server whose seed_session takes only the
legacy body (19 relays today, read from the server's source so a server
passes once it migrates), or its run cannot load an include. A relay that inherits
another keeps inheriting it, and the script refuses to switch only one
of the two. The default mode is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(scripts): keep relays the switch would split or cannot drive

The pairing guard only compared `_inherit_from` children that carry their own
`legacy_agent` key, so a run that merged a switched relay with a same-name
`legacy_agent` override (the hle and apex_shortlist opencode/pi recipes) or a
bare `_inherit_from` child exited 0 with two environment server types.

- Resolve every run after the planned switches. A relay that a run merges with
  a legacy_agent server stays on the relay; when the relay it inherits switches,
  the script refuses (exit 2) and names the config. Top-level nulls now remove
  instances, as in Gym.
- Keep relays whose resources server reads the row's rollout coordinates
  (genrm_compare), whose implementation is not under resources_servers/, or
  that set keys the switched stanza would drop.
- Build every rewrite before writing any file; a stanza that cannot be found
  exits 2 instead of raising StopIteration.
- Dedupe scanned paths after resolving them.
- Give the hle and apex_shortlist opencode/pi recipes a legacy_agent server of
  their own, so their benchmarks can switch.
- Fix the docstring and docs examples, document the new stay reasons, note how
  to inherit the single_agent_turn templates, and test the legacy adapter with
  resources_server unset.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(scripts): keep every same-name declaration of a split relay

When two files of a run declare the same relay (a base and a partial
override of it) and a later config merges it with a legacy_agent server,
split_servers found two switching entries for the instance itself and looked
for a different inherited relay that was not there, raising StopIteration.
Every declaration of the instance now stays on the relay; the script still
refuses (exit 2) only when a different relay the instance inherits switches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(config): preserve benchmark relay names in harness overrides

Signed-off-by: yaoyu-33 <[email protected]>

* chore(configs): move simple_agent configs off the legacy_agent relay

Runs scripts/add_legacy_agent_environment_servers.py --switch-simple-agent
over the repository (GYMINT-549). 287 relays in front of simple_agent in
279 config files become single_agent_turn_legacy servers of the same
name, so a crash repeats only the current step instead of the whole
episode, and simple_agent resumes inside its turn.

20 relays stay, as the script reports:
- 19 whose resources server seeds only the legacy body (workplace_assistant,
  openenv, newton_bench, indirect_prompt_injection,
  example_session_state_mgmt, and the SWE example configs); they move
  once their servers accept the typed seed.
- benchmarks/nemotron_3_ultra/benchmarks_no_external.yaml, whose include
  benchmarks/ruler/config_nemotron_3_256k.yaml does not exist on main.

Tests and docs that read these configs follow the new key. The
super35 container build now covers single_agent_turn_legacy too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(configs): keep genrm_compare on the relay and soften the docs claim

Regenerated with the fixed --switch-simple-agent: genrm_compare's /verify needs
the row's _ng_rollout_index and cohort keys, which single_agent_turn_legacy does
not forward, so both genrm servers stay on legacy_agent. hle and apex_shortlist
still switch now that their opencode/pi recipes declare their own relay. The
YAML is byte-identical to a fresh generator run: 278 files, 285 relays switched,
22 kept.

The docs said every shipped simple_agent config uses single_agent_turn_legacy;
22 stay on the relay, so say "most" and name why.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* test(super35): expect 16 core server environments after the switch

The switched configs add single_agent_turn_legacy to the core batch's resolved
server set, so the prebuilt dependency check now reports 16 environment paths.
CI on Linux showed "16 server environment paths checked" against the old
expectation of 15; macOS Bash 3.2 stops these shell tests before the count.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(agent): report simple_agent session tool calls as observations

With model-call capture on, a simple_agent episode run through an
Environment Server (single_agent_turn, single_agent_turn_legacy) lost
its executed tool records: the session kept only the trajectory's
invocations and gaps, so the collected ng_trajectory had no tool_calls
and ng_perf.num_tool_calls was 0, while /run reported them.

The session now adds a ToolCallObservation for each executed tool call
to the agent observations it returns at close. Rollout collection
already merges these into ng_trajectory.tool_calls and rejoins each
call's output from the invocation conversation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
(cherry picked from commit 2ef4896)
Signed-off-by: yaoyu-33 <[email protected]>

* fix(config): relay session-less agents swapped onto single_agent_turn_legacy

A `--agent-type` swap onto an environment fronted by single_agent_turn_legacy kept
that server type even when the incoming agent does not implement agent sessions,
so every episode failed with NotImplementedError from /v1/agent_sessions.
Composition now rewrites such a server to a legacy_agent relay that calls the
agent's own /run, keeping its entrypoint, agent_server and host/port.

AGENT_SESSION_AGENT_TYPES in global_config is the single list of session-capable
agent types; the legacy-relay migration script reads it instead of its own copy,
and a unit test keeps it in step with the agent apps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
(cherry picked from commit d156ef2)
Signed-off-by: yaoyu-33 <[email protected]>

* refactor(configs): retire tool_simulation_agent and non_executing_simple_agent into simple_agent

Both agents make one model call and pass its tool calls to the verifier
unexecuted. simple_agent with execute_tools: false does the same as an
agent session, so its configs run under single_agent_turn_legacy and
resume inside the turn after a crash (GYMINT-217, GYMINT-147).

14 configs move: image_tools_pivot, swe_pivot, structured_outputs_v4,
seven single_step_tool_use_with_argument_comparison configs and four
terminal_multi_harness configs. Each agent keeps its instance name and
becomes simple_agent with execute_tools: false; its relay becomes a
single_agent_turn_legacy server, which simple_agent needs since it
refuses /run without tool execution; allowed_agents gains simple_agent.

The pivot-dataset skill's template and reference config writer emit
the same pairing. Both agents stay, marked deprecated, so configs
outside the repository keep working until a later release removes them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(configs): drop the unused tool grant from non-executing simple_agent configs

With execute_tools: false the agent never calls a tool, so the direct_http grant
on the 14 converted configs was unused, and the pivot skill's template already
omits it. It also made a silent mis-score possible: `--agent-type simple_agent`
is now allowed on these servers, composition does not carry execute_tools over,
and the swapped-in agent would execute tools through the grant against verifiers
that score one unexecuted call. Without the grant it fails loudly instead.

A repository test now asserts that no execute_tools: false simple_agent sits
behind a legacy_agent relay (its /run refuses) or gets a tool grant.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(env): own resources bindings and resolve inherited renames

Signed-off-by: yaoyu-33 <[email protected]>

* fix(deepagents): close agent session gaps and run behind single_agent_turn_legacy

The DeepAgents agent inherited SimpleAgent's session seed, which accepted a
direct HTTP tool grant that its own responses() never used, and SimpleAgent's
resumable checkpoint support without SimpleAgent's activation tracking.

- Refuse a sandbox and any required tool grant at seed with a final 422;
  skip optional grants. The session holds no Resources cookie jar.
- Reject execute_tools=false at config load: the graph runs its own tools.
- Take part in checkpoints as restart-only (GYMINT-357 tracks resuming).
- On the session path, require the seeded session and stop mirroring
  request cookies; close reports observation gaps instead of nothing.
- Move the reasoning_gym and tavily_search DeepAgents configs from the
  legacy_agent relay to single_agent_turn_legacy with no tool grants.

Refs GYMINT-141.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* test(deepagents): expect single_agent_turn_legacy in the DeepAgents config test

The core config test still required the legacy_agent relay that this PR
replaces. Assert the new Environment Server, its Resources Server
reference and the empty tool-transport grant instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* docs(deepagents): note --agent-type transports and skip_verification, test the optional-grant jar

The README now says that an Environment Server this agent is swapped into with --agent-type must also send no
tool grant, and that skip_verification does not apply on the session path. The optional-grant test now closes
the session and checks that the grant's cookies never become the Resources cookie jar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(deepagents): preserve sessions across stack composition

Signed-off-by: yaoyu-33 <[email protected]>

* fix(configs): bind Resources Servers for environment servers switched on main

`resources_server` is now required on `single_agent_turn` servers, and four configs switched on main after this PR was generated did not set it: beam, mimo_music, and vision_arena_v1 in their Resources Server configs, and the vision_arena_v1 benchmark, which renames its Resources Server through `_inherit_from` while the parent stays loaded. Each binding is the Resources Server its agent already uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>

* test(deepagents): import sandbox access types from the nemo_gym.sandbox facade

test_public_api_facades requires code outside the library to import exported
names from the package's public API, not from nemo_gym.sandbox.access.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(configs): bind renamed Resources Servers in benchmarks that compose

Five benchmark environment servers relied on the resolver to follow their
Resources Server rename. That works when the benchmark loads alone, but a run
that composes two benchmarks renaming the same Resources Server makes the
reference ambiguous, and the resolver refuses it with
AmbiguousResourcesRenameError. genrm_eval's test_mmrb composes genrm_mmrb1
and genrm_mmrb2 and fails this way. genrm_rewardbench2 and hle_diamond fail
the same way next to their sibling benchmarks, and indic/mbpp is bound for
consistency. Each binding is the Resources Server its agent already uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>

* test(config): import the binding test's parser from nemo_gym.config

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>

* refactor(deepagents): import agent session types from nemo_gym.agents

main moved nemo_gym.base_responses_api_agent to
nemo_gym.agents.base_responses_api_agent, and the agent session
conformance checks to nemo_gym.agents.testing. The old paths still
resolve but warn and go away in 0.10.0; nothing else on main imports
them.

Signed-off-by: weijia chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(configs): drop repeated timeouts from the DeepAgents configs

default_episode_timeout_seconds: 21600 and cleanup_timeout_seconds: 180
repeat the single_agent_turn_legacy server defaults. No other migrated
config spells them out, and the generator leaves them to the server
defaults, so drop them from the two DeepAgents configs. The composed
Environment Server configs still resolve to 21600 and 180.

Signed-off-by: weijia chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(deepagents): import agent session types from the nemo_gym.agents facade

Code outside nemo_gym/ imports exported names from the package's public
API; test_public_api_facades.py failed on the submodule imports of
AgentSeedRejectedError, AgentSeedSessionRequest, AgentCloseSessionRequest
and check_agent_seed_rejected, all of which nemo_gym.agents exports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* feat(deepagents): run Deep Agents in a borrowed task sandbox

When the Resources Server lends its task sandbox (sandbox_access), the seed
connects to it as a borrower and builds the session's graph with a deepagents
backend that runs the execute tool and the file tools in that sandbox through
AsyncSandbox. deepagents' own files stay in graph state. Without
sandbox_access the graph runs in process as before.

A session runs one activation as a task: identical retries join it, other
requests answer 409, and close cancels a running graph before disconnecting.
Close never stops a borrowed sandbox and reports a sandbox record with the
run's outcome.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* feat(deepagents): run the deepagents graph inside the task sandbox

Replace the tools-only sandbox backend with the sandboxed-harness pattern that Stirrup and Hermes use. A new
sandbox_agent.py entrypoint (SandboxedDeepAgent) installs a private deepagents runtime in the borrowed or started
task sandbox with SandboxPythonRuntime, stages sandbox_runner.py, and runs deepagents' own graph there under
SandboxSession and Gym's process supervisor. Model calls go from the sandbox to the rollout-prefixed Model Server
URL, so the agent now honors a task's agent_timeout_sec, supports rollout stops, needs no Python in the task
image, and confirms the harness stopped before close returns.

The in-process DeepAgentsAgent goes back to refusing sandbox_access and keeps its single-activation and
close-cancel handling. The LangChain chat model moves to a Gym-free module that both paths share.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* refactor(deepagents): unify agent server entrypoints

Signed-off-by: yaoyu-33 <[email protected]>

* fix(deepagents): preserve usage and session failure evidence

Signed-off-by: yaoyu-33 <[email protected]>

* fix(deepagents): reject unsupported response token budgets

Signed-off-by: yaoyu-33 <[email protected]>

* fix(langchain_deepagents_agent): retry every transient model status

The sandbox runner retried model calls only on HTTP 408, 429, 500, 502,
503 and 504. It now retries 408, 425, 429 and every 5xx, as well as
connection failures, and still never another 4xx. The bound is
unchanged: 3 attempts, each wait at most 30 s, so at most 60 s of
waiting per model call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(deepagents): preserve lifecycle cleanup and incomplete usage

Signed-off-by: yaoyu-33 <[email protected]>

* test(deepagents): validate lifecycle regressions on Linux

Signed-off-by: yaoyu-33 <[email protected]>

* fix(deepagents): type in-process model refusals and apply request fields

- Declare calls_model_from_sandbox on the app.py entrypoint class: its default builtin profile calls the Model
  Server from the task sandbox, and Harbor reads that literal from source.
- In-process search sessions now answer a Model Server refusal that another episode attempt would not change
  (a non-retryable 4xx) with a typed reply instead of an HTTP 500 that reruns the episode: a
  context_length_exceeded refusal ends incomplete and is verified, any other ends failed with
  model_request_error and its status. Retryable statuses, transport failures and legacy /run still raise.
- The in-process graph now applies the request's instructions, temperature and top_p to every model call, as
  the builtin profile does; it silently dropped them before.
- Document that concurrency bounds only sandbox runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(deepagents): settle sandbox deadlines from the supervisor receipt

- A wall_time stop counts only when the supervisor's receipt shows the deadline. A SIGTERM from inside the
  sandbox, such as a task command `pkill python3`, now ends the run failed with agent_run_error instead of a
  graded timeout.
- A deadline before any model reply now ends failed with model_transport_error, which the outcome policy
  retries, instead of grading the model's empty answer. A rollout stop stays a graded stop.
- The runner writes its report before closing its event loop and exits without joining deepagents' file-tool
  threads, which its own timeouts do not stop; a stop no longer outlasts the supervisor's grace period and
  leaves no report. A SIGTERM while the runner still imports deepagents leaves an empty stop report.
- The close record says cancelled only for a run that never launched; a launched run with no report is oom or
  unknown.
- Cap the runner's error, traceback and output-log text in activation errors.
- Tests: bounded waits on the sandbox episodes, the setup-failure test checks the lent sandbox is
  disconnected, and new tests for each ending above.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* chore(ci): refresh DeepAgents PR synchronization

Signed-off-by: yaoyu-33 <[email protected]>

* fix(ci): scope PR release rehearsals to changes against main

Signed-off-by: yaoyu-33 <[email protected]>

* fix(ci): repair the secrets baseline JSON (NVIDIA-NeMo#6083)

NVIDIA-NeMo#5775 left the benchmarks/healthbench_professional/prepare.py entry unterminated, so detect-secrets cannot read the baseline and the secrets-detector check fails on every PR. Restore the missing is_secret field and closing brackets.

Signed-off-by: Chris Wing <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit b2a2791)
Signed-off-by: yaoyu-33 <[email protected]>

---------

Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: Chris Wing <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: weijia chen <[email protected]>
Co-authored-by: Chris Wing <[email protected]>
weijiac0619 added a commit that referenced this pull request Nov 13, 2026
Main's #6083 repaired the secrets baseline with the same three lines as 485e809, so
.github/workflows/config/.secrets.baseline no longer differs from main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
osoblanco added a commit to osoblanco/Gym that referenced this pull request Nov 15, 2026
A clean merge. Main's NVIDIA-NeMo#6140 (the Stirrup client's per-image token
estimate) changes four files this branch also changes, in other lines;
neither side's changes are altered. It also brings main's repaired
secrets baseline (NVIDIA-NeMo#6083).

Signed-off-by: Erik Arakelyan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

3 participants