Skip to content

triage: make Stage 1-pre closer tree total over closer shapes, with fixture tests #10321

Description

@yiliang114

Summary

Stage 1-pre's closer query in .qwen/skills/triage/references/pr-workflow.md fetches three closer shapes but the decision tree consumes only two:

  1. Commit closers are dropped. The query explicitly fetches ... on Commit { oid } (GitHub sets closer to a Commit when an issue is auto-closed by a commit pushed to the default branch), but the jq filter's select(. != null and .number != null) discards it. A commit-closed issue is then indistinguishable from a manual close and escalates forever — even though the fix is on main by construction and the deterministic subsumption comparison could have run.
  2. Unmerged-PR closers have no branch. The filter can emit "N false" (an unmerged PR closed the issue), which no bullet consumes.
  3. No executable test. The filter is one of only two executable fragments in triage that decide a gh pr close, yet it ships untested, while scripts/tests/qwen-triage-workflow.test.js already has an established fixture-execution pattern for exactly this content class (the re-run-classifier test runs embedded jq under real jq against fixtures).

Proposed scope

  • Make the tree total over the filter's output space: emit commit closers (e.g. "C \(.oid)") and route "closed by a commit on the default branch" into the same subsumption comparison; add an explicit merged == false branch (ambiguity → escalate).
  • Add fixture-driven tests: extract the closer --jq filter from pr-workflow.md, run it against recorded GraphQL payloads, and pin merged → "7777 true", commit-only → the commit route, unmerged → the escalate route, so removing any route goes red.

Source

Review threads PRRT_kwDOPB-92c6c3VLn and PRRT_kwDOPB-92c6c3VLg on #10292 (Stage 1-pre spec review). Deferred from that PR to keep its diff bounded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category/developmentDevelopment experiencepriority/P2Medium - Moderately impactful, noticeable problemscope/ci-cdContinuous integration/deploymenttype/enhancementNon-bug improvement or optimization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions