fix(ci): reconcile review-state labels against latest check run per name#270
Merged
Merged
Conversation
Contributor
Author
|
1 issue outstanding; 2 checks still running. Action required. See task
|
| role: "assistant", | ||
| content: assistantContent, | ||
| } satisfies Anthropic.Messages.MessageParam) | ||
| ...(shouldReplayReasoningContent ? { reasoning_content: preservedReasoningContent } : {}), |
Contributor
Author
There was a problem hiding this comment.
prepareApiConversationMessage() only stores top-level reasoning_content for apiProtocol === "openai" (src/core/task/apiConversationHistory.ts). Anthropic-style thinking providers in this repo still set info.preserveReasoning (for example MiniMax and the Bedrock Kimi/MiniMax models) but persist their reasoning as embedded blocks, so this branch now strips the reasoning those continuations need.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
edelauna
force-pushed
the
fix/deepseek-reasoning-history-0mzxfggobdyyv
branch
from
July 13, 2026 03:45
eed0aaf to
6184c33
Compare
edelauna
approved these changes
Jul 13, 2026
edelauna
left a comment
Contributor
There was a problem hiding this comment.
Squatting this old PR - to fix a small bug in how labels are tagged
edelauna
marked this pull request as ready for review
July 13, 2026 03:58
edelauna
requested review from
JamesRobert20,
hannesrudolph,
navedmerchant and
taltas
as code owners
July 13, 2026 03:58
edelauna
enabled auto-merge
July 13, 2026 03:58
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.
Related GitHub Issue
Fixes: #884
Description
The
Label PR review stateworkflow evaluates a PR's CI by scanning every check run thatchecks.listForRefreturns for the head commit, then taking.some()across all of them. A single stale failed check run — one later superseded by a green run of the same check — keepsciFailed = trueforever. As a resultawaiting-author/awaiting-reviewlabels get stripped on the next hourly run and never come back, even though the PR UI and branch protection correctly show CI as green.Observed on #509 (and #476): the head commit carries an old failed
e2e-mockrun alongside later greene2e-mockruns, so the workflow logsPR #509: CI failed — stripping state labelson every run and the review-state label never returns.Change
Reduce to the latest check run per name before evaluating
ciPending/ciFailed, so the workflow sees the same current state that branch protection and the PR UI use:The latest run is selected by
run.id(GitHub-assigned, monotonically increasing, never null) rather thanstarted_at, because a freshly re-queued run can havestarted_at: nulland would lose a string comparison against an older completed run's timestamp — reintroducing a narrowed version of the same bug.After this change, the next
schedule/workflow_dispatchrun re-applies the correct review-state label to affected PRs (e.g.awaiting-authoron #509).Test Procedure
e2e-mockcheck runs on fix: use VS Code default shell for command execution instead of /bin/sh #509's head commit (50b9df8):run.idis monotonic with recency (79875030339failure →79880428333success →82684589430success), confirming the dedup resolves to the latest green run.PR #509: CI failed — stripping state labels.Pre-Submission Checklist
Screenshots / Videos
Not applicable — internal CI-workflow logic change.
Documentation Updates
Additional Notes
The workflow's own inline comments already note that
schedule/workflow_dispatchruns reconcile fork PRs normally; this change is orthogonal to that fork-handling path. PRs that were stuck unlabeled due to stale check runs (e.g. #509, #476) will recover automatically once this merges and the next hourly run fires.Get in Touch
Roomote (task
0mzxfggobdyy)