steid

@jamesgill /

docs: record the repo model decisions

Should have been part of ef1e482. Ticks the domain step and moves the three
questions out of "decide during" now that they are answered: OrgName's rules
plus dots and underscores, a reserved list of import/new/search, and public
by default.

Also records that Repository gained an optional description, which was not
asked for and not proposed -- flagged in the doc rather than left to be
discovered in the type.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JamesPatrickGill authored 24 days agoparentef1e482Browse filesc6d74a8b81f482c5ad202598d336c22c28b1e5b4

1 file changed+12 −14

plans/current.md+12 −14View file
@@ -16,7 +16,7 @@ problem twice as interesting, so not in the first pass.
1616
1717 ### Steps
1818
19- [ ] Domain: `RepoId`, `RepoName`, `Visibility` (Public/Private), `Repository`
19+- [x] Domain: `RepoId`, `RepoName`, `Visibility` (Public/Private), `Repository`
2020 - [ ] Domain: `RepoRepository` port — `find_by_id`, `find_by_org_and_name`,
2121 `list_by_org`, `save`
2222 - [ ] Infrastructure: in-memory + SQLite implementations, migration
@@ -36,19 +36,17 @@ The owner creates a repo through the UI, a bare repo appears at
3636 invisible to a signed-out visitor. `git clone` does **not** work yet — that is
3737 milestone 4.
3838
39### Decide during
40
41- **Repo name rules.** `OrgName` allows `[a-z0-9-]` and lowercases. Repo names
42 conventionally allow dots and underscores (`.github`, `my_repo`, `foo.js`) and are
43 often case-preserving. Following `OrgName` exactly is simplest and rejects names
44 people will reasonably want; allowing more means deciding about case-insensitive
45 uniqueness and about names that are awkward on disk.
46- **`new` collides.** `/{handle}/repos/new` is a static route and static beats
47 parameterised, so a repo actually named `new` would be unreachable at its own URL.
48 Same problem as handles, same fix: a small reserved list on `RepoName`. Reserve
49 before the first repo exists.
50- **Visibility default.** Public matches a portfolio-first product; private matches
51 every forge people are used to.
39+### Settled
40+
41+- **Repo name rules:** `OrgName`'s, plus `.` and `_` for names like `.github` and
42+ `foo.js`. Lowercased, max 100. Also rejects a name of nothing but dots and any name
43+ ending `.git` — the first is traversal, the second would live at `foo.git.git`.
44+- **Reserved repo names:** `import`, `new`, `search`. Only names directly under
45+ `/{handle}/repos/` can collide.
46+- **Visibility defaults to public**, matching a portfolio-first product.
47+- **Repositories carry an optional description**, capped at 300 characters — a sentence
48+ for the profile listing, not a README. *Added without being asked for; remove if it
49+ is not wanted.*
5250
5351 ### Watch for
5452