[VRP] Harden testcase safety check in long-lived bots#5368
Draft
PauloVLB wants to merge 1 commit into
Draft
Conversation
627f503 to
6a39d40
Compare
e46384a to
29cebfd
Compare
6a39d40 to
20c1288
Compare
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.
Problem
Long-lived bots might attempt to handle untrusted testcases locally (e.g., during minimization or analysis) if not properly isolated. The previous safety check relied on the
UNTRUSTED_UTASKenvironment variable, which was unreliably set and often led to false positives or missed detections.Proposed Solution
Harden the testcase safety check by relying on the rock-solid discriminator
environment.is_uworker().If a long-lived bot (
is_uworker() == False) attempts to handle an untrusted testcase (trusted == False), it will trigger a fatal error (log_fatal_and_exit), stopping the processing immediately.Testing
minimize_task_test.pyand test helpers intest_utils.pywere updated to handle this new validation by default (settingtrusted=Truefor test fixtures).Validation
[Insert logs showing a long-lived bot crashing when attempting to process an untrusted testcase]