Skip to content

App name: the six names written once, read by one crate - #1904

Open
vmillet-dev wants to merge 1 commit into
logs-ringfrom
app-name-values
Open

vmillet-dev wants to merge 1 commit into
logs-ringfrom
app-name-values

Conversation

@vmillet-dev

Copy link
Copy Markdown
Owner

Part of #1896: steps 1, 10 and 11. The last pull request of the ticket closes it.

Stacked on #1903 (the lines before a warning): its base is logs-ring so that this diff is this step alone. Merge #1898, #1900, #1901, #1902, #1903 in that order; this pull request then targets dev/1.3.3.

The values. The root Cargo.toml gets [workspace.metadata], beside the version (D27). Today's values, unchanged:

Value Today
display-name DevNotes
author-handle @vmillet-dev
slug devnotes
identifier com.devnotes.app
file-extension devnotes
site https://devnotes.fr

The reader, crates/brand. It is a leaf crate with no dependency; its build.rs is the only reader of the root manifest. It refuses a value that could not name what it names, and the build stops:

  • a slug or extension that is not lowercase ASCII letters, digits and dashes;
  • an identifier that is not reverse-DNS;
  • a site that is not https or ends with /;
  • a handle without @.

It exports brand::NAME, AUTHOR_HANDLE, SLUG, IDENTIFIER, EXTENSION and SITE. In this step, engine::app_info and i18n's {{app}} read it. The engine's [package.metadata.devnotes] and the manifest-reading code of both build scripts go. The engine's build.rs keeps the author and the pinned toolchain, under neutral variable names (ENGINE_*).

Decision D36 « Names », written first as the ticket asks:

  • every name follows the values, except the few Cargo and the files keep literal, which a test will hold (step 6);
  • renaming is the owner's choice, and its cost is accepted, not migrated.

The new section « The application's names » in the wiki's overview has the table of values, the reader, and what a rename costs (step 11), plus what the owner sees to outside the repository (step 12). D16 now names « the identifier of D36 ». CLAUDE.md's rule on layout.rs (« never rename ») follows the decision, and a new ⚠️ says never to type a name. The i18n page's {{app}} paragraph and the overview's app_info.rs row follow too.

Owner's decision recorded: the DEVNOTES_ prefix of the environment variables stays as it is for now (step 5's neutral prefix is dropped).

Next steps, each a pull request stacked on this one:

  • (2) the names read from the values in the code and on the disk, steps 2 to 4;
  • (3) the names Cargo keeps literal held by a test, the internal names, the tests and the comments, steps 5, 6 and 9;
  • (4) the packages and the CI, step 7;
  • (5) the documentation and the site, step 8.

Checks run (Linux)

  • cargo check --workspace, cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo fmt --all --check.
  • cargo test -p i18n -p brand (43 pass), the engine's app_info tests, and the ui's about tests (10 pass).
  • node --test "scripts/*.test.mjs" (77 pass); scripts/version.mjs still reads 1.3.0.

Generated by Claude Code

The root Cargo.toml gets [workspace.metadata], beside the version: the
display name, the author's handle, the slug, the identifier, the export
extension and the site. crates/brand is their one reader: its build.rs
refuses a value that could not name a file, a folder, a key or a URL,
and hands them to brand::NAME, AUTHOR_HANDLE, SLUG, IDENTIFIER,
EXTENSION and SITE. engine::app_info and i18n's {{app}} read it instead
of the engine's [package.metadata.devnotes], which goes.

Decision D36: every name follows these values, save a few Cargo and the
files keep literal; renaming is the owner's choice, its cost accepted
and not migrated. D16 names the identifier; the overview says what a
rename costs; CLAUDE.md's rule on layout.rs follows the decision. The
DEVNOTES_ variables keep their prefix for now, the owner's choice.

Part of #1896 (step 1, 10, 11)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BbVs5tCyTr9AasGra3Zzg3
@vmillet-dev vmillet-dev added the refactor Restructuring without behaviour change label Dec 4, 2026 — with Claude

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructuring without behaviour change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants