Repository navigation
feat(control): project member quota control (ISSUE-507) - #504
Merged
Merged
Conversation
thomasboni
marked this pull request as ready for review
September 29, 2026 04:08
thomasboni
force-pushed
the
feat/project-member-quota
branch
from
September 29, 2026 04:19
af70d25 to
e9fd989
Compare
thomasboni
force-pushed
the
feat/project-member-quota
branch
from
September 29, 2026 04:26
e9fd989 to
9640bfd
Compare
thomasboni
force-pushed
the
feat/project-member-quota
branch
from
September 29, 2026 04:37
9640bfd to
6cc7ed6
Compare
thomasboni
force-pushed
the
feat/project-member-quota
branch
from
October 8, 2026 02:04
6cc7ed6 to
ac474b4
Compare
thomasboni
force-pushed
the
feat/project-member-quota
branch
from
December 2, 2026 10:18
ac474b4 to
7912e56
Compare
Contributor
Author
|
Standalone run after the 2026-12-02 rebase on main. The control was enabled with ownerMax 1, developerMin 1000, totalMax 2 against getplumber/plumber on gitlab.com (thomasboni/test2 has no main branch). The baseline is a build of origin/main (v0.7.24), which lacks the control, so the only difference is the new control. Diff baseline vs this branch: 1,2d0
< Configuration validation warnings:
< - Unknown control in gitlab.controls: "numberOfProjectMembersMustRespectQuota"
20,23d17
< ⚠ WARNING: No controls could be evaluated!
< Data collection failed: no checks could run.
< Re-run with --verbose for details.
<
54a49,62
> ✗ Individual findings (2)
> ────────────────────
>
> MED ISSUE-507 Project member count is outside its role quota (2 findings)
> │
> ├──▶ The project has 3 developers, below the quota minimum of 1000.
> └──▶ The project has 5 members, above the quota maximum of 2.
>
> Fix review the project's members in Settings > Members: remove or downgrade members of a
> role that is over its quota, or add members of a role that is under it, so each role
> count falls within the configured bounds
> ↳ docs: https://getplumber.io/docs/cli/issues/ISSUE-507
>
> ────────────────────
58,63c66,71
< ██████╗ Plumber Score withheld
< ╚════██╗ Status: NOTHING CHECKED (no control was evaluated)
< ███╔═╝
< ╚══╝ Why: every enabled control needs configuration or was skipped
< ██╗ Next: enable or configure at least one control, then re-run
< ╚═╝
---
> █████╗ Plumber Score 90 / 100 █████████████████████████░░░
> ██╔══██╗ Status: FAILED (gate blocks at 100 pts)
> ███████║
> ██╔══██║ Best fix: see the documentation of the finding, +10 pts, 100 / 100 (A)
> ██║ ██║
> ╚═╝ ╚═╝ |
thomasboni
requested review from
Exypte
and removed request for
Totara-thib and
coconux3
December 2, 2026 12:43
Contributor
Author
|
Documentation PR: getplumber/getplumber.io#579 |
Exypte
reviewed
Dec 3, 2026
Exypte
left a comment
Contributor
There was a problem hiding this comment.
Two fixes before merge (the CI early return and awaiting members), plus three nits inline.
thomasboni
added a commit
to getplumber/getplumber.io
that referenced
this pull request
Dec 3, 2026
…s no CI file Follows the review of getplumber/plumber#504: awaiting memberships and blocked or banned accounts are not counted, a deactivated account is, and the control is checked on a project without a valid CI file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR
thomasboni
force-pushed
the
feat/project-member-quota
branch
from
December 3, 2026 15:49
4dc8609 to
b139654
Compare
Adds numberOfProjectMembersMustRespectQuota (CTRL-507, GitLab only): eight optional inclusive bounds (min and max for Owner, Maintainer, Developer and the total), one ISSUE-507 finding per role outside its bounds. Who is counted: everyone with effective access (direct, inherited and invited-group members), each once at their highest role. Access-token bots are excluded, and so are memberships awaiting approval and blocked, banned or pending accounts. A deactivated account is counted. Collection: one members listing per run, capped at 20 pages, fetched only when a bound is set; in platform mode the counts come from the snapshot's members lane. An unreadable listing or a project over the cap reports not evaluable, never a pass. The control does not need a CI file: on a project with none, or an invalid one, it is evaluated on its own and its finding is listed. Reported in the terminal, the JSON (projectMemberQuotaResult) and the shipped default config. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR
thomasboni
force-pushed
the
feat/project-member-quota
branch
from
December 3, 2026 16:01
30be41e to
ddef0fb
Compare
…mited run attachMemberQuotaOnly marked the member quota control collection_failed on every limited analysis (missing or invalid CI file, image network failure), even when the control was disabled or filtered out by --controls or --skip-controls. Since the default config ships it disabled, any project without a valid CI file reported a failed collection for a control nobody turned on. The helper now returns early unless the control is active. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thomasboni
added a commit
to getplumber/getplumber.io
that referenced
this pull request
Dec 3, 2026
* docs(issues): document ISSUE-507, project member quota (CTRL-507) The project member quota control returns under its original id: the ISSUE-507 page leaves the removed state, the control gets its catalog row and CTRL-507 id, and the configuration reference documents the eight optional bounds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR * docs(controls): who the member quota control counts, and that it needs no CI file Follows the review of getplumber/plumber#504: awaiting memberships and blocked or banned accounts are not counted, a deactivated account is, and the control is checked on a project without a valid CI file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
thomasboni
added a commit
that referenced
this pull request
Dec 3, 2026
Brings in the project member quota control (ISSUE-507, #504) and the 0.7.25 release. Conflicts were additive on both sides and keep both controls; the catalog golden is regenerated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR
thomasboni
added a commit
that referenced
this pull request
Dec 3, 2026
Conflicts with the member quota control (#504) and the merge gates (#677), both sides kept everywhere: - control/task.go: the engine config goes through engineConfigFor then omitUnreadMergeGates; the two GitLab early returns attach the member quota verdict and mark mise-en-place not evaluated; runRegoEngine keeps its error return and takes membersData; the end of the run marks the merge gates gap and the mise gap. - control/packagemanagers_run_test.go: runRegoEngine call updated to the new signature (a compile break git did not flag). - control/platform_call_inventory_test.go: recorder fields of both sides. - test lists and the fingerprint golden: both controls listed. - cmd/testdata/catalog_golden.json: regenerated with -update-catalog. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UuPoP4xPXZ8rLEDYRiKznq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
numberOfProjectMembersMustRespectQuota(CTRL-507, ISSUE-507), a GitLab-only access control that checks how many people hold each role on a project against per-role bounds the policy sets. A standalone run readsGET /projects/:id/members/allwith the run's own token, only when a policy enables the control. Everyone with effective access counts once at their highest level (direct members, members inherited from ancestor groups, invited groups); access-token bots are excluded (usernames of the shapeproject_<id>_bot_<random>andgroup_<id>_bot_<random>, plus the legacyproject_<id>_botandproject_<id>_bot1forms). The listing stops after 20 pages: past that cap the count is unknown and the control does not evaluate. A platform run reads the counts from the snapshot'smemberslane and never calls the members API itself. Whenever the counts are unknown (a 403/404 on the listing, the page cap, a server error, a degraded lane, a platform that does not serve the lane) the control reportsnot_evaluablewith a reason (collection_failed,snapshot_lane_degraded,lane_not_served) rather than a verdict; only a network failure degrades the run. One finding per role outside its bounds, identitycode + role; a role never yields two findings (on inverted bounds the maximum finding wins).This brings back the v1 platform's "Number of project members must respect a quota" control with the v1 keys, so v1 policies map onto it 1:1. Severity medium, category Access and Authorization, every GitLab plan.
Configuration
All eight keys are optional integers, bounds inclusive. An unset key asserts nothing. Enabled with no bound set is
config_required. A negative bound or a minimum above its maximum is refused at config load.ownerMin/ownerMaxmaintainerMin/maintainerMaxdeveloperMin/developerMaxtotalMin/totalMaxThe shipped default declares the control disabled with the eight keys documented. The init wizard is not extended: the control has no product defaults (same as
mergeRequestSettingsMustBeCompliant).Commits
feat(control): add numberOfProjectMembersMustRespectQuota (ISSUE-507): config struct and load-time validation, registry, issue code, catalog, IR, the Rego rule and its tests, identity{role}.feat(gitlab): collect project member counts per role: the paginated fetcher, bots excluded, page cap, 403/404 classification.feat(platform): read the members snapshot lane:snapshot.data.membersanddegraded_fields: members.feat(control): wire the member quota control through the collection lanes: the gated lane, engine config, status, lane bookkeeping,collection_failedon a non-network error, the network carve-out in the whole-run status loop, the call inventory (standalone 18 requests, platform 3).feat(cmd): report the member quota control in the terminal, JSON and shipped default.E2E evidence
Standalone, gitlab.com
thomasboni/test2, configownerMax: 0, totalMin: 1:JSON (
--output):projectMemberQuotaResulthasstatus: failed,metrics {owners: 2, maintainers: 1, developers: 0, total: 3, rolesOutOfQuota: 1}, and one ISSUE-507 issue withrole: owner, currentCount: 2, authorizedMax: 0.Unreadable listing (nil or
Known=false): the terminal block renders a single caveat line ("Project members not evaluated ..."), JSON statuserror, the count metrics omitted. WithoutGITLAB_TOKENthe CLI stops before any request, as today.Platform mode, in process (the GitLab lab project has no platform job to drive from this session). The recorded GitLab ledger stays at 3 requests (
GET /projects/:id,repository/commits,repository/files/:file/raw), nevermembers/all:not_evaluable/lane_not_served, no ISSUE-507 (TestPlatformRunWithoutMembersLaneAbstains);TestSwitchedLanesReportTheSameVerdicts);snapshot_lane_degraded(TestDegradedNewLanesAbstainEndToEnd).go test ./...green (14 packages),golangci-lint run0 issues.make deadcodereportsconfiguration.ConfigSchemas, which CI already filters and which is not touched here.Platform lane
The platform collector for the
memberslane ships in a separate monorepo PR (pin bump, contract, collector, frontend editor, docs). Until it lands, every platform run reports this control asnot_evaluablewith reasonlane_not_served: honest abstention, never a pass.🤖 Generated with Claude Code