fix(a2a): finalize dangling candidate steps in pipeline snapshot - #202
Open
ruanzhengxin-zhuxing wants to merge 1 commit into
Open
fix(a2a): finalize dangling candidate steps in pipeline snapshot#202ruanzhengxin-zhuxing wants to merge 1 commit into
ruanzhengxin-zhuxing wants to merge 1 commit into
Conversation
A completed/failed candidate could still carry pending sub-steps with a null conclusion (e.g. evaluate_candidate_ea1b4215 in session eadbf79d597b4e929827475e01612717): 1. candidate_started skeleton steps were merged into candidate["steps"] without registering their runIds, so later candidate_step_* lifecycle events appended duplicate entries and the pending skeleton twin was never closed out. 2. candidate_completed/candidate_failed only updated the candidate itself and never reconciled non-terminal sub-steps. Now skeleton steps are deduplicated by runId through _candidate_steps_by_run_id, and any sub-step still pending/working when its candidate reaches a terminal state is explicitly marked canceled with a cancelReason, so completed candidates can no longer contain non-terminal sub-steps.
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.
问题
Session
eadbf79d597b4e929827475e01612717的 pipeline_snapshot 中,候选evaluate_candidate_ea1b4215标记 completed,但其子步骤template_generating、cost_estimating仍为 pending 且 conclusion 为 null。根因
src/iac_code/a2a/pipeline_snapshot.py快照 reducer:candidate_started携带的子步骤骨架未按 runId 登记进_candidate_steps_by_run_id,后续candidate_step_*事件另建条目,留下重复的 pending 骨架;candidate_completed/candidate_failed不收尾非终态子步骤。修复
canceled(含 canceledAt / cancelReason)。测试
Aone 需求 #84501215 | Harness WorkItem 219d1d2a