chore: tooling, docs and a guard for the name (fork, Phase 6)
- rootProject.name is Giza. Res is pinned, so no import moves. - Regtest: GIZA_REGTEST, GIZA_SPLICE_DELAYS and the gizaRegtest task input; node aliases giza-lsp and giza-payer. - README describes Giza and says what it shares with Bennu: one network, one derivation, and a recovery phrase that must not run in both apps at once. The clone URL is the planned giza-kmp repository, which does not exist yet. - docs/README.md is titled Giza docs and says how to read the documents written while the app was Bennu. - CLAUDE.md gains the rule: name the app Giza, never name Bennu outside a comment, and never rename a mantra/ or bennu/ derivation tag. - docs/scripts/brand-audit.sh --check, run by check (brandAudit) and by the CI budgets job, fails on Bennu anywhere in composeApp, iosApp, testing or the gradle scripts except in a comment or a "bennu/ tag. It catches the strings a merge from Bennu brings in, which giza-rename.sh cannot word. - The plan gains the twelve bennu/ tags, missed when it was written. jvmTest: 1643 run, 0 failed, 2 skipped. compileDebugKotlinAndroid, m3Audit and brandAudit pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4f3f0da3ca
commit
5b92b83869
16 files changed
+164
-24
No files matched your search
Executable
+65
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Where the name Bennu may still appear in Giza: docs/giza-rebrand.md, Phase 6.
|
||||
#
|
||||
# docs/scripts/brand-audit.sh lists the lines that break the rule
|
||||
# docs/scripts/brand-audit.sh --check and exits 1 if there are any
|
||||
#
|
||||
# The rule, in the parts that build or ship (composeApp, iosApp, testing and the gradle
|
||||
# scripts): Bennu may be named in a comment, and in a `bennu/` derivation tag,
|
||||
# and nowhere else. The tags are hash inputs Giza shares with Bennu, so they stay spelled
|
||||
# as they are (giza-rebrand.md, "What does not carry the name"). A comment can explain the
|
||||
# fork. Anything else -- a string a person reads, a client tag, an identifier, a package --
|
||||
# is a leftover.
|
||||
#
|
||||
# Prose (README.md, CLAUDE.md, docs/ and the Markdown under testing/) is not checked: it
|
||||
# explains the fork, and docs/ records decisions taken while the app was Bennu.
|
||||
#
|
||||
# Why it exists: a merge from Bennu (Phase 9) brings Bennu's new strings with it, and
|
||||
# docs/scripts/giza-rename.sh renames code, not words. This is what fails the build when
|
||||
# one of them would otherwise ship.
|
||||
#
|
||||
# Needs only bash and git, like m3-audit.sh, so the CI budgets job can run it.
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/../.." || exit 1
|
||||
|
||||
CHECK=0
|
||||
[[ "${1:-}" == "--check" ]] && CHECK=1
|
||||
|
||||
violations=$(
|
||||
git grep -niI 'bennu' -- \
|
||||
composeApp iosApp testing settings.gradle.kts build.gradle.kts \
|
||||
| awk '
|
||||
{
|
||||
# path:line:text -- the text may itself contain colons.
|
||||
path = $0; sub(/:.*/, "", path)
|
||||
text = $0; sub(/^[^:]*:[^:]*:/, "", text)
|
||||
code = text; sub(/^[ \t]+/, "", code)
|
||||
}
|
||||
# A derivation tag: the one place the name is protocol.
|
||||
text ~ /"bennu\// { next }
|
||||
# Comments in Kotlin and Gradle scripts: //, /* and KDoc continuation lines.
|
||||
path ~ /\.(kt|kts)$/ && (code ~ /^\/\// || code ~ /^\/\*/ || code ~ /^\*/) { next }
|
||||
# Comments in YAML, shell and HOCON (the regtest stack).
|
||||
path ~ /\.(yml|yaml|sh|conf)$/ && code ~ /^#/ { next }
|
||||
# Markdown under testing/ -- the regtest README -- is prose, like docs/.
|
||||
path ~ /\.md$/ { next }
|
||||
{ print }
|
||||
'
|
||||
)
|
||||
|
||||
count=0
|
||||
[[ -n "$violations" ]] && count=$(printf '%s\n' "$violations" | wc -l)
|
||||
|
||||
echo "Bennu outside comments and derivation tags: $count"
|
||||
if (( count > 0 )); then
|
||||
printf '%s\n' "$violations" | sed 's/^/ /'
|
||||
fi
|
||||
|
||||
if (( CHECK && count > 0 )); then
|
||||
echo "Name it Giza, or, if it is protocol shared with Bennu, say so in a comment." >&2
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
Reference in new issue
Block a user