[fix][backend] restore FailRetry logic to skip completed evaluators#402
Merged
lsy357 merged 1 commit intoJan 23, 2026
Conversation
5 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #402 +/- ##
==========================================
- Coverage 70.00% 70.00% -0.01%
==========================================
Files 619 619
Lines 58718 58718
==========================================
- Hits 41106 41104 -2
- Misses 14627 14628 +1
- Partials 2985 2986 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
lsy357
approved these changes
Jan 23, 2026
tpfz
approved these changes
Jan 23, 2026
Collaborator
|
Change merged, and this patch will ship with next version. Thanks for making loop better! |
HearyShen
pushed a commit
that referenced
this pull request
Feb 26, 2026
…402) fix(worker): restore FailRetry logic to skip completed evaluators Co-authored-by: Lysssyo <11906167+lysssyo@user.noreply.gitee.com>
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.
What type of PR is this?
fix: A bug fix
Check the PR title
(Optional) Translate the PR title into Chinese
(Optional) More detailed description for this PR(en: English/zh: Chinese)
1. Defect 1: Historical Result ID Mapping Error
1.1 Problem Description
In the
GetExptItemTurnResultsmethod, when constructing the mapping table for historical results, theEvaluatorVersionID(Evaluator Version ID) was incorrectly assigned as the Value. The expected Value should have been theEvaluatorResultID(Primary Key ID of the evaluation record).1.2 Fix Details
backend/modules/evaluation/domain/service/expt_result_impl.goGetExptItemTurnResultsCode Comparison:
1.3 Verification and Impact
expt_turn_result_run_logevaluator_result_ids{"EvalVerIDToResID":{"1001":1001}}— Invalid reference pointing to a non-existent record ID.{"EvalVerIDToResID":{"1001":74839201}}— Valid reference correctly pointing to the primary key in theevaluator_recordtable.2. Defect 2: Worker Cache Key Mismatch
2.1 Problem Description
Even if the ID mapping is correct, the Worker used
RecordIDas the Map Key when constructing the context cache. However, the subsequent read logic usedEvaluatorVersionIDas the Key for lookups. This Key Mismatch resulted in a permanent cache miss.2.2 Fix Details
backend/modules/evaluation/domain/service/expt_run_item_impl.gobuildExptTurnEvalCtxCode Comparison:
2.3 Verification (Memory Level)
After the fix, the Worker execution flow is as follows:
Context Construction (
buildExptTurnEvalCtx):Correctly constructs the
etec.ExptTurnRunResult.EvaluatorResultsMap withEvaluatorVersionIDas the Key.Execution (
CallEvaluators):When iterating through evaluators, the cache is successfully hit, allowing completed tasks to be skipped.
(Optional) Which issue(s) this PR fixes
Fixes #400