Fold the deps flow into the MR Risk Labeler
What does this MR do and why?
Follows !112 (merged). Karan asked for the deps flow to move into the MR Risk Labeler and go. The flow flow stays, since gitlab-org/gitlab runs on it. Today the deps flow rates the dependency bot's bumps on three pilots: bench, gitlab-zoekt-indexer and gitlab-elasticsearch-indexer, all approve: false in triage-ops. This MR rates them in mr-risk instead, and deletes the deps flow.
Eight commits:
-
Read Go modules in the upstream check. A go.mod or go.sum that moves a module from one version to another is handled like a gem or npm bump:
- the check downloads both versions from proxy.golang.org;
- it holds each to sum.golang.org's
h1and to go.sum's; - it unpacks each as the go command extracts it, and shows the new version's go.mod and the diff of the two.
A
replacedirective and thegoandtoolchainlines are named asnot read. The zip reader is the parked deps flow's, ported. It refuses anything Go never writes: an encrypted or zip64 entry, another compression method, a repeated name, a name that climbs out, or more than 256 MiB unzipped. It also inflates a step at a time, so a zip that lies about its sizes can't fill memory first. gitlab-org/gitlab's rubric now says what the go command runs. -
Rate the three pilots in mr-risk. Each project gets
instructions/<id>/with onedepsarea and a rubric. The area covers the files that project's Renovate configuration lets the bot edit. The three join gitlab-org/gitlab in the flow's consumers. -
Remove the deps flow:
src/deps,flows/deps.ymlandspec/deps;- the
deps-pilotssuite and thedeps-upstreamsuite, which scored a stageflows/deps.ymlnever had; - the README sections that described them.
The eval specs that read
flows/deps.ymlnow readflows/flow.yml. -
Delete the deps flow from the AI Catalog at the next tag.
flows/deps.ymlcomes back withdelete: true, the catalog sync's own way to remove a flow. Leaving the file deleted while the mapping still listed it would have stopped the next tag's sync at "Flow file not found": it loads every flow the mapping lists before it syncs anything.src/depsstays gone, so the file is kept by hand until the sync removes it, and its header says so. The README now describes this route. -
Say that the sync adds the account and the flow makes its labels. The README's onboarding steps and
instructions/README.mdhad both as conditions to arrange by hand. The catalog sync adds the group's service account to a project as a Developer when it creates the project's consumer, andupdate_merge_requestcreates any label the project lacks, as a project label. -
Drop bench's
Cargo.tomlpattern, which**/Cargo.tomlalready matches. -
Say how to colour and share the labels without duplicating them. A group label made after a project in the group has one of the same name sits beside it rather than replacing it. The guides now send colours to the project's own labels, and sharing to group labels made before any project has them, or to promoting the project label.
-
Say labelling takes Developer, and each label appears when first written. Creating a label takes less, but the flow makes one only through
update_merge_request, and GitLab appliesadd_labelsonly for a caller who can set a merge request's metadata, which takes the Developer role. That holds for the service account and for whoever started the run. Each label is made the first time the flow writes it, so the guides now say to create the labels beforehand or recolour each one as it appears, rather than after the first run.
What does not carry over
raise_below_one, a version-number floor. Nothing in the flow selects the rater's model. The platform fixes it per namespace, and all three pilots are in gitlab-org, as gitlab-org/gitlab is.approval_rulesas a step. The lists each pilot's maintainers agreed to review themselves are restated in that project'sdeps.md, as words the rater applies:- the never-approve packages;
- bench's patch-only rule;
- the Go
goandtoolchainlines.
- The version-number rubric the deps flow shared with
flow.flowkeeps it for its own deps category.
Evidence
In the production sandbox. The new check ran through flows/mr-risk.yml's exact fetch_upstream command in @anthropic-ai/sandbox-runtime@0.0.77, with Ruby 3.4 and no locale set.
- The 45 gem and npm bumps from !112 (merged). These ran under gitlab-org/gitlab's three allowed domains, and 43 print the same blocks as on !112 (merged). The other two are workhorse bumps, which now print a Go block whose modules are
not downloaded: the proxy refused sum.golang.org. They rate medium, as they did. - The 37 saved pilot bumps, with proxy.golang.org and sum.golang.org allowed:
- every one exits 0 with nothing on stderr, in under 6 s;
- 48 versions match both sum.golang.org and go.sum, and none mismatches;
- 6 are
not downloaded, because proxy.golang.org redirects google.golang.org/api's zip; - 2 gitaly versions are
not unpacked, because the sandbox refuses to write the.gitconfigin their testdata; - 16 print no block: bench's 14, and 2
.tool-versionspins.
Rated by the production model. bin/eval on claude_sonnet_5_5_vertex, 3 passes each, with !111 (closed)'s harness. The suites below are local and were never pushed.
- 5 planted Go blocks: all 15 passes as expected.
- High in every pass:
- a go.sum hash mismatch;
- an
initadded; - a cgo file with
#cgo LDFLAGS; os/execrunning a fetched script.
- The clean control, with a README version string only, is low in every pass.
- High in every pass:
- The 37 pilot bumps, with the sandbox's blocks planted. The scored cases are those the rubric leaves nothing lower for: all of bench, the pins, and each module the check could not read whole or the maintainers listed. All 30 are medium or high in every pass, 89 of 89. Of the 7 modules the check read whole:
- zoekt-1059, labkit, rates low in every pass: its diff touches only docs and CI config;
- zoekt-1073 rates low in two passes;
- es-indexer-860 and zoekt-1038 rate high in every pass. labkit changes how it parses request headers, and gopsutil removes an
initfrom a cgo file.
- gitlab-org/gitlab's Go,
*_VERSIONand control cases (gitlab-259030, -260615, -261825, -263115, -263195, -260448, -261927) rate as they did before !118 (merged): medium, and the two controls low.
Per pilot bump: the deps rubric's tier from deps-pilots, and mr-risk's three passes
| Case | Bump | deps-pilots | mr-risk, 3 passes |
|---|---|---|---|
| bench-96 | rust to v1.98.0 | - | MMM |
| bench-98 | uv to v0.12.7 | L | MMM |
| bench-107 | shfmt to v3.14.0 | L | MMM |
| bench-110 | uv to v0.12.9 | L | MMM |
| bench-112 | go to v1.27.1 | H | MMM |
| bench-114 | gitlab-com/gl-infra/common-ci-tasks | M | MMM |
| bench-117 | gitlab-com/gl-infra/common-ci-tasks | M | MMM |
| bench-118 | gitlab-com/gl-infra/common-ci-tasks | M | MMM |
| bench-121 | editorconfig-checker to v3.11.3 | L | MMM |
| bench-122 | gitlab-com/gl-infra/common-ci-tasks | M | MMM |
| bench-153 | cargo:cargo-zigbuild to v0.23.4 | M | MMM |
| bench-166 | docker-cli to v28.5.2 | - | MMM |
| bench-167 | goreleaser to v2.18.2 | L | MMM |
| bench-170 | shfmt to v3.14.1 | - | MMM |
| es-indexer-852 | gitlab.com/gitlab-org/rust/gitlab-code-parser/bindings/go | M | HHH |
| es-indexer-855 | github.com/go-enry/go-enry/v2 to v2.9.4 | L | MMM |
| es-indexer-859 | gitlab.com/gitlab-org/gitaly/v18 to v18.8.3 | L | MMM |
| es-indexer-860 | gitlab.com/gitlab-org/labkit to v1.37.1 | M | HHH |
| es-indexer-863 | golang.org/x/tools to v0.42.0 | H | MMM |
| es-indexer-865 | gitlab.com/gitlab-org/gitaly/v18 to v18.8.4 | L | MMM |
| es-indexer-871 | gitlab.com/gitlab-org/labkit to v1.38.0 | M | MLM |
| es-indexer-881 | github.com/go-enry/go-enry/v2 to v2.9.5 | L | MMM |
| es-indexer-884 | google.golang.org/grpc to v1.79.2 | H | MMM |
| es-indexer-890 | google.golang.org/grpc to v1.79.3 | L | HHH |
| zoekt-1037 | google.golang.org/api to v0.295.0 | M | MMM |
| zoekt-1038 | github.com/shirou/gopsutil/v4 to v4.26.8 | L | HHH |
| zoekt-1039 | github.com/prometheus/client_model to v0.6.3 | M | MLM |
| zoekt-1040 | gitlab.com/gitlab-org/labkit to v1.64.20 | M | MMM |
| zoekt-1042 | google.golang.org/api to v0.296.0 | M | MMM |
| zoekt-1045 | golang to v1.27.1 | - | MMM |
| zoekt-1059 | gitlab.com/gitlab-org/labkit to v1.64.21 | L | LLL |
| zoekt-1067 | google.golang.org/api to v0.298.0 | M | MMM |
| zoekt-1068 | gitlab.com/gitlab-org/labkit to v1.65.1 | M | MML |
| zoekt-1069 | google.golang.org/grpc to v1.84.0 | H | MMM |
| zoekt-1073 | gitlab.com/gitlab-org/labkit to v1.65.3 | L | LLM |
| zoekt-1077 | golangci-lint to v2.14.0 | L | MMM |
| zoekt-1083 | golang.org/x/sync to v0.24.0 | - | MHM |
Where they differ, the tier now follows the diff:
- Low to high:
- grpc v1.79.3 rejects method paths without a leading slash;
- gopsutil removes an
init.
- High to medium: these were rated on version number. They are a bump that moves more than five modules, a grpc bump whose diff is
cut, and bench's go pin, all of which nothing reads in full. - Low to medium: every bench bump. Its crates, tools and images have no diff the check reads.
What it means for each pilot
| Pilot | Bumps the check reads | Bumps that rate medium unread |
|---|---|---|
| gitlab-zoekt-indexer | Go modules, by their diff | .tool-versions pins, CI refs, and a module the check cannot read whole |
| gitlab-elasticsearch-indexer | Go modules, by their diff | .tool-versions pins, the golangci-lint version in .gitlab-ci.yml, and a module the check cannot read whole |
| bench | none: Cargo crates, mise and asdf tools, images | every bump |
A merge request touching any path outside a pilot's deps area is refused by name. That includes a major Go bump that rewrites import paths.
Before the pilots switch
The change-over is in triage-ops, in this order, so triage-ops never starts a deps consumer the sync has deleted:
- gitlab-org/quality/triage-ops!4542 (merged) takes the three pilots out of triage-ops' config. It merges just before this MR.
- This MR merges and is tagged. The catalog sync creates each pilot's mr-risk consumer and deletes its deps consumer.
- Three stacked drafts add the pilots back with their mr-risk consumer IDs: gitlab-org/quality/triage-ops!4530 (merged) (gitlab-elasticsearch-indexer), gitlab-org/quality/triage-ops!4531 (merged) (gitlab-zoekt-indexer) and gitlab-org/quality/triage-ops!4532 (merged) (bench, which also drops the deps flow's service account). They are stacked on gitlab-org/quality/triage-ops!4542 (merged), and carry
consumer_id: 0until the sync gives them IDs.
Between steps 1 and 3 the pilots are not rated. All three are approve: false, so only their dry-run labels and notes pause.
The pilots also wait on:
- Network. The pilots' Duo sessions run in sandbox-runtime 0.0.78 with only GitLab's own hosts allowed. That is the default with no
.gitlab/duo/agent-config.yml, and none of the three has one. Until zoekt-indexer and elasticsearch-indexer allow proxy.golang.org and sum.golang.org, every module there isnot downloaded, which rates medium. gitlab-org/gitlab-zoekt-indexer!1119 (merged) and gitlab-org/gitlab-elasticsearch-indexer!982 (merged) allow them.
Access and labels need nothing by hand. The sync adds @ai-mr-risk-labeler-gitlab-org to each pilot as a Developer when it creates the consumer, and the flow creates the nine test- labels it writes there as project labels on first use, as it did in gitlab-org/gitlab and the catalogue. After the sync, check the account is a member of each pilot.
The deps flow leaves the catalog at the tag. The catalog sync on the tag after this merges deletes, with the token that created them:
- the deps flow's consumers: gitlab-org's group consumer 12585003, the three pilots', and gitlab-org/gitlab's 12585004, which is still enabled although the flow no longer lists the project;
- catalog item 1018093.
It then removes the flow's entry from .ai-catalog-mapping.json and the file, and commits both to main. The catalog-sync job log is the check. A consumer it could not delete shows as a warning, and needs a Maintainer of that project to delete it in the AI Catalog.
Still open
- gitlab-org/gitlab allows no Go host. A workhorse module there now prints
not downloaded: the proxy refused sum.golang.org, which rates medium, as it did. Allowing the Go hosts there is AppSec's call. - The eval specs.
spec/eval,bin/evalandevals/README.mdchange here as well as in !111 (closed). Whichever merges second rebases. .gitconfigfiles. The sandbox refuses to write one, so a module whose testdata holds one, gitaly among them, isnot unpacked.