Skip to content

fix: order issue-type keyword rules by signal strength #3577

Closed

Description

@eleshar

Found by Qodo review of #3573 (merged as #3568's fix).

Problem

derive-project-fields.cjs orders TYPE_KEYWORDS most-specific-last in practice: type:feature sits second and its patterns include bare action verbs (add, implement, build, develop) that appear in almost any title. inferMappedValueFromText takes the first rule that both matches and has a configured mapping, so the generic rule shadows every subject rule below it.

Title Current Intended
Add dependency upgrade Feature Dependency Update
Implement compatibility support Feature Compatibility
Add integration test for the sync Feature Automation
Add GitHub Action for releases Feature Automation

Verified as pre-existing: the same titles resolved to Feature before #3568, so this is a latent weakness rather than a regression from that fix.

Approach

Ordered cascade, most-specific signal first, first match wins — the pattern OpenAlex used when reclassifying 49.6M works ("Rules are ordered by measured trustworthiness: unambiguous structural signals fire first, softer text heuristics later").

Move only the generic type:feature rule to the end of the array and leave every other rule's relative order untouched, so the change is limited to the reported problem. Keep type:test above type:compat so integration test stays a test.

Acceptance

  • A title naming a subject classifies by that subject even when it starts with a verb
  • type:feature still classifies genuinely feature-shaped titles
  • An explicit type:* label still beats every keyword rule
  • No change to project_field_mappings.Type, .github/issue-types.yml or any locked file
  • Regression tests pin the ordering so a later rule insertion cannot reintroduce the shadowing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions