Repository navigation
[fix][evaluation] return not found for missing target callback contexts - #701
Merged
Merged
Conversation
bitholic
approved these changes
Oct 27, 2026
xueyizheng
approved these changes
Oct 27, 2026
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.
Missing asynchronous target contexts currently escape
ReportEvalTargetInvokeResult_as unclassified errors, including its explicit nil-context branch. This PR returns the existingResourceNotFoundbusiness error instead. The callback is still rejected; the change corrects its error classification and stability metadata.What type of PR is this?
fix
Check the PR title
[<type>][<scope>] <description>.Before and after: business behavior
redis.Nil601200702ResourceNotFound(601203004)errorx.New("eval async context not found...")ResourceNotFoundbusiness error as a Redis missstatus=FAILEDThe production change is confined to this application method. The existing DAO, strong-read retry contract, context TTL, authentication, request validation, and subsequent DB/MQ error paths are not modified. No new error-code definition, IDL field, or configuration is introduced.
Before and after: error response
For the evaluation integration that wraps unclassified errors with
601200702:601200702601203004internal erroror a framework-wrapped Redis errorbiz_err_affect_stability1, or absent and treated as stability-affecting0HTTP presentation is gateway-dependent. In the inspected gateway configuration, business errors are flattened to HTTP 200 with a nonzero JSON
code. That adapter also maps the stability metadata to thett_stableresponse header. This PR changes the upstream business error; it does not implement an HTTP status or gateway-format change.Illustrative responses for that configuration, before localization and omitting unrelated headers/fields:
Before:
After, using example invocation ID
101:These are illustrative key fields, not captures from a deployed repaired version. Service/gateway localization can replace
msg; a gateway may additionally emitraw_msgwhen localizing. Neither the exact message nor the presence of the invocation ID in the final text is guaranteed. HTTP 200 andtt_stable=1do not mean business success, andResourceNotFounddoes not by itself mean HTTP 404.Compatibility and rollout checks
Successful server-side processing is unchanged, and missing-context callbacks remain rejected. This does not establish that every caller's behavior is unchanged:
601200702, or branches on message text or stability headers, may behave differently after receiving601203004.AsyncExecuteTargetprecedesSetEvalAsyncCtx, so an early callback can observe a transient miss. Verify its retry/compensation behavior before rollout; this boundary is not a proven production failure introduced by this PR.Deployment acceptance still needed:
Validation
Tested commit:
c2a73c659a800f3a811e2d24b78b9b9eac568356(local Go 1.24.6).-race: 512 top-level tests passed, with one existing template-configuration test skipped.git diff --checkand golangci-lint 2.2.1 with the repository configuration for changed application code passed.