Repository navigation
fix(master): keep exec and eval sandboxes active - #442
Open
Floating-Y wants to merge 1 commit into
Open
Floating-Y wants to merge 1 commit into
Floating-Y wants to merge 1 commit into
Conversation
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.
Repeated
/execand/evalcalls did not updatelast_active_at, so the master could mark a busy hot sandbox idle once the original freeze deadline passed. Refresh activity in their sharedrun_execpath when accepting a hot sandbox command and again when its result arrives, including non-zero exits.The hot check and initial
Store::touchshare one store lock, which is released before dispatch and awaiting the result. Rejected requests do not refresh activity, and completion only updates the timestamp, so a late result cannot undo a manual freeze. The node's existing execution protection is unchanged.Four regression tests exercise both HTTP endpoints with controlled database timestamps and explicit demotion sweeps, without sleeps. They verify continued calls stay hot beyond the freeze threshold, idle demotion resumes after the final result, rejected calls do not extend idle, and late results preserve a manual freeze. Both continuous-call tests failed on the unmodified base with
Frozeninstead ofHotand pass with this fix.Validation on WSL Ubuntu:
cargo test -p sandstorm-core --locked --test master_api --test sandbox_access: 68 + 9 passed.cargo test -p sandstorm-core --locked --lib master::: 30 passed, including the four new regression tests.cargo test -p sandstorm-core --locked --lib tier::: 6 passed.cargo test -p sandstorm-core --locked --lib node::wake_tests: 18 passed.cargo fmt --all -- --checkandgit diff --check: passed.The full repository suite and real runsc end-to-end tests were not run.