Read only the Artifact Registry repositories list envelope (S09 Verdicts plan: 10/10)

What

ArtifactRegistry::Client#repositories read two shapes for the repository list 200: the bare JSON array Artifact Registry used to send, and the {"repositories": [...]} envelope it sends now. That tolerance came in with !253040 (merged) and was always temporary.

This removes the array branch. Only the envelope parses, and a bare array is refused as an unexpected success response, like any other body the contract does not allow.

Nothing changes for callers: the method still returns a Page of Repository objects, cursors still come from the Link header, and the permissions verdicts the envelope carries are still ignored.

Merge gate

Satisfied: the Artifact Registry repository-list envelope (gitlab-org/ops/artifact-registry!2295 (merged)) is live in production since 2026-09-04 (release v2.8.2), so this merges safely.

Tests

The client spec collapses its two happy-path contexts into one and adds the case that pins the removal: a bare array of well-formed repository objects is now refused. That case fails against the current client and passes with this change.

Three specs outside the client also drive the real client over WebMock and stubbed the bare array, so their stubs move to the envelope too: the repositories and repository-detail GraphQL request specs, and the frontend fixture that generates get_repositories.query.graphql.json.

No changelog entry: by the time this merges the array branch is dead code, so there is no user-facing change.

Related to #627317

Related to gitlab-org/ops/artifact-registry#670 (closed)

Edited by João Pereira

Merge request reports

Loading
Loading