Repository navigation
Conversation
tavily_search keeps one piece of per-session state: the Tavily call metrics that /verify returns. It used the base class's default typed seed, so nothing was fenced or released: the cookie-keyed defaultdict grew for every session, and a late tool call recreated an entry. - seed_session handles the typed body: the session is keyed by resources_session_id, a repeated seed returns it, a seed bound to another episode or a closed session gets 409, and task_data without question or ground_truth gets 422. - close_resources_session releases the metrics by resources_session_id (no cookie needed), is idempotent, and fences late seeds with ResourcesSessionFence. A tool call for a session closed within the window gets 404 instead of recreating its record. - verify keeps a typed session's metrics for its close and releases any other session's, so the /run and MCP paths stop growing the map. - With dump_session_id_to_metrics_on_exit on, released metrics stay until shutdown so the dump still lists every session. The tools and the score read no session state, so an unseeded caller keeps working and a verify for a session the server no longer holds still scores the response (with empty metrics) rather than masking it. Refs GYMINT-227. Signed-off-by: yaoyu-33 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
/ok to test 421c084 |
Contributor
Every server under the resources session contract answers a verify for a closed session with lost_session_verification, including those whose reward reads only the response, so a closed session is handled the same way everywhere. single_agent_turn verifies before it closes, so the mask only catches an out-of-order verify. TavilySearchVerifyResponse now inherits BaseVerifyResponse so it can carry mask_sample and failure_kind. A session nobody seeded, such as an MCP client's or an Agent's /run, holds no state and is scored as before. Refs GYMINT-227. Signed-off-by: yaoyu-33 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tibility path Describe the typed seed as the path new configs use, and name the configs whose agents still call the tools from their own /run, which the server keeps serving until they switch to an Environment Server. Signed-off-by: yaoyu-33 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
/ok to test 0d1b50b |
yaoyu-33
marked this pull request as ready for review
November 3, 2026 18:33
Signed-off-by: yaoyu-33 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…he session docs Adds a test that closes a session while web_search awaits Tavily and checks the late search does not recreate its metrics, the property the PR relies on and that a refactor re-indexing the defaultdict after the await would break. Adds a test for a seed that names another task for the same episode (409), and renames the 422 test, which ends with a corrected seed succeeding. Docs: langchain_deepagents_agent calls Tavily with its own client and uses only /seed_session and /verify, so it never reaches the tools and its metrics are always empty. The 409 seed, 404 tool call and masked verify after a close hold for session_close_retry_window_seconds, not forever. The conformance import moves to nemo_gym.server_runtime.testing. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 02d74cc |
Signed-off-by: yaoyu-33 <[email protected]>
zyzhou5
reviewed
Nov 4, 2026
The /run seed guard refused any body sharing a key with ResourcesSeedSessionRequest, so a dataset row with a scalar task_id (HLE rows, gdpval, arc_agi, ...) got 422 on every seed. Treat a body as a malformed typed seed only when it names resources_session_id or carries typed episode_id and task_id objects, the rule #5480 settled on. Also import check_resources_session_contract from nemo_gym.server_runtime, which main's public-API test requires, and correct the docs: when Tavily is only a tool server (HLE opencode_search / pi_search), its /verify and /close_session never reach those sessions, so their metrics stay until shutdown, as on main. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test d102e44 |
Signed-off-by: yaoyu-33 <[email protected]> # Conflicts: # nemo_gym/server_runtime/base_resources_server.py
…ment the hook contract - A cancellation that arrives while a failed initialization is being cleaned up now propagates instead of being swallowed by the cleanup guard. - A cookie reseed that released the preceding run moves its finished receipt into the retry window, so a failed replacement no longer leaves a pending-cleanup record with nothing to release. - Document that a disconnect leaves a verification release pending, that the release hook runs under the session lock, that state is per worker with session routing keeping a session on its owner, and the override rules for servers that keep their own seed and close. - Rename the example server's private episode table so it no longer shares a name with the base's. - Add regressions for the receipt deadline guard, worker ownership wiring, cookie seed races and fences, typed seed takeover, restore refusals and a cancelled close waiting on verification. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
…he exit-dump archive Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 51703ca |
The docs now describe only the typed Environment Server path. The cookie seed still works unchanged; the PR description records that compatibility. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test c68eee3 |
Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 1304e5b |
Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 4ae9f06 |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Serve typed Tavily search sessions and use the shared lifecycle from #5709 for identity, verification cleanup, close, and retirement. Live metrics are always removed on release. With
dump_session_id_to_metrics_on_exit: true, a separate export archive preserves shutdown metrics without making a released session appear live.The shared lifecycle in #5709 and MCP support in #5708 are merged into main. This PR contains only the Tavily migration and related tests/documentation. No separate issue is needed for this focused migration of an existing resources server.
finally, including after judge failure; retries recompute the verdict from the request and use that independent snapshot.Validation
Final Tavily source at
4ae9f0647, on workstationws, Python 3.13.14, with the validation checkout first onPYTHONPATHandNEMO_GYM_EXTRA_ROOTS:python -m pytest -o addopts='' -o log_cli=false --import-mode=importlib --tb=short -q resources_servers/tavily_search/tests: 143 passed. The base session contract checker failed on the preceding implementation with export enabled (close left state for resources-session) and passes after the fix. Regressions cover both export settings, close during a search, shutdown output, snapshot retries, and reseeding after receipt expiry.pre-commit run --all-files: passed in the combined validation checkout, including Ruff, formatting, guardwords, configuration checks, README generation, and import layering.git diff --checkpassed. New commits include DCO sign-off.fern/,npm run check -- --warnings: 0 errors; redirect checking was skipped because Fern authentication was unavailable.nvidia/nemotron-3.5-lightning-30b-a3band a live Tavily search, with exit export enabled: the model answered Paris and the regex verifier scored 1.0, unmasked. Live metrics/identity were released, retry metrics matched, close succeeded, and shutdown exported the one search record. All four changed files matched the committed source hashes before and after the run. This bounded lifecycle diagnostic used an empty exclusion policy and the regex verifier; it does not establish benchmark parity, exclusion-policy effectiveness, or live judge behavior.739ce5764e034461a4d9cebb57915321a64381c7used live Tavily and the actual model judge; four searches and six model calls completed, and the judge correctly rejected the model's incorrect answer with reward 0.0 unmasked. Cookie MCP behavior is covered by unit tests.The branch includes main at
acb67734c. The earlier combined refresh passed all nine environment suites (904 tests) and shared lifecycle/MCP/process-supervisor checks (213 tests); those counts describe that earlier validation, not the latest focused run. These checks do not replace the current repository CI matrix or review approval.