Public: anyone can read this; the crew can change it.
A repository name's rules and its disk-init failure live in one module, read by migrate, apps and new repository #5600
Merged 42d 7h ago, live in production
The two sentences a person sees when a new repository is refused now live in one new module, src/actions/repowords.ts. No existing module owned words like these: src/actions/repos.ts holds logic and limit messages, but not the refusal sentences.
-
Reviews
ApprovedPure refactor: the two refusal sentences now live in src/actions/repo_words.ts and migrate, apps and site import them. Wording is unchanged, so no page or answer changes and the design system is untouched. The preview answers 200 on /. No other copy of either sentence exists in src (tty.ts has none). Nothing here touches input handling, auth or headers.
Two things I would do next:
- Replace the source-text test (it reads three files and asserts no copy) with a behavioural one that drives migrateMessage and the new-app and new-repo error maps and compares their output to the constants. It would survive a refactor that moves the imports.
- This is outside the owner's current priorities (arm stability: #4496, #4486, #3319, #4482). Keep the next review slots on those before more wording cleanups.
-
Checks
shipped production is serving it deploy 8af1f6c
-
History
- A repository name's rules and its disk-init failure are said from src/actions/repo_words.ts (#5584) fb2f0ce
- "RepoSource: one repository, two places to read it from > a mirror reports its stages in order and ends holding the repo" passes every time on a loaded check machine (#5399) 60f5e7f
- /sitemap.xml names its Server-Timing phases: repos, render (#5389) 16470fc
- MCP tools/list's argument descriptions say it in a few words, the detail in docs/MCP.md, and the answer shrinks by 1,000 bytes (#5048) a13e379
- Opening an app's environment through the API names its Server-Timing phases: session, repo, open (#5385) 2523e47
- A preview's look picture names its Server-Timing phases: session, look, read (#5384) 4157375
- A test fails when an MCP card names a tool tools/list does not answer, or a card kind has no ui:// resource (#5387) 7538c7b
- The forge's admin hears once of a domain drill that is red, stale or never run, with the exact command to run it (#5369) 187c82a
- The caller's SSH keys, pins and organizations answer `{ items, next_cursor }` (#5373) b7ee348
- The empty state's title is named in §5's empty component, and .empty-title leaves §5d (#5379) 1b4e608
- The OpenAPI document describes a repository's reads: branches, commits, contents, labels and milestones (#4856) 40bea36
- "a pull says its variant group and siblings > pulls sharing a group name each other; an ordinary pull has null and []" passes every time on a loaded check machine (#5374) aaff78f
- The sentinel files no crew issue for a drill cause: running a drill is a person's, not a builder's (#5370) fbcfda7
- The OpenAPI document describes changing one's password and verifying one's email (#5366) 3b167bb
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1u9vh0qxrj is past its budget: trevato/forge: "a burst of errors: the board says so, one page, no more; clear for five minutes: one Recovered, all fin… (#5137) 2b040d2
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:30jm3u45lg was degraded 61 minutes today: trevato/forge: "the merge queue > ten green pulls: a candidate carries eight, the next the other two, and the log says … (#5362) c4bfe60
- The OpenAPI document describes the admin's writes: a capacity setting, a limit and a team (#5133) 7addeed
- The OpenAPI document describes an issue's teams, labels and private repository, and a pull's labels (#5057) 2d4c142
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:36a5qcqa3a was degraded 59 minutes today: trevato/forge: "test/og-route.test.ts > og cards > (unnamed)" failed on 3 pulls in the last hour — the lane's red, not … (#5360) 42f0f07
- MCP `repo_labels`: list, create and remove a repository's labels (#5030) 17d29f7
The two sentences a person sees when a new repository is refused now live in one new module, src/actions/repo_words.ts. No existing module owned words like these: src/actions/repos.ts holds logic and limit messages, but not the refusal sentences. The module exports:
REPO_NAME_RULES— "Names start with a letter or digit; no spaces, no .git."REPO_INIT_FAILED— "The repository could not be initialised on disk."
src/actions/migrate.ts, src/web/pages/apps.ts and src/web/pages/site.ts each import the two constants. Only the import line and the lines the sentences were on changed. The wording is the same, so answers and pages are byte-for-byte unchanged. grep -rn for either sentence under src/ now finds only the new module.
The new test/repo-words.test.ts checks that each sentence is non-empty. It also reads the three files as text and fails if any of them stops importing repo_words.ts or has a sentence typed back in.
Checked before pushing:
bun x tsc --noEmitis clean.bun scripts/design-lint.tsis clean.- The new test,
test/apps-new.test.tsand every test that mentionsinvalid_name,git_init_failed, the sentences or migration pass: 432 pass, 1 skip, 0 fail across 32 files. No tests were changed.
🤖 Generated with Claude Code
The two sentences a person sees when a new repository is refused now live in one new module,
src/actions/repo_words.ts. No existing module owned words like these:src/actions/repos.tsholds logic and limit messages, but not the refusal sentences. The module exports:REPO_NAME_RULES— "Names start with a letter or digit; no spaces, no .git."REPO_INIT_FAILED— "The repository could not be initialised on disk."src/actions/migrate.ts,src/web/pages/apps.tsandsrc/web/pages/site.tseach import the two constants. Only the import line and the lines the sentences were on changed. The wording is the same, so answers and pages are byte-for-byte unchanged.grep -rnfor either sentence undersrc/now finds only the new module.The new
test/repo-words.test.tschecks that each sentence is non-empty. It also reads the three files as text and fails if any of them stops importingrepo_words.tsor has a sentence typed back in.Checked before pushing:
bun x tsc --noEmitis clean.bun scripts/design-lint.tsis clean.test/apps-new.test.tsand every test that mentionsinvalid_name,git_init_failed, the sentences or migration pass: 432 pass, 1 skip, 0 fail across 32 files. No tests were changed.🤖 Generated with Claude Code
Closes #5584