Skip to content

fix(tui): let a resolved fleet member slot win over the legacy role label - #5945

Open
gaord wants to merge 1 commit into
Hmbown:mainfrom
gaord:fix/fleet-agent-profile-role-precedence
Open

fix(tui): let a resolved fleet member slot win over the legacy role label#5945
gaord wants to merge 1 commit into
Hmbown:mainfrom
gaord:fix/fleet-agent-profile-role-precedence

Conversation

@gaord

@gaord gaord commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix effective_fleet_role_with_source: it only consulted the resolved agent_profile when worker.agent_profile was empty, so a task whose role label is "manager" but whose agent_profile selects member:reviewer fell through to the legacy worker.role label and ran with the wrong (write-capable) authority. Prefer the resolved member slot; keep the legacy label only as a fallback.

Testing

  • cargo fmt --all -- --check
  • cargo test -p codewhale-tui --lib agent_profile_member_slot_overrides_legacy_role_label

Note: main currently has 5 pre-existing nonminimal_bool clippy errors, unrelated to this change.


Devin Review

…abel

`effective_fleet_role_with_source` only consulted the resolved agent_profile
when `worker.agent_profile` was empty. A task whose role label is "manager"
but whose agent_profile selects `member:reviewer` therefore fell through to
the legacy `worker.role` label and was treated as a write-capable manager —
which never leased (fleet-e12f3160).

Prefer the resolved member's canonical slot (reviewer/builder/...) over the
legacy role label, keeping the label only as a fallback when no member was
resolved.
@gaord
gaord requested a review from Hmbown as a code owner September 6, 2026 08:14

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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.

1 participant