docs(specs): serve S17 repository statistics on remote repositories

Summary

S17 says a remote repository gets 404 on the repository statistics route. This MR changes the spec: a remote repository now gets its statistics, counted from its cache.

The decisions:

  • Counts come from the cache. The remote walk is the hosted walk with the remote tables, so the counts match the remote lists.
  • Remote npm has no dist_tags_count. The cache has no dist-tag rows. Without the field, the response has the Maven shape, so the API needs no new shape.
  • Remote container tags_count matches the tags list. It leaves out the tags of an evicted manifest. The count reads every cached tag, so it is measured before it ships. If it is too slow, the field is dropped on remote.
  • Remote downloads_count is 0 for npm, Docker, and OCI. Only Maven remote writes it today. #292 owns the rest.
  • Version statistics stay hosted-only, and virtual stays 404. Follow-ups lists both. Neither has an issue yet.

A new Resolution at the end of S17 records these decisions and the rejected options.

Not in this MR

  • OpenAPI, Bruno, tests, and the e2e row e2e.maven.setup.repository-statistics. They change with the code.
  • The monolith S05 spec and the sidebar-counts plan. They still say AR has no remote statistics, which is true until the code ships. gitlab-org/gitlab#632276 owns that side.

Governing ADRs

  • ADR-009: the statistics route has no kind limit, so serving remote fits it.
  • ADR-021: statistics need read_repository, the same as cache reads. Nothing changes.
  • ADR-007: the local mirror is behind. The newer upstream text drops npm_remote_tags (gitlab-com/content-sites/handbook@94ce5643), which supports "no dist-tag rows".

No deviation.

Testing

Spec only. markdownlint, Vale, and lychee pass.

S17 has no "hosted only" claim left about the repository scope. The ones left are about other things: the version scope, npm dist-tag routes, tag upsert, and the older Phase 8 Resolution.

No e2e row changes here. e2e.maven.setup.repository-statistics still expects a remote 404, and it changes with the code.

Related to #1530 (closed)

Edited by Dzmitry (Dima) Meshcharakou

Merge request reports

Loading
Loading