Skip to content

ci(triage): stop over-labelling well-specified issues#4792

Open
Hmbown wants to merge 1 commit into
mainfrom
fix/labeler-overactive-tui
Open

ci(triage): stop over-labelling well-specified issues#4792
Hmbown wants to merge 1 commit into
mainfrom
fix/labeler-overactive-tui

Conversation

@Hmbown

@Hmbown Hmbown commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Both auto-labellers classify issues from full body text, so the better-specified an issue is, the more wrong labels it collects. #4787 and #4790 landed tagged bug, question because their acceptance criteria said "fails when a pack drifts" and a scope heading said "How to add a locale".

Changes

triage.yml — type labels (bug, enhancement, documentation, question) now match the title only. A title states what an issue is; a body just discusses it. error and fail(ed|ure) are dropped from the bug rule outright — they describe what nearly every issue mentions.

agent-task-labels.ymltui required only a bare \btui\b, so any passing reference to the terminal UI tagged the issue as touching it. Now anchored on crates/tui, ratatui, codewhale-tui.

Those anchors are deliberately the ones that survive the single-binary refactor (#4747): the crate path and the rendering framework stay when codewhale-tui is lib-ized, while the binary name goes away. A comment in the file says not to reintroduce a bare word match.

Verification

Replayed both regex sets over the real title+body of the four issues that misfired:

Issue Before After
#4787 foundation bug, question, tui tui
#4790 Hindi bug, question, tui tui
#4786 schema defect bug, tui tui
#4791 Ukrainian tui tui

Regression guards: a synthetic Crash on startup: panic in ratatui render loop still classifies bug, tui; Docs: explain how the tui differs from the web UI no longer fires tui.

Both workflows re-validated: YAML parses and the embedded github-script bodies pass node --check.

Known tradeoff

Title-only typing trades recall for precision. #4786 is a real bug whose title doesn't contain a type keyword, so it would no longer be auto-tagged bug — it was labelled by hand. Under-labelling is the cheaper error here; a wrong bug label on planned work actively misleads triage.

Separate finding — not fixed here, needs your call

Every area/OS rule in triage.yml (lines 32–44) is inert. It emits area:tui, area:core, area:mcp, area:state, area:execpolicy, area:tools, area:install, os:windows, os:macos, os:linux, lang:zh — and none of those 11 labels exist on the repo, so the existing-label filter drops all of them. That classification has never worked. Two options, both out of scope for this PR:

  1. Create the 11 labels — but area:tui would duplicate the tui label this PR just tightened, and the area taxonomy needs rethinking against the single-binary layout anyway.
  2. Delete the dead rules.

I'd lean (2), then reintroduce a deliberate area taxonomy once #4747 settles what the areas actually are.

🤖 Generated with Claude Code

Two auto-labellers were classifying issues from their full body text,
which meant the better-specified an issue was, the more wrong labels it
collected. The v0.9.2 localization issues (#4787, #4790) landed tagged
`bug, question` purely because their acceptance criteria said "fails
when a pack drifts" and a scope heading said "How to add a locale".

triage.yml: match type labels against the title only. A title states
what an issue *is*; a body just discusses it. Also drop `error` and
`fail(ed|ure)` from the bug rule outright — they describe what nearly
every issue mentions, not what any issue is. This trades a little recall
for precision: a genuine bug whose title avoids the word "bug" now needs
manual triage, which is the cheaper error.

agent-task-labels.yml: `tui` required only a bare \btui\b, so any issue
that referenced the terminal UI in passing was tagged as touching it.
Anchor on `crates/tui`, `ratatui`, and `codewhale-tui` instead. Those
signals are also the ones that survive the single-binary refactor
(#4747): the crate path and the framework stay when codewhale-tui is
lib-ized, while the binary name goes away.

Verified against the four issues that misfired: `bug` and `question`
clear on all of them, `tui` is retained where the body genuinely cites
crates/tui, a synthetic "Crash on startup: panic in ratatui render loop"
still classifies as bug+tui, and a passing "how the tui differs from the
web UI" mention no longer fires.
Copilot AI review requested due to automatic review settings July 24, 2026 22:00
@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

@claude

claude Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Hmbown's task in 1m 54s —— View job


Review: PR #4792 — stop over-labelling well-specified issues

  • Read changed workflow files (triage.yml, agent-task-labels.yml)
  • Check diff against origin/main
  • Validate regex logic correctness
  • Check for correctness bugs, provider/model safety, reuse, tests, security
  • Post review summary

Summary

Small, well-scoped fix. I traced both regex changes against origin/main and the logic checks out — no bugs found.

Correctness

  • triage.yml:34-37 — type rules now run .test(title) instead of .test(text). title is already lowercased at line 20, and text (still title\nbody) remains correctly used by the (separately, already-dead) area/OS rules at lines 43-52, so nothing else regressed.
  • agent-task-labels.yml:45crates\/tui\b|ratatui|\bcodewhale-tui\b correctly drops the bare \btui\b alternative that over-fired on prose mentions, while keeping path- and framework-anchored signals. Traced the two regression cases from the PR body by hand: "Crash on startup: panic in ratatui render loop" still matches bug (title) and tui (ratatui), and "Docs: explain how the tui differs from the web UI" no longer matches tui (bare word gone, no crates/tui/codewhale-tui present). Both match the PR's stated expectations.
  • Nothing here touches provider/model routing, so the EPIC v0.8.65 EPIC: Separate provider facts, model facts, offerings, and route resolution #2608 invariant doesn't apply to this diff.

Minor / non-blocking

  • PR description says the old tui rule "required only a bare \btui\b" — checking origin/main, the prior regex was actually crates\/tui|\btui\b|ratatui, so it already had the path and framework anchors; only the bare-word alternative was the over-fire source. Doesn't affect the code change (which is correct), just a slightly overstated description.
  • No automated test covers the regex behavior itself — .github/scripts/agent-task-metadata.test.sh only asserts structural invariants (trigger type, agent-ready gating, no milestone coupling), not label-matching behavior, and none of the existing scripts have a regex-behavior test to extend. Given verification here was manual replay against real issue text, a small grep/node-based fixture test (a few title/body strings → expected label set) would catch future regressions in either file. Not a blocker, since the existing test suite doesn't have this pattern to follow yet.

Agreed, out of scope

The area/OS labels at triage.yml:43-52 (area:tui, area:core, os:windows, etc.) are confirmed dead — none of those labels exist on the repo, so the existing-label filter (line 63) silently drops all of them. Agree with deferring this and leaning toward deleting the rules rather than creating an area:* taxonomy that will need rethinking once #4747 lands.

No changes requested.

@Hmbown
Hmbown force-pushed the fix/labeler-overactive-tui branch from 5ce0136 to 2fb9202 Compare July 24, 2026 22:08
@claude

claude Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Hmbown's task in 1m 32s —— View job


Review: PR #4792 — stop over-labelling well-specified issues (re-check)

  • Fetch latest branch state and diff against origin/main
  • Read changed workflow files
  • Validate regex/logic correctness
  • Check for correctness bugs, provider/model safety, reuse, tests, security
  • Post review summary

Summary

No new commits since the prior automated pass (still 1 commit, 2fb9202, sha 677859d/81e81c8 on the two files) — this re-check confirms the same conclusion: the diff is small, correct, and CI is green (CI, Web Frontend, DCO, Sync to CNB all passed; Claude PR Review still running).

Correctness

  • triage.yml:34-37 — type rules now test title (already lowercased at line 20) instead of text. The still-text-driven locale/area/OS rules at 40/43-52 are untouched by this hunk, so nothing else regressed.
  • triage.yml:32-34err(?:or)?|fail(?:ed|ure)? fully removed from the bug rule (not partially), matching the PR's stated intent — titles like "App fails on startup" no longer auto-tag bug on that term alone.
  • agent-task-labels.yml:45crates\/tui\b|ratatui|\bcodewhale-tui\b correctly drops the bare \btui\b alternative. Hand-traced both regression fixtures from the PR body: "Crash on startup: panic in ratatui render loop"bug (title) + tui (ratatui); "Docs: explain how the tui differs from the web UI" → no tui match (bare word gone, no crates/tui/codewhale-tui present). Both match spec.
  • No provider/model routing touched — the EPIC v0.8.65 EPIC: Separate provider facts, model facts, offerings, and route resolution #2608 invariant doesn't apply here.

Minor / non-blocking (unchanged from prior pass)

  • PR description says the old tui rule "required only a bare \btui\b"; origin/main actually had crates\/tui|\btui\b|ratatui — the path/framework anchors already existed, only the bare-word alternative was the over-fire source. Doesn't affect the correctness of the change itself.
  • Still no automated fixture test for the regex behavior (a small title/body → expected-labels table would catch future regressions in either file). Not a blocker — no existing script in this repo follows that pattern yet to extend.

Agreed, out of scope

triage.yml:43-52's area/OS rules (area:tui, area:core, os:windows, …) remain confirmed dead — none of those 11 labels exist on the repo, so the existing-label filter at line 63 silently drops them all. This PR correctly leaves that alone; agree with deferring the taxonomy decision until #4747 (single-binary refactor) settles.

No changes requested.

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.

2 participants