docs(specs): specify the ADR-015 registration checks in S10

Summary

Turns the three registration obligations of ADR-015 (internal) into monolith/S10 requirements. S10 tracked them as one open Follow-ups row on gitlab-org/gitlab#632845, where the decisions were agreed with the Artifact Registry team.

Obligation What S10 now requires
Cross-tenant collision check On GitLab.com, a handle equal, ignoring case, to another organization's path, or to the path of a top-level group in another organization, is refused before provisioning. The organization's own path and its own top-level groups' paths stay claimable unless another organization's path matches too. User namespaces and subgroups are not checked
Rate limit on provisioning attempts ADR-015 requires one without naming the side; S10 puts it in Rails, per organization, starting at 10 claims an hour. A claim counts once it passes the syntactic and billing-anchor checks, before the cross-tenant check, so the limit bounds probing of that check as well as of AR. A throttled claim gets its own "try again later" refusal
Refusals that name no reason One availability refusal covers taken, protocol-reserved, brand-reserved, and cross-tenant handles. AR's slug_format gets a format refusal and anchor_mismatch gets "the organization already has a registry, contact support". The message is keyed on the reason that #1564 proposes for AR's error body; until AR sends one, every provisioning 409 and 422 takes the availability refusal. No refusal carries AR's message text

Two points depart from what was agreed on gitlab-org/gitlab#632845, and Resolution 25 names both:

  • the rate limit counts claims the cross-tenant check refuses, not only claims that reach AR;
  • AR's slug_format gets one format refusal rather than a rule-specific one, because it is reached only where AR's format rules have moved ahead of the copy Rails checks first.

Where it lands (821373a1b)

Section Change
Phases, References, Dependencies Phase 1 includes the checks and the four refusal messages. A Dependencies row for #1564 (not blocking), and the "no AR wait" sentence names the reason and its fallback
Persisted mapping: new Registration checks subsection The two checks, their order, which claims count, and the four messages keyed on the AR reason with the status fallback
Provisioning trigger, the mapping row The validation row and step 1 point to the checks; a repeat request runs neither; step 5's "claimed immediately" holds within the rate limit and only after a refusal of the handle itself
GraphQL surface, Ruby client A throttled claim is an expected payload error. The API error carries the envelope's reason; #1564's reason tells the two 409 causes apart, and #383 still closes the recovery gap
Frontend / UX, Compatibility The different-handle race renders like any refusal carrying no registry; retries hold within the rate limit; an unrecognized reason takes the availability refusal
Acceptance criteria Criteria 2 and 4 now name the refusal the 409 maps to. New criteria: 38 (rate limit), 39 (cross-tenant check), 40 (refusal messages), 41 (client reason), appended so cited ordinals are unchanged
Error cases The 409, anchor-mismatch, and 422 rows take the new messages; new rows for the cross-tenant refusal and a throttled claim
Security considerations Handle validation is authoritative at AR except the cross-tenant check. A new bullet covers enumeration through claims, with accepted costs (the private-path probe; a limit per organization rather than per actor) and the bearer-fallback bypass until #692 (closed)
Follow-ups, Resolutions The gitlab#632845 row now records what has not shipped yet: criteria 38-41. Resolution 25 records the decisions, the accepted costs, and the rejected alternatives. Resolution 19's heading becomes "No handle-availability pre-check endpoint"
monolith/S02 The error-mapping row, the envelope sentence, and the Error cases bullet note the GitLab API's reason on ApiError
Spec index The S10 row names the checks

Two Follow-ups rows the monolith overtook (f99212062)

  • Billing anchor type. gitlab-org/gitlab!260980 (merged) merged on 2026-10-12, so the row now records only what remains: namespaces already stored with group need an Artifact Registry data migration (gitlab-org/gitlab#632844 (closed)), and a lost-write retry for one of them answers the anchor-mismatch 409.
  • Setup-page reload. gitlab-org/gitlab!258136 (merged) merged today with the reload and banner, so the row now records the one remaining difference. The banner title the designer chose in that MR's review, "Artifact registry is already enabled", names a status, while criterion 34 and Resolution 24 require a status-neutral title. The row takes no side.

The implementation plan is stacked on this MR: !3309 (merged).

Governing ADRs

  • ADR-015 (internal; read from the handbook source on 2026-10-14). This MR implements:

    • the cross-tenant collision check: SaaS-only, covering top-level group and organization paths, allowing the requester's own, and excluding usernames;
    • the required rate limit on provisioning attempts;
    • the rule that availability rejections are indistinguishable while format errors may be specific.

    Two readings to note:

    • ADR-015 does not name the side that enforces the limit; S10 places it in Rails.
    • The spec reads "the requester" as the organization, so a path the customer holds through a top-level group in another organization is refused like any other customer's.

    The eligibility pre-check stays this spec's Phase 2 credits gate.

  • ADR-014: the checks run in the provisioning service; the resolver pattern and the server-held credential are unchanged.

  • ADR-022: no change to the mapping or the anchors.

Testing

Documentation only. pre-commit run passes on the three files (markdownlint, Vale, lychee), and gitlint passes on both commits. Every new criterion names its RSpec test.

Before pushing, the final text was checked in three passes:

  • a fact-check against gitlab-org/gitlab master at c7d0573f910e, this repository's main at 7e377f64f (S33 and api/openapi/gitlab-v1.yaml), ADR-015's handbook source, and the gitlab-org/gitlab#632845 notes;
  • a whole-spec consistency audit;
  • a final sweep.

No e2e catalog row is affected: the catalogs carry no activation row, and the harness claims e2e-shared for its own organization, which neither check refuses.

Related to gitlab-org/gitlab#632845

Edited by Narendran

Merge request reports

Loading
Loading