check-branding.sh could say what disagreed but not fix it, and its
canonical block lived in its own header — so renaming meant hand-editing
the checker, which is exactly the fragile step it exists to catch.
branding.conf now holds the identity once. Both scripts read it and
neither contains a branding literal anywhere, so a rename never has to
rewrite its own tooling.
brand-plugin.sh derives the package name and Rust types from the display
name, validates them against what Cargo actually accepts, rewrites every
tracked file longest-value-first (a short name can be a substring of a
longer one), appends the retired spellings to STALE, and finishes by
running the checker. A run that ends green is a rename that landed. Dry
run unless --apply.
It refuses three things worth refusing:
- Package names Cargo rejects — digit-leading (`206 Prototype` derives to
`206_prototype`), Rust keywords, built-in crate collisions. Verified
against cargo init rather than assumed.
- Moving CLAP_ID or VST3_CLASS_ID without --allow-identity-change. Hosts
key saved projects off those; changing either orphans every existing
session silently. The 16-byte class ID is *proposed*, never derived —
it is a fixed-width frozen identity, so the choice stays human.
- Development history in CLAP_DESCRIPTION. Hosts show it to users who
never knew the codename, so any retired name or the repo codename
appearing there is rejected.
The checker gains the other half of its job: asserting canonical values
are present where they belong, not only that retired ones are gone.
Absence alone would pass a rename to the *wrong* new spelling. New
positive assertions cover Cargo authors, Cargo.lock, the CI bundle
command and NOTICE — every one of which the recent Bari 206 rename had to
touch. Structural checks read their file locations from branding.conf so
a plugin whose params outgrow src/lib.rs can point them elsewhere.
Also fixes NOTICE naming the repo rather than the product, found by the
new assertion, and excludes branding.conf from the stale sweep — it lists
every retired spelling by definition, the same reason check-branding.sh
was already excluded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHt4DykxXaQnyaJfyS8KCn