Skip to content

fix(enterpriseops): retain databases until cleanup succeeds - #4774

Open
d-molinari wants to merge 1 commit into
mcuevas-nvidia-bench-integration-enterpriseops-signedfrom
codex/enterpriseops-session-cleanup
Open

d-molinari wants to merge 1 commit into
mcuevas-nvidia-bench-integration-enterpriseops-signedfrom
codex/enterpriseops-session-cleanup

Conversation

@d-molinari

Copy link
Copy Markdown
Contributor

When one EnterpriseOps database seed fails, other concurrent seeds can still succeed without their database IDs being retained for cleanup. A failed delete also marks the whole session as deleted, and reseeding a session can overwrite its existing database handles. These paths leave databases behind.

This focused follow-up targets mcuevas-nvidia-bench-integration-enterpriseops-signed, the head branch of #2142. It addresses the partial-seed cleanup review comment. A separate issue is unnecessary because this is a fix to behavior under review in that PR.

The resources server now waits for every concurrent seed attempt before cleaning up a partial failure, clears database handles only after successful deletion, and retains failed cleanup state for the janitor. Reseeding cleans the previous session first and fails with an actionable retry error if cleanup is incomplete. The janitor also preserves a replacement session created while it awaits deletion of the old databases. Seven regression cases cover these paths, including Boolean/exception delete failures and cached verification responses.

Only the resources server lifecycle and its tests change. Deployment configuration, task data, tool behavior, and scoring remain unchanged. The compatibility change is limited to reseeding after a cleanup failure: it now fails rather than silently replacing the outstanding database handles.

Validation

  • Six failure-path regression cases were run against the unmodified parent implementation first; all six failed. They pass with the fix. The seventh case protects the janitor/reseed race.
  • gym env test +entrypoint=resources_servers/enterpriseops_gym +should_validate_data=true +skip_venv_if_present=true: 113 passed, 1 skipped, and example-data validation passed. The isolated server environment was populated from the repository lockfile with UV_PROJECT_ENVIRONMENT=resources_servers/enterpriseops_gym/.venv uv sync --locked --extra dev. The skip is the optional locally prepared tool-snapshot checksum check (snapshots not prepared).
  • pre-commit run --all-files: passed on the final diff.
  • git diff --check: passed. Commit includes DCO sign-off.

Real-model rollout evidence

A smoke on the final implementation used the normal Gym SimpleAgent, OpenAI model server, and EnterpriseOps resources server against an existing real CSM Docker service, with azure/openai/gpt-5-mini, temperature 0, a 30-step cap, and an 8,192-token per-response cap.

Measure Result
Public example task task_20251205_153330_906_a8eea1c0_8c7a6205
Rollouts 1
Tool calls 11
Task reward 1.0
Strict verifiers 11/11 passed
Name-collapsed parity verifiers 3/3 passed
Elapsed rollout and cleanup time 54.71 seconds
Injected first deletion failure Database handle retained
Subsequent janitor cleanup Real delete succeeded; session removed

The inspected trajectory found the customer, product, entitlement, assignee, and group; updated the entitlement; created the critical case; and linked the resolution SLA. The SQL verifier results confirmed the expected changes. The smoke harness supplied the existing service endpoint and seed directory directly, so it does not validate managed sandbox startup or establish a full-benchmark result. This PR remains a draft for the parent PR author to review and incorporate.

@d-molinari d-molinari added bug Something isn't working area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers labels Oct 20, 2026
@copy-pr-bot

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers 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.

2 participants