fix(devshard): align EvaluateValidationResponse with mainnet validation policy#1283
Open
0xMayoor wants to merge 2 commits into
Open
fix(devshard): align EvaluateValidationResponse with mainnet validation policy#12830xMayoor wants to merge 2 commits into
0xMayoor wants to merge 2 commits into
Conversation
qdanik
approved these changes
Jun 1, 2026
…rd-validation-failopen
Collaborator
|
/run-integration |
Collaborator
|
It's not true that mainnet has no autopass. Here is the snippet from // If the validator's inference node rejects the payload (400/422), treat validation as passed.
// This can happen when the original inference could not be executed due to upstream payload rejection,
// and validators on older versions may still attempt re-execution.
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusUnprocessableEntity {
logging.Warn("Validator inference node rejected payload; treating validation as passed", types.Validation,
"inferenceId", inference.InferenceId,
"status", resp.StatusCode,
"body", string(respBodyBytes))
return &SimilarityValidationResult{
BaseValidationResult: BaseValidationResult{
InferenceId: inference.InferenceId,
ResponseBytes: []byte{},
},
Value: 1.0,
}, nil
}So the logic was that if we have evidence the executor cheated, the validator marked request as invalid, if validator cannot prove it, there was autopass. I think we should keep mainnet logic for a while, and gather logs, to see are there situations to definitely mark some inferences that go through this path as invalid. So let's keep logging there and autopass, according to mainnet semantics. Guard before |
Contributor
Author
Collaborator
|
$/run-integrationnCodex |
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.
EvaluateValidationResponseauto-passes in two cases where mainnet rejects.Empty original logprobs short-circuits
CompareLogitsto 1.0 becausecustomDistancereturns 0 when the original is empty. Mainnet rejects when either side has no logits. An executor can serve a fabricated completion with no logprobs and every validator votes valid.400 or 422 from the validator's own re-execution returns Valid:true before reading the body. The re-run uses executor-supplied enforced_tokens, so a malformed response pushes the backend into a 4xx and auto-wins. Mainnet has no 4xx auto-pass path at all.
Fix: reject the asymmetric empty-logits case (both-empty stays valid so reasoning-burn empties still pass), return Valid:false on 4xx. The 4xx is triggered by executor-controlled input so failing closed is the safer default.
Test fails on current code, passes with the fix.
PR #1282 logs this path but keeps the behavior unchanged.