{"record":{"id":"f8f9aeeed7256e9f","repo":"Hmbown/CodeWhale","slug":"fleet-task-worker-role-selector-selector-does-not-name-a","errorCode":null,"errorMessage":"Fleet task {} worker.role selector {selector:?} does not name a member in the explicitly selected Fleet","messagePattern":"Fleet task (.+?) worker\\.role selector (.+?) does not name a member in the explicitly selected Fleet","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/worker_runtime.rs","lineNumber":196,"sourceCode":"                anyhow::anyhow!(\n                    \"Fleet task {} references unknown agent profile selector {selector:?}\",\n                    task.id\n                )\n            })?)\n        } else if let Some(selector) = legacy_role_selector.as_deref() {\n            // `role` was historically only a posture. Preserve that contract\n            // when no exact Fleet is selected and a roster lookup is absent.\n            // Ambiguity is never a posture: silently dropping it would make a\n            // selected team launch an anonymous session-route worker.\n            match resolve_member_in_profiles(agent_profiles, selector).map_err(|error| {\n                anyhow::anyhow!(\n                    \"Fleet task {} has invalid worker.role member selector {selector:?}: {error}\",\n                    task.id\n                )\n            })? {\n                Some(profile) => Some(profile),\n                None if require_exact_member => {\n                    bail!(\n                        \"Fleet task {} worker.role selector {selector:?} does not name a member in the explicitly selected Fleet\",\n                        task.id\n                    )\n                }\n                None => None,\n            }\n        } else if require_exact_member {\n            bail!(\n                \"Fleet task {} must name one member from the explicitly selected Fleet\",\n                task.id\n            );\n        } else {\n            None\n        };\n\n        if let Some(profile) = selected {\n            validate_selected_member_model(task, profile)?;\n            let snapshot = FrozenFleetMember::from_profile(profile);","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/worker_runtime.rs#L178-L214","documentation":"A Fleet task's worker.role selector resolved to no member in the explicitly selected Fleet while exact-member mode is on. The selector string is a legacy role label; freeze_fleet_task_members could not map it to any roster member, so the task cannot be frozen.","triggerScenarios":"freeze_fleet_task_members with require_exact_member=true and a task whose worker.role names a role (e.g. \"worker\") that no AgentProfile in agent_profiles carries, or a member id that does not exist in the roster.","commonSituations":"Renaming/removing a Fleet member while tasks still reference its old role or id; typos in role labels; specs copied from another fleet whose roster differs.","solutions":["Change the task's worker selection to name an existing member of the current Fleet.","Add/restore a member with the referenced role to the Fleet.","Fix the role-label typo in the task spec."],"exampleFix":"// before\n\"worker\": {\"role\": \"reviewer\"}  // no member with role \"reviewer\"\n// after\n\"worker\": {\"member\": \"agent-7\"}","handlingStrategy":"validation","validationCode":"fn selector_resolves(selector: &str, profiles: &[AgentProfile]) -> bool { profiles.iter().any(|p| p.id == selector || p.role == selector) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-validate task member references after roster edits","Use member ids rather than role labels for selection","Lint specs for references to removed members"],"tags":["fleet","roster","reference"],"backgroundTag":"entity-not-found","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}