Which workflow an issue goes to, based on its labels, is fixed in code.
Where
internal/domain/workintake/subjects.go: labelKinds maps the labels bug and feature to kinds. kindSubjects maps each kind to a NATS subject.
internal/domain/workflow/routing.go: defaultKindWorkflows maps bug to tdd and feature to feasibility. IntakeRoutes, workflowForLabels and ResolveWorkflowID send everything else to triage.
internal/infrastructure/controlplanestore/workflow_definitions.go: sends IntakeRoutes() to the dashboard as x-intake-routes, for display only.
Why it's a problem
No dashboard setting, control-plane setting or config option changes these routes. Using a different label, or sending a kind to a different workflow, means editing code and releasing.
A forge whose labels aren't exactly bug or feature sends everything to triage.
A setting has to work end to end, but here the dashboard shows routes nobody can edit.
Which workflow an issue goes to, based on its labels, is fixed in code.
## Where
- `internal/domain/workintake/subjects.go`: `labelKinds` maps the labels `bug` and `feature` to kinds. `kindSubjects` maps each kind to a NATS subject.
- `internal/domain/workflow/routing.go`: `defaultKindWorkflows` maps bug to `tdd` and feature to `feasibility`. `IntakeRoutes`, `workflowForLabels` and `ResolveWorkflowID` send everything else to `triage`.
- `internal/infrastructure/controlplanestore/workflow_definitions.go`: sends `IntakeRoutes()` to the dashboard as `x-intake-routes`, for display only.
## Why it's a problem
- No dashboard setting, control-plane setting or config option changes these routes. Using a different label, or sending a kind to a different workflow, means editing code and releasing.
- A forge whose labels aren't exactly `bug` or `feature` sends everything to triage.
- A setting has to work end to end, but here the dashboard shows routes nobody can edit.
sam
added the bugmedium labels 2026-11-13 03:01:35 +00:00
Issue routing is now the intake-routes control-plane setting: ordered label to workflow rules plus a default, seeded with bug to tdd, feature to feasibility, default triage. Labels match case-insensitively, the first rule in list order wins, and a write with an empty label or an undefined workflow is refused. The daemon reads it when pinning a task and at intake. Removed labelKinds, defaultKindWorkflows, the per-kind NATS subjects (every consumer already bound archie.task.>, so there is one subject now), the envelope and playbook trigger kind, and x-intake-routes. The dashboard has an Issue routing page under Automation (add, reorder, remove, default) and the workflow trigger card reads the same setting. Commit 41f44c43. Ran task check (passes), pnpm test and pnpm run typecheck in ui, and the label routing table test, which fails when case-insensitive matching is broken. Not checked in a browser.
Issue routing is now the intake-routes control-plane setting: ordered label to workflow rules plus a default, seeded with bug to tdd, feature to feasibility, default triage. Labels match case-insensitively, the first rule in list order wins, and a write with an empty label or an undefined workflow is refused. The daemon reads it when pinning a task and at intake. Removed labelKinds, defaultKindWorkflows, the per-kind NATS subjects (every consumer already bound archie.task.>, so there is one subject now), the envelope and playbook trigger kind, and x-intake-routes. The dashboard has an Issue routing page under Automation (add, reorder, remove, default) and the workflow trigger card reads the same setting. Commit 41f44c43. Ran task check (passes), pnpm test and pnpm run typecheck in ui, and the label routing table test, which fails when case-insensitive matching is broken. Not checked in a browser.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Which workflow an issue goes to, based on its labels, is fixed in code.
Where
internal/domain/workintake/subjects.go:labelKindsmaps the labelsbugandfeatureto kinds.kindSubjectsmaps each kind to a NATS subject.internal/domain/workflow/routing.go:defaultKindWorkflowsmaps bug totddand feature tofeasibility.IntakeRoutes,workflowForLabelsandResolveWorkflowIDsend everything else totriage.internal/infrastructure/controlplanestore/workflow_definitions.go: sendsIntakeRoutes()to the dashboard asx-intake-routes, for display only.Why it's a problem
bugorfeaturesends everything to triage.Issue routing is now the intake-routes control-plane setting: ordered label to workflow rules plus a default, seeded with bug to tdd, feature to feasibility, default triage. Labels match case-insensitively, the first rule in list order wins, and a write with an empty label or an undefined workflow is refused. The daemon reads it when pinning a task and at intake. Removed labelKinds, defaultKindWorkflows, the per-kind NATS subjects (every consumer already bound archie.task.>, so there is one subject now), the envelope and playbook trigger kind, and x-intake-routes. The dashboard has an Issue routing page under Automation (add, reorder, remove, default) and the workflow trigger card reads the same setting. Commit
41f44c43. Ran task check (passes), pnpm test and pnpm run typecheck in ui, and the label routing table test, which fails when case-insensitive matching is broken. Not checked in a browser.