Skip to content

Complete triage type guidance and preserve existing types - #68869

Open
PureWeen wants to merge 2 commits into
mainfrom
pureween-simplify-triage-type-fix
Open

Complete triage type guidance and preserve existing types#68869
PureWeen wants to merge 2 commits into
mainfrom
pureween-simplify-triage-type-fix

Conversation

@PureWeen

@PureWeen PureWeen commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

This makes automated issue-type triage match how ASP.NET Core actually uses GitHub issue types.

For a new issue without a type, the workflow can choose Bug, Feature, or Task. It no longer assigns Epic, because an Epic represents a maintainer planning decision rather than something the agent can reliably infer from an incoming report. If a template or maintainer already assigned a type, the workflow leaves that decision alone.

Why this change is needed

Task was allowed but never explained

The workflow already allowed the agent to assign Task, but its instructions only defined Bug and Feature. That left documentation, maintenance, test, infrastructure, and refactoring work without a clear classification.

dotnet/aspnetcore#65910 is a concrete example. It asks for updated Blazor documentation and guidance, not a fix to broken runtime behavior and not a new product feature. During manual triage it was initially marked as Bug, then changed to Task with the Docs label. The updated guidance makes that distinction explicit:

  • Bug: current shipped behavior is broken or behaves differently from its intended design.
  • Feature: the issue requests product behavior that does not exist yet.
  • Task: the requested work is bounded maintenance, documentation, test, infrastructure, or refactoring where current product behavior is not broken.

A small fix to broken behavior is still a Bug. The amount of work does not determine the issue type.

Epic is planning metadata

An Epic coordinates a larger objective across multiple issues. That requires maintainer intent and knowledge of how the work will be decomposed. A broad or expensive feature request is not automatically an Epic, so automated intake should not promote it to one.

Epic remains available to maintainers. This change only removes it from the types that the triage agent can assign.

Existing issue types should be preserved

An issue may already have a type because it came from a typed template or because a maintainer assigned one while creating it. That existing decision is treated as authoritative.

The workflow still performs area classification, subtype labeling, duplicate detection, vulnerability handling, label removal, and the triage summary. It only skips replacing the existing issue type.

Existing types are preserved even if the model ignores the instruction

The workflow reads the current issue type from trusted metadata before triage begins. If a type exists, the agent is told not to request a replacement, and the write handler independently prevents an emitted type change from being applied.

Dry runs use the same protection for type and label changes. The metadata writes are skipped, but the analysis comment is still posted so the proposed triage result remains visible.

A metadata lookup failure is not treated as an untyped issue

The trusted metadata request can fail independently of the rest of triage, for example because of a temporary GitHub API error. The workflow now records whether that lookup actually succeeded instead of allowing the metadata job to fail the entire run.

If the lookup succeeds and returns no type, the issue is genuinely untyped and the agent may assign Bug, Feature, or Task. If the lookup fails, the current type is unknown. In that state the workflow prevents any type write from being applied, but it still allows area and subtype labels, duplicate analysis, label cleanup, and the triage comment to continue.

This fails closed for issue types without losing the rest of the triage result.

Resulting behavior

Scenario Behavior
New issue confirmed to have no type Classify and assign exactly one of Bug, Feature, or Task
Issue with an existing type Preserve the type and continue the rest of triage
Existing maintainer-created Epic Preserve Epic; never replace or newly assign it
Trusted type lookup fails Do not apply a type; continue non-type triage and report the type as unknown
Manual dry run Do not apply type or label changes; post the proposed triage summary

What changes

  • Adds the complete Task definition, the Bug-versus-Task boundary, and the Task plus docs convention.
  • Removes Epic from automated assignment while keeping it available for maintainers.
  • Reads and preserves an issue type that was already assigned.
  • Distinguishes a failed type lookup from an issue confirmed to be untyped, preventing type mutation while allowing the rest of triage to continue.
  • Prevents type and label writes during a dry run while keeping the analysis comment active.
  • Retains the current concurrency, explicit issue targeting, no-op behavior, and area ownership from main.
  • Regenerates the workflow lock with gh-aw v0.87.10.

Scope

This PR does not change area classification policy, supported subtype meanings, duplicate criteria, vulnerability handling, or the triage comment format beyond reporting the corrected type decision or an unavailable type lookup.

Validation

  • Focused gh aw compile issue-triage-agent --strict --no-check-update: 1 workflow compiled with 0 warnings.
  • Full-stack strict compilation after rebasing the dependent layers: 5 workflows compiled with 0 warnings.
  • The lookup script was exercised locally for typed, untyped, failed, missing, and invalid issue-number states.
  • gh-aw v0.87.10 handler behavior was checked to confirm that a staged type operation returns before the GitHub write.
  • No live issue mutation or model-backed evaluation was run.

Stack context

This is the first part of a three-PR stack:

  1. Complete triage type guidance and preserve existing types #68869: production type guidance, existing-type preservation, and mutation safeguards
  2. Add reusable issue triage skill and strict Vally evals #68870: reusable issue-triage skill and strict Vally coverage
  3. Wire issue triage workflow to reusable skill #68871: production workflow wiring

@PureWeen
PureWeen force-pushed the pureween-simplify-triage-type-fix branch from 3e426de to 85fabf2 Compare August 27, 2026 22:00
@PureWeen
PureWeen marked this pull request as ready for review September 2, 2026 16:41
@PureWeen
PureWeen requested review from a team and wtgodbe as code owners September 2, 2026 16:41
Copilot AI lite review requested due to automatic review settings September 2, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The documentation/rubric updates are internally consistent with the existing safe-output allow-list and the compiled lock file reflects the source changes.

Review tier: Lite
Findings: None

What changed in this PR

Updates the issue-triage workflow guidance to fully define all allowed issue types (Bug, Feature, Task, Epic) and align the Step 2 rubric and Step 6 report template with the existing set-issue-type allow-list.

Changes:

  • Expand the Step 2 type rubric to include Task and Epic, and add a concrete Bug-vs-Task guardrail.
  • Clarify that docs-only deliverables should be classified as Task with the docs sub-type label.
  • Update the triage comment template to list all four issue types, and regenerate the compiled .lock.yml to reflect the updated prompt.
File Description
.github/​workflows/​issue-triage-agent.md Adds Task/Epic definitions and updates the triage report template to match allowed issue types.
.github/​workflows/​issue-triage-agent.lock.yml Regenerated compiled workflow (metadata/body hash update) to keep it in sync with the updated source prompt.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@PureWeen PureWeen changed the title Complete issue triage type guidance Complete triage type guidance and preserve existing types Sep 2, 2026
Rebase the issue triage type policy onto current main, preserve existing issue types, and enforce per-output staged mutations with gh-aw v0.87.10.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: bcb017f1-64bc-4c44-81c0-96d2b6cc3bce
@PureWeen
PureWeen force-pushed the pureween-simplify-triage-type-fix branch from 09c4c8f to 8874261 Compare September 2, 2026 18:46
@PureWeen
PureWeen marked this pull request as draft September 2, 2026 19:16
@PureWeen
PureWeen marked this pull request as ready for review September 2, 2026 19:29
@PureWeen
PureWeen requested a review from DeagleGross September 2, 2026 19:47
The issue_context job's type lookup conflates 'lookup failed' with
'issue is untyped', so a transient API error (502, network timeout)
cascades through the job graph and kills the entire triage run.

Add an explicit lookup_succeeded output that separates the trust
channel from the value channel:

- Failed/impossible lookup: lookup_succeeded=false, issue_type=''
  Type mutation fails closed (staged); area/labels/comment continue.
- Successful untyped lookup: lookup_succeeded=true, issue_type=''
  Type assignment proceeds normally.
- Successful typed lookup: lookup_succeeded=true, issue_type=<name>
  Existing type preserved (staged).

The step never fails: the gh api call is inside an if-compound that
suppresses errexit. Input is sanitized (single-line enforcement).

The set-issue-type staged expression gains a leading
'lookup_succeeded != true' clause so the handler blocks type writes
whenever the lookup is untrusted. The prompt gains a three-way rule
matching the same states and instructs the agent not to call
set-issue-type when the lookup failed.

Compiled with gh aw v0.87.10 strict, 0 warnings.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7098ed82-dcc7-447e-8dd0-09e68f10ce22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants