Rate gitlab-org/cli merge requests against its own rules
What does this MR do and why?
Onboards gitlab-org/cli (project 34675721) to the MR Risk Labeler for gitlab-org/gitlab#638927. These are steps 1 and 2 of the onboarding guide:
instructions/34675721/holds the rules file, a rubric per area and a README;- the project joins the
gitlab-orgconsumer insrc/mr-risk/flow.yml.erb, andflows/mr-risk.ymlis recompiled; - the project gets a row in
instructions/README.md.
Nothing here approves anything. Until gitlab-org/quality/triage-ops!4539 (merged) lists the project, the flow only runs when someone mentions or assigns @ai-mr-risk-labeler-gitlab-org, and its labels carry the test- prefix.
Areas
Every one of the 1,766 tracked paths on main (73349adf) falls into one of seven areas. This was checked with Manifest.area_for against git ls-files.
| Area | Paths | Floor | Files |
|---|---|---|---|
agents |
AGENTS.md, CLAUDE.md and the other agents' instruction files, .claude/, .gitlab/duo/, .gitlab-dap-factory.yml, the bundled skills and the remote skill registry |
high | 10 |
specs |
*_test.go, testdata/, test/, internal/testing/, internal/git/testing/ |
681 | |
auth |
internal/auth/, internal/oauth2/, internal/config/, internal/dockercredhelper/, the auth and token commands, the commands that print, write or cache a token, and the API client's files that decide where a credential goes |
high | 83 |
deps |
go.mod, go.sum, .tool-versions, the commit-lint packages |
5 | |
docs |
docs/source/, docs/demos/, docs/*, every other .md |
356 | |
code |
cmd/glab/, the rest of internal/ |
524 | |
tooling |
.gitlab/, cmd/gen-docs/, scripts/, snap/, the Vale and rumdl config, root dotfiles, Makefile, Dockerfile, lefthook.yml |
107 |
What each rubric turns on:
coderates what a revert leaves behind: glab runs with users' tokens andmainis tagged weekly. A changed flag, exit code or JSON output field (--output json,--output-format,--jq) is high, because scripts parse them. So is a shared package with callers outside the diff, anything glab writes outside its own files,binarymgr, the dependency firewall, telemetry andglab skills, and an existing command's MCP annotation loosened. Every command carries an annotation, so a new command's is part of the new command.authhas a floor ofhigh. The question there is where a token can end up, and a diff cannot show that.internal/config/is all of it, since that is where the tokens and the keyring live, and the area also takesconfig getandset, the cluster agent's token cache,artifactregistrylogin and get-token, and the API client's redirects, transports and custom headers.keyring_testing.gostays out ofspecs, because itsinit()runs in every binary, andinternal/git/test_helpers.gogoes tocodefor the same reason.docsrates a generateddocs/source/page by whether it matches the help text beside it. A page edited by hand, or regenerated with no source change, is high.configuration.md's environment variable tables are generated too, and the generator's marker sits in an HTML comment the rater never sees, so the rubric names the generated paths instead.depsrates a Go bump by what the upstream block shows. A hash that does not match, aninitor cgo change, or code that fetches or runs other code is high; anything the check could not read is medium; low needs every version to match with nothing in the diff..tool-versionsand commit-lint bumps are medium too, since every pin is installed beside a token, byscripts/bootstrap.shand by this project's Duo session setup. Credential and crypto modules,github.com/docker/cliandgo.yaml.in/yaml/v3among them, the MCP SDK and the dependency firewall's proxy stay high above a patch bump. testify is linked into glab throughinternal/git/test_helpers.go, so it is not treated as test-only.toolingrates release, signing and packaging,CODEOWNERS(itsgitlab-botlines decide which bot approvals count), credentials and new images as high. So isGO_VERSION, unless it moves by a patch release beside its.tool-versionspin: the release job builds with it, beside the release token.
Both floors and every tier are proposals for the CLI maintainers to correct. instructions/34675721/README.md gives the ordering.
Checked against recent merges to main
Through the gate's path logic, using Manifest.area_for and Diffs::REFUSED_SUBJECTS, over the project's own-branch and dependency-bot merges. Contributors' forks are left out, because triage-ops does not start the flow on them.
- The last 45, gitlab-org/cli!4247 (merged) to gitlab-org/cli!4345 (merged): 41 are rated, and 4 are refused for having 20 files or more: gitlab-org/cli!4326 (merged), gitlab-org/cli!4301 (merged), gitlab-org/cli!4276 (merged) and gitlab-org/cli!4313 (merged), the last of which also touches a release page.
- The 98 since 20 October: 90 are rated. Of the 8 refused, 5 have 20 files or more, gitlab-org/cli!4255 (merged) and gitlab-org/cli!4208 (merged) touch release paths, and gitlab-org/cli!3955 (merged) touches five areas, since its new config key lands in
auth.
Separately, 100 of the 225 merge requests merged in the last 30 days came from contributors' forks or carried Community contribution, and the flow does not rate those.
Before this does anything
- Consumer. The tag after this merges creates the project's consumer, and gitlab-org/quality/triage-ops!4539 (merged) then takes its ID.
- Ruby. This project's Duo session image is
debian:bookworm-slim, and the flow'srun_commandsteps runruby. gitlab-org/cli!4355 (merged) installs Ruby and sets a UTF-8 locale. Until that merges, a run here ends at its first Ruby step. - Network. The upstream check needs proxy.golang.org and sum.golang.org from this project's Duo sessions. Where it cannot reach them, Go bumps come out
not downloadedand rate medium. - Labels. The flow creates each
test-label as a project label the first time it writes it. Nothing has to be made by hand. - Approval paths. gitlab-bot already approves CLI merge requests when Duo Code Review approves them (triage-ops
GitlabCli). This changes nothing there. That path is retired when the project takes approvals from the risk verdict, at step 4.
How to set up and validate locally
make checkspec/mr-risk/instructions_spec.rb holds the manifest to the Manifest the flow runs, resolves every rubric, and checks the index.