Repository navigation
fix(enterpriseops): retain databases until cleanup succeeds - #4774
Open
d-molinari wants to merge 1 commit into
Open
d-molinari wants to merge 1 commit into
d-molinari wants to merge 1 commit into
Conversation
Signed-off-by: Daniele Molinari <[email protected]>
d-molinari
marked this pull request as ready for review
October 20, 2026 16:04
This was referenced Oct 21, 2026
6 tasks done
7 tasks done
This branch has not been 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.
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
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 withUV_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.task_20251205_153330_906_a8eea1c0_8c7a6205The 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.