Skip to content

design-doctor: clear ai:* labels from closed and merged subjects #306

Description

@thedavidmeister

Ask

design-doctor should clear ai:* FSM labels from CLOSED and MERGED subjects — PRs and issues both.

What happens now

Every FSM enumeration is open-only. flagged_open_subjects_args carries --state open, with the reason in its own comment:

Open only: a closed subject's leftover flag is not the human's inbox.

That reasoning is right for a queue — nobody should be handed a closed subject to rule on. It leaves no owner for the label itself, so an ai:* label survives whatever closed the subject, permanently.

Live example: cyclofinance/cyclo.site#427 merged at 7decea4 still wearing ai:design. Doctor cannot see it (open-only), and even if it could, its rule is to route ai:design PRs with no live trusted design question back to ai:needs-work — #427 has a live one, so the existing rule would leave it alone by design.

Why it is worth clearing

The labels are the FSM's account of itself. A merged PR wearing ai:design says "a design question is outstanding" about something that shipped, and a closed issue wearing ai:close-candidate says a flag is pending on something already destroyed. Neither is true, and both are readable by anything that counts labels — the dashboard, rain-org-health, a human scanning the repo.

It also removes a whole class of confusion at the boundary: a subject that is closed AND labelled is currently indistinguishable, by label alone, from one still in a lane.

Shape

  • A doctor pass over CLOSED/MERGED subjects carrying any ai:* label, PRs and issues.
  • Strip the label. Post nothing: the subject is terminal, there is no next mover, and a comment on a closed thread is noise.
  • Leave human:* alone. Those are authorship-protected and a human ruling on a closed subject is a record, not a pending state.
  • Idempotent, like the existing pass — a second run finds zero rows.
  • Its enumeration is necessarily a SECOND search, since every existing one is --state open. Do not widen the existing queue searches to closed: that would put closed subjects back in the human's inbox, which is exactly what the current comment refuses.

Question for whoever takes it

Whether a stripped label should be recorded anywhere. The argument against is above — terminal subject, no next mover. The argument for is that a label vanishing with no trace is the kind of silent state change the FSM otherwise avoids, and git-style provenance does not exist for labels. Worth deciding deliberately rather than defaulting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions