fix(pr-management-triage): suppress already-acted-on PRs with unchanged head SHA - #1479
Open
liwenjie200543 wants to merge 1 commit into
Open
liwenjie200543 wants to merge 1 commit into
liwenjie200543 wants to merge 1 commit into
Conversation
…ed head SHA Step 1 of the triage skill re-surfaced PRs the same session had already taken to a terminal action, inviting a second, possibly different decision. After pagination dedup, drop entries the session cache holds under an action_taken whose head_sha equals the freshly fetched head SHA; a changed head still re-classifies via the existing staleness rule, making the two rules complementary per the resolution proposed on the issue. Generated-by: ZCode (GLM)
Kaap10
approved these changes
Oct 1, 2026
Kaap10
left a comment
Contributor
There was a problem hiding this comment.
Thanks @liwenjie200543!
Went through the changes:
- Step 1 session suppression logic is clean and properly distinguishes unchanged
head_shafrom fresh pushes. - Regression fixtures in
pagination-dedup(cases 3–5) cover the edge cases nicely. - Eval suite counts and token measurements are kept in sync, and all CI checks pass.
LGTM!
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.
Summary
head_shamatches the freshly fetched head SHA has nothing new to read and is dropped; a changed head SHA does not match the suppression and falls through to the existing staleness rule (drop entry, re-classify). The two rules are complementary rather than conflicting.SKILL.mdStep 1 accordingly; add threepagination-dedupregression cases (unchanged head suppressed / pushed head re-classified / cache entry without a terminalaction_takennever suppresses) and restampmeasured_tokens.#1071covered the pagination-level duplicate (a PR moving between pages); this patch covers the session-level one. The suppression set is session state and dies with the cache, so a fresh session re-surfaces everything.Type of change
skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)Test plan
pr-management-triageeval fixtures assemble successfully in print mode (59 → 62: three newpagination-dedupcases)mainin this Windows environment (WinError 2 spawning POSIX-style commands) — verified against a cleanmainworktree, byte-identical failure list, so no regression is introduced by this changeuv run --project tools/skill-token-count skill-token-count --write→measured_tokens: 5027tools/dev/skill-surface-hash.py --fixreportssurface_hashin sync (no headings added, moved, or renamed)tools/spec-loop/.last-sync(77884f5c) is a direct ancestor of the current tip, 16 commits behind;pr-management-family.md/triage-mode.mddo not describe the pagination / session-cache layer, so no spec drift is introducedExact-automated (
--cli) grading of the three new fixtures was not run locally (no model CLI in the authoring sandbox); the fixtures follow the existing pagination-dedup case shape and the expected outputs are pinned inexpected.json.RFC-AI-0004 compliance
Linked issues
Closes #77 — implements the resolution proposed in this comment: suppress silently only while the head SHA is unchanged, re-classify when it changed.
Generative AI disclosure
ZCode (GLM) was used while preparing this change. The contributor reviewed the diff and test results before submission.