| | @@ -37,11 +37,19 @@ A lean denylist in `OrgName::new` reserves the prefixes, checked against the nor |
| 37 | 37 | lowercase form so `API` and `api` are the same handle: |
| 38 | 38 | |
| 39 | 39 | ``` |
| 40 | | −about admin api assets auth explore help search settings static |
| 40 | +about admin api assets auth dashboard docs explore help legal |
| 41 | +notifications privacy search security settings static status steid support terms |
| 41 | 42 | ``` |
| 42 | 43 | |
| 43 | | −Adding `/auth/reset-password` costs nothing. Only a genuinely new area — `/explore` — |
| 44 | | −would add an entry, and the likely ones are reserved already. |
| 44 | +Adding `/auth/reset-password` costs nothing. Only a genuinely new *area* adds an entry. |
| 45 | + |
| 46 | +`steid` is reserved so nobody can hold the project's own name and impersonate the |
| 47 | +software. The legal cluster (`privacy`, `terms`, `legal`, `security`) is there because a |
| 48 | +publicly hosted instance conventionally wants those at the root. |
| 49 | + |
| 50 | +**The test for adding one:** could this ever be a top-level route? Under grouping, |
| 51 | +almost nothing is — a health check is `/api/health`, sign-up is `/auth/register`. Words |
| 52 | +that would live under a prefix do not belong on the list. |
| 45 | 53 | |
| 46 | 54 | ## Alternatives considered |
| 47 | 55 | |
| | @@ -76,4 +84,35 @@ would add an entry, and the likely ones are reserved already. |
| 76 | 84 | from `/org/`; with one root namespace, both are just `/{handle}`. It may still be |
| 77 | 85 | worth having for display, but it is not load-bearing and is dropped from Milestone 2. |
| 78 | 86 | - Topcoat serves its assets from `/_topcoat/`, which the character rules already exclude, |
| 79 | | − so it needs no reservation. |
| 87 | + so it needs no reservation. The same holds for `/.well-known/` (federation, |
| 88 | + `security.txt`), `robots.txt`, `favicon.ico` and `sitemap.xml` — every conventional |
| 89 | + root path that contains a `.` or `_` is unreachable as a handle for free. |
| 90 | + |
| 91 | +## How this ages — prior art |
| 92 | + |
| 93 | +GitHub's namespace is flat, and it pays for it: community mirrors of its reserved list |
| 94 | +run to [590+ names](https://github.com/shouldbee/reserved-usernames), with no official |
| 95 | +list published. You discover a name is taken when signup rejects it. |
| 96 | + |
| 97 | +GitLab is the more useful comparison, because they hit it hard enough to build |
| 98 | +machinery. Their reserved names live in `namespace_validator.rb` and |
| 99 | +`project_path_validator.rb`, and their docs state plainly that as new functionality is |
| 100 | +introduced, more restrictions will be added — the list is expected to grow forever. Two |
| 101 | +details bear on us: |
| 102 | + |
| 103 | +- **Their reservation is depth-dependent.** A group named `api` is rejected at the top |
| 104 | + level but allowed nested under another namespace, where nothing collides. That is |
| 105 | + exactly the property grouping gives us, and it is what our substring and nesting tests |
| 106 | + pin down. |
| 107 | +- **They built `RenameReservedPathsMigration`** — tooling to forcibly rename users who |
| 108 | + already hold a newly-reserved path. That is the escape hatch for the breaking change |
| 109 | + described above, and the reason their list can keep growing. |
| 110 | + |
| 111 | +The cost runs both ways: GitLab has a long-standing open issue, |
| 112 | +[*Rename GitLab-reserved paths that our users want to use*](https://gitlab.com/gitlab-org/gitlab/-/issues/16854), |
| 113 | +trying to give paths back. Over-reserving is not free either. |
| 114 | + |
| 115 | +**Deliberately not built yet:** a rename path. With a single user who is also the |
| 116 | +operator, adding a reserved word means renaming yourself. It becomes worth having around |
| 117 | +Milestone 7, when multi-user registration means handles stop being ours to reassign |
| 118 | +freely — but building it now would be machinery for a problem that does not exist. |