Repository navigation
fix(engine): give box runs 15 minutes to collect - #916
Merged
Merged
Conversation
ORX-485 exposed tail loss when an SSH proxy outage or sleeping laptop outlasted the one-minute collection grace. Keep the box available longer so collection can resume. Up to 15 minutes of extra billing when the laptop never returns is an accepted cost. Request the payload timeout plus collection grace as the lease budget without extending the payload timeout. The service adds 90 seconds for finalization, covering the payload kill window. Cap the added grace at the service seven-day lease maximum. Cap managed rental reconnect backoff at 60 seconds so proxy recovery can be collected within the grace. Wake pending rental collections when their SSH host returns Live. Fixes ORX-485 Assisted-by: gpt-6.1-sol
Contributor
[Medium impact] The changes affect rental duration and log recovery for managed box runs. The PR appears safe to merge, with a non-blocking test gap around the wrapper's collection deadline. Findings
Fix with agent prompt### Issue 1
crates/orx-host/src/rental.rs:7
No test distinguishes the wrapper's new 15-minute wait from the old 60-second wait. The existing rental test sets `ORX_TEST_FAST_STOPS=1`, which reduces both waits to 100 milliseconds. The new lease and reconnect tests would still pass if this constant reverted to 60 seconds, letting early release and lost final logs return unnoticed.
Add a clock-controlled or proportionally shortened test that fails when the wrapper releases before the new grace ends. Also check that acknowledgement still releases it early.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryGives engine-owned box runs up to 15 minutes to collect final output before release.
paperclover explicitly accepts up to 15 minutes of extra billing when the laptop never returns. The changed documentation also makes reduced collection time near the seven-day limit intentional.
|
1 task
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.
A box released itself 60 s after its run ended, so a vast SSH proxy outage or a sleeping laptop at that moment lost the log tail and the run reported Lost (ORX-485). The box now waits up to 15 minutes for the laptop to collect, and still releases immediately once collection is acknowledged or on Cancel/Abandon. Worst case is about 15 minutes of extra billing for a laptop that never comes back.
Two things had to move with it. openresearch.sh caps a rental at
max_active_seconds+ 90 s and heartbeats can't extend that, so the CLI now asks for the run timeout plus the grace (capped at the 7-day maximum; no extra credit is reserved). And the grace is only useful if the laptop keeps trying: reconnects toorx-box-hosts back off at most 60 s instead of 15 min, and a box host coming back Live wakes its pending collection right away instead of waiting out the collection retry schedule.Proved with red/green tests for the lease budget, the reconnect cap (recovery after repeated failures) and the Live wake-up (failure at minute 7, recovery at minute 8); fmt, clippy and the full suite pass with the engine on and off. No new real rental: launch and billing calls are unchanged apart from the requested budget.
Reviewed with sol-loop: 3 rounds with gpt-6.1-sol.
Fixes ORX-485
Assisted-by: gpt-6.1-sol