Repository navigation
[rollout] feat: add agent_started_at and OpenSandbox request timeout env - #459
Merged
Merged
Conversation
…mp, stamp lease and crash failures
…crash failures, add setup-failure contract test
Contributor
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 15 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
View guided diff | Turn on auto-fix | Re-trigger cubic
…ent start, clarify timeout env docs
JoyboyBrian
approved these changes
Oct 23, 2026
|
Docs PR opened: https://github.com/osmosis-ai/docs/pull/156 Documented agent start timestamps in rollout results, custom backend reporting of agent start, and the OpenSandbox request timeout variable. |
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.
Summary
New Features
agent_started_at). A caller can tell a rollout that failed during environment setup from one that failed after its agent ran, and retry only the former without re-running a graded attempt.OPENSANDBOX_REQUEST_TIMEOUT_SEC, so a sandbox create that the server holds until the sandbox is running (for example while a node scales up) isn't abandoned by Harbor's default client timeout.Improvements
Changelog
Added
RolloutResultResponse.agent_started_at: datetime | None: UTC,Noneuntil the agent starts; set on in-progress, final, cancelled, lease-expired and crashed results.ExecutionBackend.reports_agent_start(class attribute, defaultFalse). A backend that records agent start itself sets it and callsRolloutContext.mark_agent_started(the first call wins); for any other backend the server records the time whenexecute()begins.HarborBackendrecords agent start from Harbor'sTrialEvent.AGENT_START, which fires after environment start, healthcheck and agent setup. A trial that fails during setup reportsNone; a failure inside the hook is logged and never fails the trial.LocalBackendrecords agent start when a concurrency slot frees up, so a rollout that expires while queued behindmax_concurrentreportsNone.OPENSANDBOX_REQUEST_TIMEOUT_SECsets the defaultrequest_timeout_secfor built-in OpenSandbox environments. It must be a positive whole number of seconds; anything else is ignored, and an explicitrequest_timeout_seckwarg still wins.Changed
docs/rollout-sdk.mdanddocs/architecture.mddocument the new field, the backend flag and the variable.How to Test
uv run pytest tests/unit/rollout/test_result_registry.py tests/unit/rollout/test_local_backend.py tests/unit/rollout/test_server_admission.py tests/unit/rollout/test_harbor_backend.py tests/unit/rollout/test_harbor_contract.py tests/unit/rollout/test_harbor_source_images.pytest_harbor_contract.pyruns real Harbor trials: the stamp lands between trial start and end, and a trial whose environment start fails leaves itNone. It passes on Harbor 0.20.0, 0.23.0 and 0.24.0.Checklist
[module] type: descriptionformatruff check .andruff format --check .passty check --error-on-warning osmosis_ai/passes;uv run --no-editable pyright --verifytypes osmosis_ai --ignoreexternalhas no unexpected errors (only the Harborharness_agentbaseline)pytestpasses (new tests added)