Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
645931d
fix(triage): make Stage 1-pre subsumption check large-file safe
yiliang114 Aug 28, 2026
314a79b
Merge origin/main into fix/issue-10322-subsumption-size-ceiling
yiliang114 Aug 28, 2026
ba0c72e
fix(triage): wire 1-pre closer resolution same-repo, per-issue, fail-…
yiliang114 Aug 28, 2026
808e5f2
fix(triage): align 1-pre carve-out and close comment with frozen-patc…
yiliang114 Aug 28, 2026
e6b52b2
test(triage): pin 1-pre two-patch mechanism and contents-API prohibition
yiliang114 Aug 28, 2026
b96d667
fix(triage): dedup stage 1-pre closers and judge only fetched patches
yiliang114 Aug 28, 2026
3d3a958
test(triage): pin the closer-repo gate and the closer-side fetch guards
yiliang114 Aug 28, 2026
4533ffd
docs(triage): correct stage 1-pre blast-radius and order claims, pin …
yiliang114 Aug 28, 2026
e9e86fe
fix(triage): count occurrences in subsumption and name a fixed linked…
yiliang114 Aug 28, 2026
753ec77
test(triage): pin occurrence counts, jq wiring, closer-set population
yiliang114 Aug 28, 2026
dc2abaf
fix(triage): enumerate every remaining-delta shape subsumption admits
yiliang114 Aug 29, 2026
92b8ac2
Merge branch 'main' into fix/issue-10322-subsumption-size-ceiling
yiliang114 Aug 30, 2026
631f063
fix(triage): close structural gaps in 1-pre subsumption, route oversi…
yiliang114 Aug 30, 2026
3a64f5c
fix(triage): match covered lines hunk by hunk in 1-pre subsumption
yiliang114 Aug 31, 2026
dd60883
Merge branch 'main' into fix/issue-10322-subsumption-size-ceiling
yiliang114 Sep 1, 2026
1c87ac1
fix(triage): require 1-pre closers to have landed on the default branch
yiliang114 Sep 1, 2026
4cbac99
fix(triage): use raw contents for subsumption
yiliang114 Sep 1, 2026
dda2331
fix(triage): preserve absent-file subsumption
yiliang114 Sep 1, 2026
82ad484
Merge branch 'main' into fix/issue-10322-subsumption-size-ceiling
yiliang114 Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 39 additions & 19 deletions .qwen/skills/triage/references/pr-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ The parser is not intent-aware — prose like "resolves #123's closer" links
`ISSUES`. There is no deterministic intent check: the linkage decides WHICH
issues the branches below read, and they then act on those issues' states.
The blast radius stays bounded — the only irreversible act (close)
additionally requires this PR's diff to be fully subsumed by the default
branch, which is true only when the change is already landed, so an
additionally requires this PR's diff to be fully subsumed by the merged
fix, which is true only when the change is already landed, so an
accidental linkage can at worst reach a visible, reversible request-changes
review or a maintainer escalation, never a substantively wrong close.

Expand Down Expand Up @@ -259,24 +259,44 @@ nothing (the number is a PR, not an issue; the issue does not exist; the
latest close was manual), treat the closer as unresolved.

- Closed by a **merged PR** → compare this PR's production diff (exclude
test/generated files per the Stage 0 size rules) against the default
branch (`$DEFAULT_BRANCH` — this PR's base, per the scope check above):
- **Fully subsumed** — applying this PR's ENTIRE diff to the default
branch would change nothing: every production line this PR adds already
exists there, AND every production line this PR deletes is already
absent there (check per file via
`gh api "repos/$REPO/contents/<path>?ref=$DEFAULT_BRANCH"`). A diff
with NO production changes (e.g. tests-only) is never fully subsumed —
any file it adds outside the production set is itself a remaining
delta. → post the terminal comment below, then close the PR. This is
the ONLY place triage closes a PR.
test/generated files per the Stage 0 size rules) against the merged
closer's production diff (`$MERGED_PR` — the closer number resolved
above). Read each patch once; two calls cover any number of files:
Comment thread
yiliang114 marked this conversation as resolved.
Resolved

```bash
gh pr diff "$PR_NUMBER" --repo "$REPO" > /tmp/stage-1pre-pr.patch
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
gh pr diff "$MERGED_PR" --repo "$REPO" > /tmp/stage-1pre-closer.patch
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
```

Do NOT download the default branch's files one by one via
`gh api "repos/$REPO/contents/<path>?ref=$DEFAULT_BRANCH"`: above ~1 MiB
that endpoint silently returns HTTP 200 with empty content
(`content_len: 0`, `encoding: "none"`, no error), so a per-file download
can never confirm subsumption for large files — the check would fail
silently exactly where a duplicate is most expensive. It would also
spend one REST call per file against the shared CI PAT's rate limit and
transit every full blob through the agent's context. Two frozen patches
cost two calls for any N and keep the verdict atomic with respect to
base-branch movement during the check. Judge the production sections of
the two patches line by line:
- **Fully subsumed** — every production line this PR adds also appears
among the lines the closer's patch adds, AND every production line
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
this PR deletes also appears among the lines the closer's patch
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
deletes. The closer's patch is frozen against ITS merge base, so a
line later edited or reverted on the default branch still counts as
covered here — the close comment below invites reopening for exactly
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
that case. A diff with NO production changes (e.g. tests-only) is
never fully subsumed — any file it adds outside the production set is
itself a remaining delta. → post the terminal comment below, then
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
close the PR. This is the ONLY place triage closes a PR.
- **Any remaining delta** — everything else: an added production line
that is missing there, a deleted production line that still exists
there, or any non-production addition → submit exactly one
`CHANGES_REQUESTED` review: name the merged PR, name the remaining
delta, ask the author to rebase onto the default branch and reduce the
PR to that delta (bilingual body whose first line is the
`<!-- qwen-triage stage=1-pre -->` marker, @mention the author). Stop:
the closer's patch does not add, a deleted production line the
closer's patch does not delete, or any non-production addition →
submit exactly one `CHANGES_REQUESTED` review: name the merged PR,
name the remaining delta, ask the author to rebase onto the default
branch and reduce the PR to that delta (bilingual body whose first
line is the `<!-- qwen-triage stage=1-pre -->` marker, @mention the
author). Stop:

```bash
gh pr review "$PR_NUMBER" --repo "$REPO" --request-changes --body-file /tmp/stage-1pre-remaining-delta.md
Expand Down
Loading