fix: streaming token usage - #102
Merged
Merged
Conversation
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x' artifact from the main CI run. |
Collaborator
Author
Collaborator
|
lgtm |
xaelistic
pushed a commit
to xaelistic/qwen-code
that referenced
this pull request
Jun 7, 2026
fix: streaming token usage
yiliang114
added a commit
that referenced
this pull request
Aug 27, 2026
… Stage 1-pre The per-issue loop legend said OPEN -> proceed to 1a while the aggregate bullets said any closed-as-completed issue enters the closer flow, so 'fixes #101 and fixes #102' with #101 OPEN, #102 CLOSED-COMPLETED had two contradictory outcomes. Make the loop collect-only and state one fixed precedence (not-planned > completed > all-open), so an OPEN issue never short-circuits a CLOSED one. Pin the precedence. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
chiga0
pushed a commit
to chiga0/qwen-code
that referenced
this pull request
Aug 28, 2026
…M#10292) * feat(triage): add duplicate / already-fixed gate (Stage 1-pre) A PR opened after its linked issue was already fixed by a merged PR stays open forever: no existing gate looks at the linked issue's state, and triage has no close action at all. Add a deterministic Stage 1-pre check that resolves the linked issue's closer via GraphQL and, only when the PR's production diff is fully subsumed by the merged fix, posts a bilingual terminal comment and closes the PR. Any remaining delta requests changes instead; ambiguity escalates to the maintainer. Register the gate in SKILL.md so it is not treated as a fabricated policy. * fix(triage): correct Stage 1-pre subsumption, base scope, and linkage - Define subsumption over the entire diff (added lines present AND deleted lines absent in the default branch) so deletions-only and tests-only diffs can never reach the close branch. - Run Stage 1-pre only for PRs targeting the default branch; backports to release/* branches legitimately carry changes already on the default branch. - Extract linked issues via GitHub's closingIssuesReferences instead of a keyword grep that missed 6 of 9 closing-keyword forms and matched substrings like "prefixes". - Pin all three invariants in qwen-triage-workflow.test.js. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(triage): align Stage 1-pre exits, closer query, and state mechanics - Name both Stage 1-pre request-changes exits in the terminal gate exception and the footer rule, give each an explicit `gh pr review --request-changes` command like 1a/1b, and note the duplicate-close exit posts its terminal comment and closes instead of submitting a review; extend SKILL.md's rejection exception clause to cover them. - Closer query: window the LAST 20 CLOSED_EVENTs and take only the most recent close's closer (older closes belong to reopen cycles), null-guard the jq filter, and spell out that a failed or empty query means the closer is unresolved (a PR number or missing issue must not hard-error). - Add the per-issue state loop that assigns $N and produces the state/stateReason the branch bullets consume. Co-authored-by: Qwen-Coder <qwen-coder @alibabacloud.com> * fix(triage): scope Stage 1-pre linkage to same-repo closing references The closingIssuesReferences extraction kept only the bare issue number, so a cross-repo closing reference resolved against this repo's same-numbered unrelated issue and could drive the wrong-issue gate branches. Filter the extraction to references whose repository matches the triaged repo and state that cross-repo closing references are skipped. Co-authored-by: Qwen-Coder <qwen-coder @alibabacloud.com> * fix(triage): guard the Stage 1-pre duplicate close against human reopens An explicit /triage re-run on a PR a maintainer reopened after a 1-pre duplicate-close re-derives identical inputs and closes again, indefinitely overriding the deliberate reopen. Before the close exit posts and closes, require that no stage=1-pre comment exists yet on the open PR; if one does, escalate to the maintainer instead of re-closing. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(triage): pin Stage 1-pre state dispatch and ambiguity prohibition The per-issue state dispatch (OPEN / CLOSED NOT_PLANNED / CLOSED COMPLETED) and the "never close on ambiguity" bullet had no test witness: deleting or inverting either kept the suite green. Add toContain pins binding each state to its action and one pinning the ambiguity escalation rule. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(triage): drop production qualifier from Stage 1-pre exits in SKILL.md The exit summary qualified both sides with 'production' (remaining production delta -> request-changes; entire production diff fully subsumed -> close), contradicting pr-workflow.md's operational definition: request-changes fires on ANY remaining delta including non-production additions, and a diff with NO production changes is never fully subsumed. A tests-only PR got opposite instructions from the two files. Align SKILL.md with pr-workflow.md and pin the boundary in the suite. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(triage): define fixed precedence for mixed linked-issue states in Stage 1-pre The per-issue loop legend said OPEN -> proceed to 1a while the aggregate bullets said any closed-as-completed issue enters the closer flow, so 'fixes QwenLM#101 and fixes QwenLM#102' with QwenLM#101 OPEN, QwenLM#102 CLOSED-COMPLETED had two contradictory outcomes. Make the loop collect-only and state one fixed precedence (not-planned > completed > all-open), so an OPEN issue never short-circuits a CLOSED one. Pin the precedence. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(triage): make Stage 1-pre linkage prose honest about its verification The doc promised linkage is 'input to verify against the issue's actual state, never as proof by itself', but the issue state check is the only verification, so an accidental prose linkage (e.g. 'resolves QwenLM#123's closer') still drove the branches off an unrelated issue. Reword to state the truth: there is no deterministic intent check, the linkage decides which issues are read, and the blast radius is bounded because close additionally requires the diff to be fully subsumed by the default branch (true only when the change already landed), so an accidental linkage reaches at worst a visible, reversible request-changes or escalation. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Co-authored-by: Qwen-Coder <qwen-coder @alibabacloud.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.
TLDR
Dive Deeper
Reviewer Test Plan
Testing Matrix
Linked issues / bugs