fix: propagate InjectParamsIntoContext error in StartInference and FinishInference#971
Open
unameisfine wants to merge 2 commits intogonka-ai:mainfrom
Open
fix: propagate InjectParamsIntoContext error in StartInference and FinishInference#971unameisfine wants to merge 2 commits intogonka-ai:mainfrom
unameisfine wants to merge 2 commits intogonka-ai:mainfrom
Conversation
Collaborator
|
Same as #968 @unameisfine I think tests here is overkill and just add unneeded code. Please clear the tests from the PR |
Author
|
Done — removed both test files in 11d5d96. Only the two msg_server fixes remain. |
Collaborator
And please rebase |
added 2 commits
April 3, 2026 15:14
…nishInference When InjectParamsIntoContext fails (e.g. corrupted params store), StartInference and FinishInference log a warning but continue executing with a broken context. Downstream calls to GetDeveloperAccessParams and GetTransferAgentAccessParams then fail silently, bypassing access gates. Return error immediately, matching the fix applied to the Validation handler in PR gonka-ai#968. Without fix: handler continues with corrupted params, access gates become no-ops, downstream errors cascade. With fix: handler returns "cannot start/finish inference with stale params" immediately.
11d5d96 to
7756064
Compare
Author
|
Rebased on main (ec8f455). |
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.
Same pattern as #968 (Validation handler) — applied to StartInference and FinishInference.
Problem
When
InjectParamsIntoContextfails (e.g. corrupted params store), both handlers log a warning but continue executing with a broken context. Downstream calls toGetDeveloperAccessParamsandGetTransferAgentAccessParamsthen fail silently, effectively bypassing access gates.Fix
Return error immediately instead of continuing, matching the pattern from #968:
Tests
TestStartInference_ReturnsError_WhenInjectParamsFailsandTestFinishInference_ReturnsError_WhenInjectParamsFails— corrupt the params store with invalid protobuf, then call the handler:"cannot start/finish inference with stale params"immediately