Skip to content

fix(nooa): preserve terminal evidence through standard cleanup - #4357

Merged
init-nikhil merged 1 commit into
init-nikhil/nooa-durable-historyfrom
init-nikhil/nooa-eval-lifecycle
Nov 5, 2026
Merged

init-nikhil merged 1 commit into
init-nikhil/nooa-durable-historyfrom
init-nikhil/nooa-eval-lifecycle

Conversation

@init-nikhil

@init-nikhil init-nikhil commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Current heads — November 4, 2026

Head 76999654988d41b70d2175734fa5f81f8c5152b6; refreshed onto main 653846f949ad08a29df19c7de2ee4166d1c1bab3 before final CI/review. #4357 resolves main's dependency migration by keeping requirements.txt removed, updating all three NOOA pins in the managed environment pyproject.toml, and regenerating its uv.lock. The runtime loader and package layout from main are preserved. #4357 requires automation-team code-owner review for these dependency files.

Validation: 186 focused history, observability, result and sandbox-runtime tests passed; all-files pre-commit passed; uv lock --check --project responses_api_agents/nooa_agent passed. Current-head CI requested with /ok to test and must pass before merge. Below are earlier descriptions/evidence and may reference superseded heads.


Current stack revision — November 3, 2026

Head: 73c149b0c05fec482f7e09b0b88c924f437410da. Stack refreshed onto main 3880fa5024bf97199cba96ade2e0fa6ec9eb6fbf with current import locations and merge conflicts resolved. Each PR remains a separate layer; landing uses native stack merge.

#4088 now packages the launching Gym checkout using its unchanged root pyproject.toml and full core dependencies. The separate responses_api_agents/nooa_agent/runtime/pyproject.toml was removed. Tracked source and package assets are copied with their current contents; untracked files, Git metadata, and caches are excluded. This requires Git on the controller. Sandbox installation stays in its private Python, and source changes invalidate prepared offline wheelhouses. #4813 retains its workflow change and code-owner review requirement.

Validation: 87 focused runtime, offline-bundle, and task-network-policy tests passed after the refresh; all-files pre-commit passed (private guardword catalog unavailable). A real Gym wheel built successfully from the new archive format, and its NOOA entrypoint, resource dispatcher, and core package asset were verified. No model rollout or Linux installation was run for this packaging change. Earlier evidence below is historical and does not establish fresh results for this head.

GitHub dismissed earlier reviews after this update; current-head reviews and required CI are still needed.

Stack refresh — 2026-11-02

Current head: 04a484b0b3b3b22150a39ce83cdc03b5352f04a7. Stack refreshed onto main 2b8efc987af03951a80f941f2a278317badfe085. This PR remains a separate layer in the intended stack merge: #4088 → #4820 → #4821 → #4351 → #4357. #4813 is excluded.

Reconstructed each layer from its final reviewed patch instead of replaying foundation commits already merged into main. Resolved current package-import and legacy-environment renames while retaining upstream checkpoint handling and newer harness support. #4088 also exports its networking helpers through the current public API and mechanically updates existing callers; #4351 exports its newly used response types.

Fresh validation on the combined refreshed stack:

  • Full NOOA suite plus conformance runner/probe and harness-behavior tests: 913 passed, 10 Linux-only skips with pinned native NOOA 19caab169b018476ac433d040f6ae3f06aeff101.
  • Public-API facade suite and corrected GDPval recipe fixture: 372 passed.
  • Approved-prefix NOOA/network/recipe/metrics run: 671 passed, 10 skipped, and one GDPval fixture failure caused by the renamed legacy environment config; corrected and passed in the separate recipe run above.
  • pre-commit run --all-files: passed, including package layering, guardwords, lint and format.
  • Main advanced during validation; its intervening paths were disjoint from this stack. The final rebase was conflict-free, with the validated stack files unchanged.

No fresh real-model benchmark was run for this conflict/import refresh. Prior live-rollout evidence below is historical. Fresh reviews and required GitHub CI remain outstanding; this is not a merge-readiness claim.


Earlier implementation and validation (before this refresh)

  • retain terminal evidence and the original task error together with every cleanup failure
  • label policy-budget and invalid-policy-output stops incomplete while retaining genuine failures
  • isolate summary-fork state and preserve active-task background services under the existing lifecycle

Tests and validation

Head d7e3c22bc9a87b3f1da8ff9106361203a3b4fe61; base 055e0cfcee5fac6986f2c2dc4be5f833a370bdb7. The existing stack tracks this work; no separate issue is needed.

67 native adapter lifecycle cases passed (66 in the initial run and one socket-authorized rerun), along with 23 outcome/summary/retry cases. Fresh verification covered four summary-fork HTTP outcomes, nine terminal/cleanup outcomes and a three-call delegated background-service case. A separate two-call NVIDIA BenchAgent rollout earned synthetic fixture reward 1; capture and cleanup were inspected.

Focused outcome selection:

python -m pytest -q -p no:cacheprovider --import-mode=importlib \
  responses_api_agents/nooa_agent/tests/test_runner.py \
  responses_api_agents/nooa_agent/tests/test_observability.py \
  responses_api_agents/nooa_agent/tests/test_result.py \
  responses_api_agents/nooa_agent/tests/test_gym_llm.py \
  -k 'summary_transport or arbitrary_loop or fatal_transport or final_root or policy_stop or cleanup'

Root evidence follows the actual runner outcome while retaining child outcomes. Setup failure still closes the agent; cleanup cancellation preserves the original task cause. The full task appeared exactly once through native context after removal of the redundant benchmark_task block.

Universal descendant cleanup remains explicitly deferred and unfixed; the background fixture cleaned only its identified services. These synthetic local Linux cases use a preinstalled runtime and do not establish official benchmark scores, remote provider behavior or cold installation. Provenance/terminal-output evidence gaps remain; strict ATIF export is not certified.

pre-commit run --all-files passed. The recorded official Codex review returned no actionable findings; it could not execute the updated tests because its available environment lacked the pinned NOOA APIs. The source-bound tests, E2E and independent bug hunt above provide separate validation for this head and base.

CI snapshot (2026-10-24 05:44 UTC) on this head: 6 checks remain pending. Current checks. The all-green readiness gate remains unmet; no final verification-success post or new review request is implied.

@init-nikhil init-nikhil added bug Something isn't working area:agent Agent harnesses and Responses API agent behavior labels Oct 9, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

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.

@init-nikhil
init-nikhil added this pull request to stack #4352 October 9, 2026 22:54
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-eval-lifecycle branch from 5377f29 to 4849245 Compare October 9, 2026 23:30
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-eval-lifecycle branch from 4849245 to 9e33bfb Compare October 10, 2026 05:25
init-nikhil added a commit that referenced this pull request Oct 10, 2026
… failures

Adapt the useful lifecycle, failure handling, and NVIDIA gateway changes
from Razvan Dinu's PR #4291 (49b8daa)
on top of #4351's durable ordered assistant history.

Keep successful BenchAgent services alive through verification, bound
finish and cleanup, preserve terminal exceptions, isolate optional summary
failures, and retain unrecovered infrastructure failures as ungraded.
Align all active NOOA pins, including controller bootstrap, at 19caab1.
Add regressions for cleanup ordering, cancellation, fresh delegated shells,
recovery, failed-call evidence, and gateway copy-on-write normalization.

Signed-off-by: Nikhil Deshmudre <[email protected]>

NOOA-only rebuild of PR #4357 from 4849245.

NOOA-only scope: shared infrastructure remains identical to main.

Signed-off-by: Nikhil Deshmudre <[email protected]>
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-eval-lifecycle branch from 9e33bfb to 4a65ce9 Compare October 10, 2026 05:29
init-nikhil added a commit that referenced this pull request Oct 10, 2026
… failures

Adapt the useful lifecycle, failure handling, and NVIDIA gateway changes
from Razvan Dinu's PR #4291 (49b8daa)
on top of #4351's durable ordered assistant history.

Keep successful BenchAgent services alive through verification, bound
finish and cleanup, preserve terminal exceptions, isolate optional summary
failures, and retain unrecovered infrastructure failures as ungraded.
Align all active NOOA pins, including controller bootstrap, at 19caab1.
Add regressions for cleanup ordering, cancellation, fresh delegated shells,
recovery, failed-call evidence, and gateway copy-on-write normalization.

Signed-off-by: Nikhil Deshmudre <[email protected]>

NOOA-only rebuild of PR #4357 from 4849245.

NOOA-only scope: shared infrastructure remains identical to main.

Signed-off-by: Nikhil Deshmudre <[email protected]>
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-eval-lifecycle branch from 4a65ce9 to a65770c Compare October 13, 2026 08:22
init-nikhil added a commit that referenced this pull request Oct 13, 2026
… failures

Adapt the useful lifecycle, failure handling, and NVIDIA gateway changes
from Razvan Dinu's PR #4291 (49b8daa)
on top of #4351's durable ordered assistant history.

Keep successful BenchAgent services alive through verification, bound
finish and cleanup, preserve terminal exceptions, isolate optional summary
failures, and retain unrecovered infrastructure failures as ungraded.
Align all active NOOA pins, including controller bootstrap, at 19caab1.
Add regressions for cleanup ordering, cancellation, fresh delegated shells,
recovery, failed-call evidence, and gateway copy-on-write normalization.

Signed-off-by: Nikhil Deshmudre <[email protected]>

NOOA-only rebuild of PR #4357 from 4849245.

NOOA-only scope: shared infrastructure remains identical to main.

Signed-off-by: Nikhil Deshmudre <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 13, 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.

@giuliolovisotto

Copy link
Copy Markdown
Contributor

Thanks, this scoping makes sense. One labelling point carried over from my #4291 comment. It matters more here, because this PR makes limit stops gradable.

Two places still label policy_budget_exceeded and invalid_policy_output stops as failed. Neither is changed here:

  • the response status, in _set_response_lifecycle (nooa_agent/app.py:174-178);
  • the root AgentInvocation.status, in after_agent_call (nooa_agent/observability.py:107), which sets failed whenever the agent call raised.

So a run that stopped at max_policy_calls gets the verifier's reward but is recorded as an agent error. Other harnesses label limit stops incomplete (Pi on length/abort/model limit, Codex and NOOA itself on timeouts, OpenCode on length). Upcoming rollout health checks will treat failed as an agent error.

Could these two reasons map to incomplete in both places, the way timeouts already do? Any other exception would stay failed. It's a small change plus the test expectations. Happy to do it as a follow-up if you'd rather not widen this PR. cc @drazvan

- @claude

@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-eval-lifecycle branch from a65770c to 44ee1b9 Compare October 14, 2026 20:28
init-nikhil added a commit that referenced this pull request Oct 14, 2026
… failures

Adapt the useful lifecycle, failure handling, and NVIDIA gateway changes
from Razvan Dinu's PR #4291 (49b8daa)
on top of #4351's durable ordered assistant history.

Keep successful BenchAgent services alive through verification, bound
finish and cleanup, preserve terminal exceptions, isolate optional summary
failures, and retain unrecovered infrastructure failures as ungraded.
Align all active NOOA pins, including controller bootstrap, at 19caab1.
Add regressions for cleanup ordering, cancellation, fresh delegated shells,
recovery, failed-call evidence, and gateway copy-on-write normalization.

Signed-off-by: Nikhil Deshmudre <[email protected]>

NOOA-only rebuild of PR #4357 from 4849245.

NOOA-only scope: shared infrastructure remains identical to main.

Signed-off-by: Nikhil Deshmudre <[email protected]>
@init-nikhil
init-nikhil force-pushed the init-nikhil/nooa-eval-lifecycle branch from 44ee1b9 to 9dbf981 Compare October 14, 2026 21:18
init-nikhil added a commit that referenced this pull request Oct 14, 2026
… failures

Adapt the useful lifecycle, failure handling, and NVIDIA gateway changes
from Razvan Dinu's PR #4291 (49b8daa)
on top of #4351's durable ordered assistant history.

Keep successful BenchAgent services alive through verification, bound
finish and cleanup, preserve terminal exceptions, isolate optional summary
failures, and retain unrecovered infrastructure failures as ungraded.
Align all active NOOA pins, including controller bootstrap, at 19caab1.
Add regressions for cleanup ordering, cancellation, fresh delegated shells,
recovery, failed-call evidence, and gateway copy-on-write normalization.

Signed-off-by: Nikhil Deshmudre <[email protected]>

NOOA-only rebuild of PR #4357 from 4849245.

NOOA-only scope: shared infrastructure remains identical to main.

Signed-off-by: Nikhil Deshmudre <[email protected]>
@init-nikhil

Copy link
Copy Markdown
Member Author

Verification checks

PASS — scoped NOOA manual validation, October 20, 2026.

Head: 634921ea21d8221c6e62461193841cccc37d1e7d.
Actual stacked base: fb4bd83eddc4a00b74a0c499736632adbc4616be.

  • 489 tests passed, 10 platform skips using the exact pinned NOOA runtime. Command from responses_api_agents/nooa_agent: python -m pytest tests --import-mode=importlib -q -o addopts= -o log_cli=false --tb=short -rs. The skips require Linux installer behavior unavailable on the macOS unit-test host.
  • pre-commit run --all-files and git diff --check passed; signed-off source is clean. The new regressions reproduced the discarded-cleanup-error defect before the repair and passed afterward. Independent incremental probing passed 15 unique cases without new findings.
  • Six fresh Linux E2E groups passed on the exact final head/base: sequential cleanup (six scenarios), terminal contracts (nine), summary isolation (four), upstream loop guards (two), delegated/fresh background-service availability, and a live worker/HTTP/collector/verifier smoke.
  • The live smoke made two real NVIDIA model calls, executed Python and shell work, retained capture/reference joins and task evidence, observed cleanup before verification, and returned reward 1. Temporary host/container credential copies were removed; saved evidence passed an exact credential-value scan.
  • The official incremental Codex review returned no actionable regressions. Its ad hoc repository tests encountered incompatible local NOOA dependencies; the authoritative validation above used pinned NOOA 19caab169b018476ac433d040f6ae3f06aeff101 and OpenAI 2.44.0, with Python 3.13.14 on macOS / 3.13.15 on Linux.

Incremental scope: the final repair, affected contracts and changed shared runtime were checked; completed lower-layer Gymcheck workflows and the prior simplifier pass were retained. Source/import checks covered all 7,332 exported files and matched parent/isolated-worker dependencies. Historical failures and their fixture corrections remain preserved in the evidence ledger.

Limits: the two-cleanup-error trigger is a supported configured BenchAgent/BashSession extension producing real OS errors; a routine stock-BenchAgent trigger remains unproven. This is synthetic integration evidence, not benchmark-quality, cluster, OpenSandbox provisioning, provider-isolation or training-token-completeness evidence. Shared descendant teardown remains deferred: preserved background services can outlive invocation. The upstream noisy-background-stdout limitation is unchanged.

Required GitHub checks (Lint check, DCO, Nemo_CICD_Test) passed on this exact head. The non-blocking harness conformance check remains failed: its base-ref selection step cannot resolve the bare PR-base branch in a fresh Actions checkout and selects unrelated harnesses with existing adapter failures. Fixing that shared CI selector is outside this PR’s approved scope. This manual PASS is not an all-CI-green claim.

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP — no actionable reliability defects found in this light review.

Inspected all 14 changed files and traced cleanup-error retention, retry classification, summary-fork isolation, and loop-stop projection through the embedded and sandbox result paths. The changes preserve cancellation propagation and keep cleanup failures ungradable. Core, CLI, and benchmark dependency pins match.

Validation was static only; I could not execute tests or inspect the external pinned NOOA implementation. The PR’s reported test and live-rollout results were not independently verified.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@init-nikhil

Copy link
Copy Markdown
Member Author

/ok to test 4c632f3

@init-nikhil

Copy link
Copy Markdown
Member Author

/ok to test c5e26e8

@init-nikhil

Copy link
Copy Markdown
Member Author

/ok to test 863cc7f

@furgalep furgalep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review notes from a pass over the cleanup and invocation-status changes (the background-service preservation is intentional, so it isn't flagged). The main theme is the trajectory's invocation status disagreeing with the runner's actual classification of the run; inline details follow.

@init-nikhil init-nikhil left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

CODEX SELF REVIEW

Reviewed head d7e3c22bc9a87b3f1da8ff9106361203a3b4fe61 against actual base 055e0cfcee5fac6986f2c2dc4be5f833a370bdb7 using a fresh official codex exec review process.

No actionable regressions were identified in the changes. Runtime validation was limited because the available environment lacks the newly pinned NOOA APIs; the updated tests could not be executed.

This is a source-review result, not an approving review or a substitute for the separate validation and CI gates.

furgalep
furgalep previously approved these changes Oct 25, 2026

@furgalep furgalep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@init-nikhil

Copy link
Copy Markdown
Member Author

/ok to test dc7f88d

@init-nikhil

Copy link
Copy Markdown
Member Author

/ok to test 44a1c13

furgalep
furgalep previously approved these changes Oct 29, 2026

@furgalep furgalep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

furgalep
furgalep previously approved these changes Nov 3, 2026

@furgalep furgalep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@init-nikhil

Copy link
Copy Markdown
Member Author

/ok to test 73c149b

adil-a
adil-a previously approved these changes Nov 4, 2026
furgalep
furgalep previously approved these changes Nov 4, 2026
@init-nikhil

Copy link
Copy Markdown
Member Author

/ok to test d8ed3c5

@init-nikhil

Copy link
Copy Markdown
Member Author

/ok to test 7699965

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

This branch was previously deployed

1 inactive deployment
public — 76999654 Deployed Nov 4, 2026 by copy-pr-bot[bot] via release / finalize / notify #10181
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 bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants