fix(rebrand): preserve brand casing across forks - #952
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 23, 2026
TortoiseWolfe
added a commit
that referenced
this pull request
Aug 27, 2026
… measure (#967) Two defects in what the rebrand tells you about itself. Both are in the same 1000-line harness, so they land together rather than fighting over it. #956 — the summary over-reported. FILES_MODIFIED was a bare ++ accumulated by two independent sweeps over the same file set, so a file carrying both the brand and the owner token counted twice. Measured: 1002 reported against 926 paths git could see. That number does not stay in the terminal — docs/POSITIONING.md quotes it as a measurement — and it is the first thing a forker reads about what just happened to their repository. The union data was always there: consume_case_report() parses a per-path UPDATED/RENAMED record for every file and threw it away in favour of a COUNT. It now records paths and counts the unique ones. Also drops the literal `+ 17` for icons, which was a guess reported as a measurement; the icons already have their own summary line. One subtlety that made the first attempt useless: the two sweeps spell the same path differently — rebrand-case.mjs JSON-quotes its payload for the log, so it says "docs/FORKING.md" where the sed sweep says docs/FORKING.md. Unnormalised they never dedupe and the union is no better than the double count. With that fixed the summary now reports 928 against exactly 928 git-visible paths. #958 — the #952 regression guard could not fail on the input that caused the bug. It asserts the case projections with CASE_TARGET_DISPLAY set to "CaseProbe" or "GeoLarp", both SINGLE-TOKEN, where targetSlug and asciiLower(targetComponent) are the same string. The branch it protects therefore produces identical output either way. Mutation-tested: delete the `identifierAdjacent ?` branch from rebrand-case.mjs and that suite reports zero failures. A multi-token case is added rather than changing the shared variable, which feeds six test functions. It asserts identifier VALIDITY rather than equality against a computed string, because equality still passes when both sides are wrong the same way — and this is a file whose whole job is to be syntactically valid. With the branch deleted the new case reports two failures while the old one still reports none. A third assertion pins that a STANDALONE slug stays hyphenated, so the fix cannot be "never hyphenate", which would corrupt prose and hostnames. Both guards were written to fail first and checked against origin/main: #956's differential grows by 2 there and by 1 here; #958's mutation is red here and invisible to the existing suite. Closes #956 Closes #958 Co-authored-by: TurtleWolfe <TurtleWolfe@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #933
Summary
Verification
pnpm run test:scripts— 602/602bash tests/rebrand/test-rebrand.sh— 63/63geo LARP— rebrand succeeded; 602/602 script tests, ESLint, TypeScript, and fork smoke passed