Skip to content

Validate empty teams - #2913

Open
clarfonthey wants to merge 1 commit into
rust-lang:mainfrom
clarfonthey:validate-empty-teams
Open

clarfonthey wants to merge 1 commit into
rust-lang:mainfrom
clarfonthey:validate-empty-teams

Conversation

@clarfonthey

Copy link
Copy Markdown
Contributor

Would require T-spec signoff: #t-spec > spec-contributors subteam

Mostly just solving this bug we found a while back: #t-website > Fun edge case: alumni-only team that isn't archived

Essentially, there are two cases in the code where it seems valid to leave a team without active members:

  1. launching pad is a parent team who has no direct members, which is fine
  2. rustconf-emails and foundation-email-redirects are marker teams with no members that only exist to track email redirects

However, spec-contributors satisfies none of the following:

  • Active members
  • Subteams
  • Non-team email redirects (if they referenced people or teams, they might be a better fit to be in another place)

So, the proposal here is to say we should archive any team where this is the case, and specifically, to archive spec-contributors as the current sole example. But, I'll mark this as a draft until we get approval that this is okay from the spec team.

@clarfonthey
clarfonthey force-pushed the validate-empty-teams branch 2 times, most recently from 55df602 to f13de76 Compare November 6, 2026 18:45
@clarfonthey

clarfonthey commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Okay, this one is confusing me: cargo run check is validating just fine, but for some reason, the leadership council team is empty when running via the tests. dbg! output:

cargo run check
[src/validate.rs:417:13] &team = Team {
    name: "leadership-council",
    kind: Team,
    subteam_of: None,
    top_level: None,
    google_workspace_saml_group: None,
    people: TeamPeople {
        leads: [],
        members: [
            TeamMember {
                github: "lqd",
                roles: [
                    "council-rep-compiler",
                ],
            },
            TeamMember {
                github: "Manishearth",
                roles: [
                    "council-rep-devtools",
                ],
            },
            TeamMember {
                github: "PLeVasseur",
                roles: [
                    "council-rep-lang",
                ],
            },
            TeamMember {
                github: "m-ou-se",
                roles: [
                    "council-rep-launching-pad",
                ],
            },
            TeamMember {
                github: "Kobzol",
                roles: [
                    "council-rep-infra",
                ],
            },
            TeamMember {
                github: "oli-obk",
                roles: [
                    "council-rep-mods",
                ],
            },
            TeamMember {
                github: "Mark-Simulacrum",
                roles: [
                    "council-rep-libs",
                ],
            },
        ],
        alumni: Some(
            [
                TeamMember {
                    github: "khionu",
                    roles: [],
                },
                TeamMember {
                    github: "rylev",
                    roles: [],
                },
                TeamMember {
                    github: "carols10cents",
                    roles: [],
                },
                TeamMember {
                    github: "jonathanpallant",
                    roles: [],
                },
                TeamMember {
                    github: "jackh726",
                    roles: [],
                },
                TeamMember {
                    github: "technetos",
                    roles: [],
                },
                TeamMember {
                    github: "eholk",
                    roles: [],
                },
                TeamMember {
                    github: "jamesmunns",
                    roles: [],
                },
                TeamMember {
                    github: "cuviper",
                    roles: [],
                },
                TeamMember {
                    github: "ehuss",
                    roles: [],
                },
                TeamMember {
                    github: "traviscross",
                    roles: [],
                },
                TeamMember {
                    github: "joshtriplett",
                    roles: [],
                },
            ],
        ),
        included_teams: [],
        include_team_leads: false,
        include_wg_leads: false,
        include_project_group_leads: false,
        include_all_team_members: false,
        include_all_alumni: false,
    },
    permissions: Permissions {
        bors: {},
        booleans: {},
    },
    leads_permissions: Permissions {
        bors: {},
        booleans: {},
    },
    github: [
        GitHubData {
            team_name: None,
            orgs: [
                "rust-lang",
                "rust-lang-nursery",
            ],
            extra_teams: [],
        },
    ],
    rfcbot: Some(
        RfcbotData {
            label: "T-leadership-council",
            name: "Leadership Council",
            ping: "rust-lang/leadership-council",
            exclude_members: [],
        },
    ),
    website: Some(
        WebsiteData {
            name: "Leadership council",
            description: "Charged with the success of the Rust Project as whole, consisting of representatives from top-level teams",
            page: None,
            email: Some(
                "council@rust-lang.org",
            ),
            repo: Some(
                "https://github.com/rust-lang/leadership-council",
            ),
            matrix_room: None,
            zulip_stream: Some(
                "council",
            ),
            weight: 1000,
        },
    ),
    roles: [
        MemberRole {
            id: "council-rep-compiler",
            description: "Compiler team",
        },
        MemberRole {
            id: "council-rep-devtools",
            description: "Dev tools team",
        },
        MemberRole {
            id: "council-rep-infra",
            description: "Infrastructure team",
        },
        MemberRole {
            id: "council-rep-lang",
            description: "Language team",
        },
        MemberRole {
            id: "council-rep-launching-pad",
            description: "Launching pad",
        },
        MemberRole {
            id: "council-rep-libs",
            description: "Library team",
        },
        MemberRole {
            id: "council-rep-mods",
            description: "Moderation team",
        },
    ],
    lists: [
        TeamList {
            address: "council@rust-lang.org",
            include_team_members: true,
            include_subteam_members: false,
            extra_people: [],
            extra_emails: [],
            extra_teams: [],
        },
        TeamList {
            address: "contact@rust-lang.org",
            include_team_members: true,
            include_subteam_members: false,
            extra_people: [],
            extra_emails: [
                "council@rust-lang.org",
            ],
            extra_teams: [],
        },
    ],
    zulip_groups: [
        RawZulipGroup {
            common: RawZulipCommon {
                name: "council",
                include_team_members: true,
                extra_people: [],
                extra_zulip_ids: [],
                extra_teams: [],
                excluded_people: [],
            },
        },
    ],
    zulip_streams: [
        RawZulipStream {
            common: RawZulipCommon {
                name: "council-project-directors/private",
                include_team_members: true,
                extra_people: [],
                extra_zulip_ids: [],
                extra_teams: [
                    "foundation-board-project-directors",
                ],
                excluded_people: [],
            },
            public_history: Some(
                false,
            ),
        },
        RawZulipStream {
            common: RawZulipCommon {
                name: "foundation-council-private",
                include_team_members: true,
                extra_people: [],
                extra_zulip_ids: [],
                extra_teams: [
                    "foundation-staff",
                    "foundation-board-project-directors",
                    "program-managers",
                ],
                excluded_people: [],
            },
            public_history: Some(
                true,
            ),
        },
        RawZulipStream {
            common: RawZulipCommon {
                name: "council/private",
                include_team_members: true,
                extra_people: [],
                extra_zulip_ids: [],
                extra_teams: [],
                excluded_people: [],
            },
            public_history: None,
        },
    ],
}
cargo test
[src/validate.rs:417:13] &team = Team {
    name: "leadership-council",
    kind: Team,
    subteam_of: None,
    top_level: None,
    google_workspace_saml_group: None,
    people: TeamPeople {
        leads: [],
        members: [],
        alumni: Some(
            [],
        ),
        included_teams: [],
        include_team_leads: false,
        include_wg_leads: false,
        include_project_group_leads: false,
        include_all_team_members: false,
        include_all_alumni: false,
    },
    permissions: Permissions {
        bors: {},
        booleans: {},
    },
    leads_permissions: Permissions {
        bors: {},
        booleans: {},
    },
    github: [],
    rfcbot: None,
    website: Some(
        WebsiteData {
            name: "Leadership council",
            description: "test",
            page: None,
            email: None,
            repo: None,
            matrix_room: None,
            zulip_stream: None,
            weight: 0,
        },
    ),
    roles: [],
    lists: [],
    zulip_groups: [],
    zulip_streams: [],
}

Note that the only code is this added to the top of validate_active_teams:

if team.name() == "leadership-council" {
    dbg!(&team);
}

@clarfonthey

Copy link
Copy Markdown
Contributor Author

I'm just going to mark this as ready for review because I genuinely don't understand this issue, and presumably one of the five people mentioned by CODEOWNERS can help. It should be otherwise ready.

@clarfonthey
clarfonthey marked this pull request as ready for review November 10, 2026 05:00

This branch has not been deployed

No deployments
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