Skip to content

Dispatch role check maps retro and prioritize to fullsend meta-role, bypassing per-stage disable in org config #4529

Description

@fullsend-ai-retro

What happened

The konflux-ci org config.yaml (in konflux-ci/.fullsend) has the retro role commented out in defaults.roles with a note: 'Retro agent is awesome, but it currently has a bug where it fails to post a comment back on the PR that triggered it. Let's re-enable after this is fixed: #1076'. Issue #1076 was closed (the bug was fixed), but the config was never updated to re-enable retro. Despite being commented out, retro continues to dispatch on every merged PR. The dispatch.yml 'Check role is enabled' step maps the retro stage to the 'fullsend' meta-role: retro|prioritize) STAGE_ROLE="fullsend". Since 'fullsend' is in the roles list, the check always passes regardless of whether 'retro' is listed.

What could go better

The config suggests the org intended to disable retro, but the role mapping makes this impossible without also disabling prioritize and the fullsend meta-role itself. This is a config/implementation mismatch: the config file appears to offer per-stage control via the roles list, but the dispatch implementation groups retro and prioritize under a single meta-role. Anyone reading the config would incorrectly believe retro is disabled. If the org's intent was to keep retro disabled until #1076 was fixed, retro has been running unintentionally since that fix landed. If retro was re-enabled intentionally (without updating the config), then the stale comment is misleading. Either way there is a discrepancy. Confidence is high — the dispatch.yml role mapping logic is unambiguous.

Proposed change

Two changes are needed: (1) In dispatch.yml, check stages against their own names rather than mapping to a meta-role. Change the role check so that 'retro' checks for 'retro' in the roles list and 'prioritize' checks for 'prioritize'. If a meta-role like 'fullsend' should also enable them, add logic like: stage is enabled if its own name OR 'fullsend' is in the roles list. This allows per-stage disable while preserving the convenience of the meta-role. (2) In the konflux-ci org config.yaml, either uncomment '- retro' to explicitly re-enable it (since #1076 is fixed), or remove the stale comment and confirm it should remain disabled. The current state is ambiguous.

Validation criteria

(1) After updating dispatch.yml: commenting out 'retro' in defaults.roles actually prevents retro dispatch, even when 'fullsend' is present. (2) Commenting out 'prioritize' independently prevents prioritize dispatch without affecting retro. (3) Adding 'fullsend' to roles still enables both retro and prioritize as a convenience shortcut. (4) The konflux-ci org config accurately reflects the org's current intent for retro dispatch.


Generated by retro agent from konflux-ci/release-service#1797

Metadata

Metadata

Assignees

Labels

agent/retroRetro agentbugcomponent/dispatchWorkflow dispatch and triggerspriority/mediumNormal priority, plan for next cycletriagedTriaged but awaiting human prioritizationtype/bugConfirmed defect in existing behavior

Type

No type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions