docs: a plan to fork Bennu as Giza under mobi.giza

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-11-18 10:28:11 +02:00
1 parent 4e106fb56d
commit 2a7fc7a08a
2 files changed
+435

No files matched your search

+1
View File
@@ -42,6 +42,7 @@ silent, or a decision that looked arbitrary and was not.
| [lightning/README.md](./lightning/README.md) | the remediation plans for the review of the group Lightning wallet — seven findings, one phased plan each, and the order to build them in |
| [../testing/regtest/README.md](../testing/regtest/README.md) | running the group Lightning wallet end to end on a regtest network of bitcoind, electrs and two eclair nodes — the prerequisites and ports, where the run's output and eclair's log end up, and what each failure means. Not part of `check` or CI |
| [marmot-v2.md](./marmot-v2.md) | bringing the group layer onto the Marmot current profile after the quartz 1.15.2 bump — the nine rules that reach this app, why the room's id and the routing id have to become two values, nine phases from reading both profiles to publishing before applying, and the one fork the library cannot yet settle |
| [giza-rebrand.md](./giza-rebrand.md) | forking Bennu as Giza under `mobi.giza` — what carries the name, what must not be renamed and why, why the desktop data directory changes first, and how the fork keeps merging from Bennu |
Start with the ceremony if you are new to this area; the Marmot notes all assume it.
Read the skipped-keys note before debugging any "the other device never got it"
+434
View File
@@ -0,0 +1,434 @@
# Forking Bennu as Giza
Giza is a fork of Bennu under a new name and a new reverse-DNS root, `mobi.giza`. The Kotlin
packages move from `com.machankura.bennu.{compose,android,desktop}` to
`mobi.giza.{compose,android,desktop}`. The Android application id becomes `mobi.giza.android`
and the iOS bundle id becomes `mobi.giza.ios`. Everything a person can read says Giza.
This is the fourth rebrand the code has been through: Mantra to Curated, Curated to Curare, and
Curare to Bennu in `b75d4b42`. It is the first *fork*, though. After it, two apps exist. They
can be installed on one device, they can share one seed, and they meet on the same relays in the
same groups. Most of what makes this plan more than a find-and-replace comes from that.
**Not started.** Written against `4e106fb5` on `bennu`, with the `lightning-kmp-app` submodule
unchanged. Read these first:
- `b75d4b42`, *Rebrand Curare to Bennu under com.machankura.bennu*. It is the precedent: 975
files, a package move, and a list of names it left alone on purpose. Every name on that list
stays alone here too, for the same reasons.
- [lightning/restored-device-marks.md](./lightning/restored-device-marks.md). Moving from Bennu
to Giza is a seed restore on a new device, and that document describes what such a restore
costs.
- [material-design-conformance.md](./material-design-conformance.md). The audit it enforces
reads a hard-coded source path. That path moves in Phase 3.
## What carries the name today
Counted at `4e106fb5`, outside the submodule:
| where | what | count |
|---|---|---|
| Kotlin packages | `com.machankura.bennu.compose`, plus `.android` (2 files) and `.desktop` (1 file) | 884 files across six source sets: commonMain 631, jvmTest 144, commonTest 77, androidMain 11, jvmMain 11, iosMain 10 |
| Compose resources | `bennu.composeapp.generated.resources`, derived from `rootProject.name = "Bennu"` | 1,058 imports, plus 2 in `docs/scripts/m3-extract-*.py` |
| Class names | `BennuDatabase` (578 refs), `BennuTheme` (138), `BennuGlobal`/`bennuGlobal`, `BennuApplication`, `BennuApp`, `BennuConverters`, `BennuNavHost`, `BennuNavigationSuite`, `BennuDatabaseConstructor`, `BennuShapes`, `Readiness.NotYetOnBennu`, `defaultBennuDir`, `BennuDatabaseJvmTest` | 13 names |
| Room schemas | `composeApp/schemas/com.machankura.bennu.compose.database.BennuDatabase/` | 35 JSON files. The directory name is the database class's fully qualified name |
| Android | `namespace` and `applicationId` `com.machankura.bennu.android` (`.debug` suffix on debug), `.BennuApplication` and `com.machankura.bennu.android.MainActivity` in the manifest, `app_name` in `res/values/strings.xml` | — |
| iOS | `PRODUCT_NAME=Bennu`, `PRODUCT_BUNDLE_IDENTIFIER=com.machankura.bennu.ios$(TEAM_ID)` in `Config.xcconfig`, `Bennu.app` 3 times in `project.pbxproj` | — |
| Desktop | `mainClass = "com.machankura.bennu.desktop.MainKt"`, `packageName = "com.machankura.bennu.desktop"`, window title `"Bennu"` and `"Unlock Bennu"` as literals in `Main.kt` | — |
| Strings | `app_name`, `bennu`, and Bennu inside 10 string values. Two keys contain the name: `bennu_will_delete_the_nsec_for_s_from_this` and `s_hasn_t_set_up_messaging_on_bennu_yet` | — |
| On the wire | `UserAgent.APP_NAME` and `CLIENT_NAME` = `"Bennu"` (the `client` tag on the relay list and notary events), `DatabaseMarmotRepository.CLIENT_NAME` = `"bennu"` (the `client` tag on every kind:30443 key package) | 3 constants |
| Build and tooling | `rootProject.name`, `BENNU_REGTEST` and the `bennuRegtest` task input, the `m3Audit` `uiSources` path, `UI=` in 6 of the `docs/scripts` tools | — |
| Regtest | compose project `bennu-regtest`, node aliases `bennu-lsp` and `bennu-payer` | — |
| Prose | `README.md`, `CLAUDE.md`, 19 documents under `docs/`, 206 source paths linked from `docs/*.md`, and comments that count the rebrands ("survived three rebrands") | — |
### What does not carry the name, and stays
These are the names `b75d4b42` left alone. The reasons it gave still hold, and the fork adds
one more: Giza has to stay interoperable with Bennu.
| name | why it stays |
|---|---|
| `mantra/chilldkg/host-key/v1`, `mantra/shared-key/tweak/v1` | They are inputs to a hash. Renaming them derives a different DKG host key and different tweaks from the same seed. A Bennu seed restored in Giza would then lose every group key it holds. |
| `MARMOT_ADMIN_GROUP_PATH` (`9420/0/0`) | Same reason. It is part of the derivation. |
| nostr kinds, tag names, `d`-tag schemes | They are the protocol. A Giza member and a Bennu member have to read each other's events. |
| `wss://ephemeral.mantra.press` | It is a running relay, not a brand string. It is replaced when a Giza relay exists (see Phase 6). |
| `aux.db`, Phoenix's `*.preferences_pb` names | They are internal to each app's sandbox and nobody reads them. Renaming them would only add to every merge from Bennu. |
| Room schema versions 1–35 and their auto-migrations | Giza's history starts as Bennu's. Squashing the schema history would cut the fork off from Bennu's future migrations. |
| string keys such as `torch_will_be_broadcast_…` | Keys are not shown to anyone. Only the values change. Keys that *contain* `bennu` are renamed (Phase 4) so that a search for the old name comes back empty. |
| `lightning-kmp-app`, including its iOS keychain `serviceName = "Machankura"` and its `com.machankura.compose…nfc` package | The submodule is shared with Bennu and lives in another repository. The keychain service name is scoped by the app's access group, which is the bundle id, so Giza and Bennu do not share keychain items even though the service name is the same. |
## The constraints the plan follows
### 1. Two apps, one device, one seed
A fork can be installed beside the app it came from, and this one will be. Anything both apps
locate by a shared name becomes shared state. Two builds with different schemas would then write
to one database, and two Lightning nodes with the same node id would run on one set of channels.
On Android and iOS the new application id and bundle id give Giza its own sandbox, so nothing is
shared there.
**On desktop, something is shared.** `APP_DIR_NAME = "curated"` names the directory that holds
the Room database, the Marmot state, the Phoenix wallet and the `JvmKeyStore`. A Giza desktop
build that keeps the name opens Bennu's install. The comment on `APP_DIR_NAME` says renaming it
"is a migration … and not part of a rebrand". That is true for a rebrand. For a fork it is the
other way round: Giza has no install of its own to migrate, and sharing Bennu's directory is the
failure. Phase 2 changes it before anything else.
### 2. A seed is an identity, and an identity runs in one place
Moving from Bennu to Giza means restoring the recovery phrase in Giza. Because the derivation
tags are unchanged, the restored seed gives the same npub, the same wallets and the same DKG host
key. That is the point of keeping them. A restore is also a new device, with all that a new
device costs: Marmot groups are joined again with new leaves, and a co-signer's marks start
empty (restored-device-marks.md).
Running one seed in **both** apps at once is two devices with one identity. For the personal
Lightning wallet this can lose money: two Phoenix nodes with the same node id on the same
channels will each sign their own state, and an old state broadcast is a revoked one. The plan
cannot prevent this. It can say it plainly: in the restore flow's copy (Phase 4) and in the
release notes (Phase 7).
### 3. Giza and Bennu share a network
A group can hold members on both apps. Everything they exchange stays as it is. Only the
`client` tag changes, and nothing reads that tag for logic: it is display only, in both places
it is written. The string *"%1$s hasn't set up messaging on Bennu yet"* checks for a Marmot key
package, which a Bennu user publishes too. *"…on Giza yet"* is therefore slightly wrong about
Bennu users. Phase 4 words it so that it is true for both.
### 4. The rename should be a script, not an edit
Bennu is assumed to carry on (D1), and Giza will want its fixes. Every Bennu commit after the
fork touches files that, in Giza, sit under another path, import another `Res` package and name
other classes. If the mechanical part of the rebrand is a script that can be re-run, a merge from
Bennu becomes *merge, re-run, resolve what is left*. If it is a hand edit, every merge is a
hand-done second rebrand of whatever Bennu changed. Phase 3 writes the script first and makes the
commit from its output.
### 5. The audit must not pass by accident
`m3-audit.sh` reads `UI=composeApp/src/commonMain/kotlin/com/machankura/bennu/compose/ui`. If the
path moves and the script does not, every budget counts zero and passes. Only the two floors
(adaptive APIs ≥ 12, navigation components ≥ 2) would fail. Each phase that moves files records
the audit's numbers before and after, and they must be equal.
## Decisions
| | decision | the plan assumes | if not |
|---|---|---|---|
| D1 | Does Bennu carry on beside Giza, or does Giza replace it? | **Bennu carries on**, and Giza merges from it (Phase 9) | If Giza replaces Bennu, Phase 9 goes. Published Bennu users still cannot be moved automatically, because neither store lets an app change its application id. They reinstall and restore their seed, and constraint 2 applies to them once. |
| D2 | Do the two apps stay on one network? | **Yes**: the protocol strings in the second table stay | A protocol fork is a separate project. It changes key derivation and would need its own plan. |
| D3 | Desktop package | **`mobi.giza.desktop`**, by analogy with the other three | — |
| D4 | iOS bundle id | **exactly `mobi.giza.ios`**. The `$(TEAM_ID)` suffix that the KMP wizard appends is dropped, so Bennu's real id today is `com.machankura.bennu.iosZK3TQ662GB` | Keep the suffix: `mobi.giza.ios$(TEAM_ID)`. It works, but it is not the id you asked for. |
| D5 | Apple team | **the same team, `ZK3TQ662GB`** | If Giza has its own team: a new `TEAM_ID`, a new App ID registration and new provisioning. Phase 7 grows by those steps. |
| D6 | `Res` package | **pinned**: `compose.resources { packageOfResClass = "mobi.giza.compose.resources" }` | If it is left derived from `rootProject.name`, it becomes `giza.composeapp.generated.resources`. Either way the 1,058 imports change once. Pinning means a later rename of the root project does not change them again. |
| D7 | Version numbers | **restart**: `versionCode = 1`, `versionName = "0.1.0"`, `MARKETING_VERSION=0.1.0`. A new application id has no version history to stay above | Continue from Bennu's `9` / `0.1.5`. That costs nothing, and it says nothing either. |
| D8 | Who holds the copyright | **unchanged**: "Copyright (C) 2026 Machankura" | A new holder adds their own line to the new work. The existing notice stays, as GPL-3.0-or-later requires, and Giza stays under GPL-3.0-or-later as a derivative. |
## Phase 0 — accounts, names and a baseline
No code changes. This phase collects what the later phases need, so none of them has to stop and
wait.
1. **Domain.** `mobi.giza` implies control of `giza.mobi`. Confirm it. It is needed later for
the store listings' privacy policy URL, for Android App Links and Apple associated domains if
they are ever added, and for a relay (Phase 6).
2. **Repositories.** Choose the names: `machankura/giza-kmp` on the Gitea instance
(`code.sigidli.com`) as `origin`, with a GitHub mirror if Bennu's arrangement is kept. Choose
the default branch: `giza`, as Bennu's is `bennu`.
3. **Stores.** Reserve `mobi.giza.android` in the Play Console and register `mobi.giza.ios` as an
App ID under the team chosen in D5. Create the App Store Connect record. Neither store releases
anything yet; reserving the ids takes them before anyone else can.
4. **Signing.** Generate a new Android upload key. Giza must not be signed with Bennu's key: on
Android a shared key plus a `sharedUserId` is the way two apps share data, and nothing here
should make that possible. Keep the key outside the repository, as Bennu's is.
5. **Brand brief for Phase 5.** The name, an icon (Android adaptive foreground, background and
monochrome layers; an iOS 1024 px master; desktop `.icns`, `.ico` and `.png`), and a seed
colour if the palette changes.
6. **Baseline.** On `4e106fb5`, record:
- `./gradlew :composeApp:m3Audit`, every line of the report;
- `./gradlew :composeApp:jvmTest`, the count of tests run, failed and skipped;
- `git grep -ic bennu`, saved as the inventory that Phase 6's guard reduces to an allowlist.
## Phase 1 — the fork
1. Create the Giza repository from Bennu's full history. The documents cite commits by hash
(`84984ca8`, `b75d4b42`), and blame on the move in Phase 3 only works with the history
present. A squashed import would break both.
2. Set the remotes: `origin` → Giza, `bennu` → `code.sigidli.com/machankura/bennu-kmp` for
Phase 9. The current `dedun` and `machankura` remotes do not carry over.
3. Create `giza` from `bennu` at `4e106fb5` and make it the default branch.
4. Leave `.gitmodules` alone. `lightning-kmp-app` stays at `github.com/kngako/lightning-kmp-app`,
on the same commit Bennu pins.
5. Point `.gitea/workflows/material-design-conformance.yml` at `branches: [giza]`. It triggers on
`mantra` today, two rebrands ago, so on Bennu it only runs for pull requests.
6. Put one line under the README's title: *Giza is a fork of
[Bennu](https://code.sigidli.com/machankura/bennu-kmp).* Phase 6 rewrites the rest of the
README.
**Done when** the Giza repository builds `./gradlew :composeApp:compileDebugKotlinAndroid` from a
fresh clone, with submodules, and CI runs on `giza`.
## Phase 2 — Giza stops being able to open Bennu's data
This is the smallest change that removes the biggest hazard (constraint 1). It ships before any
rename, so it can be tested on its own.
1. **Desktop.** `APP_DIR_NAME = "curated"` → `"giza"` in `PlatformContext.jvm.kt`. Rewrite the
comment over it: the name is load-bearing *because* it has to differ between the two apps, and
renaming it again later would be a migration. `JvmKeyStore` lives in that directory, so it
moves with it.
2. **Android.** `applicationId = "mobi.giza.android"`. Leave `namespace` until Phase 3: it is the
package of `R` and `BuildConfig`, and it moves with the sources. For one commit the two values
differ again, as they did when the app was `com.it.curated`, and the comment in
`build.gradle.kts` says what that means. Debug builds become `mobi.giza.android.debug`.
3. **iOS.** `PRODUCT_BUNDLE_IDENTIFIER=mobi.giza.ios` (D4), and `TEAM_ID` per D5.
4. **Regtest.** Change the compose project name to `giza-regtest` so `testing/regtest/regtest.sh up`
for Giza does not replace Bennu's containers. Port clashes remain if both stacks run at once.
The README says so; it does not fix it.
**Tests.**
- A unit test on `defaultBennuDir()`, which is renamed in Phase 3, asserting that the last path
component is `giza` on each OS branch. This name cannot be checked by eye, so it should be
checked by a test.
- By hand: Bennu and Giza installed side by side on one Android device and on one desktop, both
launched, a profile created in each, and neither showing the other's profile.
## Phase 3 — the move: packages, classes and the `Res` package
The mechanical phase. It goes in one script, `docs/scripts/giza-rename.sh`, which can be re-run
and does nothing on a tree that is already renamed. It produces two commits.
**3a — paths only, contents untouched.** `git mv` for:
- `composeApp/src/{androidMain,commonMain,commonTest,iosMain,jvmMain,jvmTest}/kotlin/com/machankura/bennu/`
→ `…/kotlin/mobi/giza/`. The `compose/`, `android/` and `desktop/` subdirectories keep their
names, which gives `mobi.giza.compose`, `mobi.giza.android` and `mobi.giza.desktop`;
- the 13 files whose names contain `Bennu` (`BennuDatabase.kt` → `GizaDatabase.kt`, and so on);
- `composeApp/schemas/com.machankura.bennu.compose.database.BennuDatabase/` →
`composeApp/schemas/mobi.giza.compose.database.GizaDatabase/`. The directory and the class are
renamed together, so the schemas move only once.
This commit does not compile. It is still worth having on its own: every file in it is a 100%
rename, so `git log --follow` and blame go straight through it, and a reviewer can confirm that
it moves files and changes nothing in them.
**3b — contents.** In this order, because a later pattern would also match an earlier one's
input:
1. `com.machankura.bennu.` → `mobi.giza.`, and `com/machankura/bennu/` → `mobi/giza/`, everywhere
outside `lightning-kmp-app/`. This covers `package` lines, imports, fully qualified references
such as `NostrNotaryRepository.kt:103` and the schema-path strings in two migration tests, the
manifest's `MainActivity`, `mainClass`, `namespace = "mobi.giza.android"`, the `m3Audit`
`uiSources` path, `UI=` in the six `docs/scripts` tools, and the source links in `docs/*.md`.
2. `bennu.composeapp.generated.resources` → `mobi.giza.compose.resources`, and add
`compose.resources { packageOfResClass = "mobi.giza.compose.resources" }` to
`composeApp/build.gradle.kts` (D6).
3. The 13 identifiers, each as a whole word: `BennuDatabaseConstructor` before `BennuDatabase`,
`BennuDatabaseJvmTest` before both, `bennuGlobal` and `BennuGlobal` separately,
`NotYetOnBennu` → `NotYetOnGiza`, `defaultBennuDir` → `defaultGizaDir`. The logger tags
`"BennuConverters"` and `"BennuNavHost"` follow their classes.
4. The manifest's `.BennuApplication` → `.GizaApplication`.
5. `namespace` and `applicationId` agree again. Restore the comment that says they are one value.
The script leaves alone: string values (Phase 4), anything under `lightning-kmp-app/`, the
`mantra/` constants, `fr.acinq.*`, and the commit-hash citations in documents.
**Done when:**
- `./gradlew :composeApp:compileDebugKotlinAndroid :composeApp:jvmTest` passes with the
Phase 0 counts (`GizaDatabaseJvmTest` among them, and the two migration tests that load the
schema directory by class name);
- `./gradlew :composeApp:m3Audit` prints the Phase 0 report line for line (constraint 5);
- `git grep -n "com.machankura.bennu\|com/machankura/bennu\|generated.resources"` finds nothing
outside `lightning-kmp-app/` and the commit messages quoted in documents;
- `git diff -M --stat 4e106fb5` shows the source files as renames, not as deletes and adds;
- on a Mac, `./gradlew :composeApp:linkDebugFrameworkIosSimulatorArm64` and an Xcode build of
`iosApp`. The iOS targets are only declared on macOS, so a Linux run of the steps above
compiles none of `iosMain`.
## Phase 4 — what a person reads, and what goes on the wire
1. **Strings.** In `composeResources/values/strings.xml`: `app_name` and the `bennu` key's value
become `Giza`, and the key itself becomes `giza`. Change the eight other values that say
Bennu. Rename the keys `bennu_will_delete_the_nsec_for_s_from_this` → `giza_will_…` and
`s_hasn_t_set_up_messaging_on_bennu_yet`. The wording of the second one covers Bennu users
too (constraint 3): for example, *"%1$s hasn't set up encrypted messaging yet"*. Rewrite the
comment at the top of the file that says "Both now say "Bennu"". Change `app_name` in
`androidMain/res/values/strings.xml`.
2. **Restore copy.** Add a sentence where a recovery phrase is restored. Constraint 2 says what:
a seed restored here should not go on being used in another app or on another device. This is
a new string, in sentence case, in the catalogue.
3. **Desktop.** Move the window title and *"Unlock Bennu"* out of `Main.kt` into the catalogue
as `app_name` and `unlock_s`. They are the last two brand literals in Kotlin, and `jvmMain` is
outside the audit's `ui/` scope, which is why they were missed. Set
`nativeDistributions.packageName = "Giza"` (the installer's product name, which today is the
reverse-DNS string), `linux { packageName = "giza" }`, and a fixed
`windows { upgradeUuid = "…" }`. Generate a new UUID once and commit it, so that one Giza MSI
upgrades another and never upgrades a Bennu MSI.
4. **iOS.** `PRODUCT_NAME=Giza`, and `Bennu.app` → `Giza.app` in `project.pbxproj` (three
places, as in `b75d4b42`).
5. **The wire.** `UserAgent.APP_NAME` and `CLIENT_NAME` → `"Giza"`, and
`DatabaseMarmotRepository.CLIENT_NAME` → `"giza"`. Nothing compares these values (constraint
3). A Bennu client shows "giza" where it shows a client at all.
6. **Tests that read text.** `ProfilePreviewScreenJvmTest:137`, and anything else asserting a
string that changed in step 1. Find them by running the tests, not by searching.
7. **Comments.** The "three rebrands" comments in `ChillDkgRitualManager`, `SharedKeyDerivation`
and `Relays`, and the brand history in `HomeScreen.kt:170`, become four, ending "…Bennu to Giza,
as a fork". These comments exist so the next person does not rename `mantra/`, and they only
keep doing that if they stay accurate.
**Done when** `./gradlew :composeApp:jvmTest` passes, `m3Audit` is unchanged (the new string adds
no title case), and `git grep -i bennu -- composeApp iosApp` finds only the comments from step 7.
## Phase 5 — brand assets
This phase can run beside Phases 3 and 4 once the brief from Phase 0 exists. It touches no file
the other phases touch.
1. **Android.** `res/drawable/ic_launcher_{foreground,background,monochrome}.xml` and the
`mipmap-*` densities. The monochrome layer is required for themed icons on Android 13 and
later.
2. **iOS.** `Assets.xcassets/AppIcon.appiconset`: one 1024 px master, plus `AccentColor`.
3. **Desktop.** No icon is set today. Add `macOS { iconFile }`, `windows { iconFile }` and
`linux { iconFile }` under `nativeDistributions`, and a window icon in `Main.kt`.
4. **Theme.** Rename the `BennuTheme` and `BennuShapes` identifiers in Phase 3. A palette change,
if the brief asks for one, goes here: a new seed in `ui/theme/`, all six schemes regenerated,
and the `extendedColors` families (`bluePill`, `redPill`) given new values in all six. The
`ColorSchemeContrastTest` gate decides whether it passes, not the eye. Changing the palette is
also the one step that touches every screenshot in the documents. If the brief leaves the
palette alone, skip this item.
**Done when** the launcher, home screen, app switcher and installer show Giza's icon on every
platform, and `:composeApp:jvmTest` (contrast) passes.
## Phase 6 — tooling, documents and a guard
1. **Regtest.** `BENNU_REGTEST` → `GIZA_REGTEST`; the `bennuRegtest` task input →
`gizaRegtest`; node aliases `giza-lsp` and `giza-payer`; `testing/regtest/README.md` and
`CLAUDE.md` to match.
2. **README.** A description of Giza, the line from Phase 1, and the licence section with D8's
copyright.
3. **`docs/`.** The documents are a record of decisions, and a decision made in Bennu was made in
Bennu. Phase 3 has already fixed the source paths. Here, change only present-tense statements
that name the product ("Bennu broadcasts…"), and `docs/README.md`'s title, which still says
*curare docs*. Leave historical narrative as written. Add this document to the index.
4. **A relay.** If `wss://relay.giza.mobi` is stood up, add it to `Relays` beside
`ephemeral.mantra.press`. Do not replace it: Bennu users are still on `mantra.press`, and
groups that span both apps need a shared relay. That is a deployment decision and does not
block the rest of this plan.
5. **The guard.** Add `docs/scripts/brand-audit.sh --check`, wired into `check` beside
`m3Audit`: `git grep -il bennu` minus an allowlist (this document, the commit-message
quotations, the README's fork line, the four rebrand-history comments, `docs/` narrative).
Phase 9 needs it: a merge from Bennu that brings in a new `Bennu` string should fail the build
rather than ship.
## Phase 7 — release identity
1. **Android signing.** Add a `release` `signingConfig` that reads the Phase 0 upload key from
`local.properties` or the environment, never from the repository. Enrol in Play App Signing.
Set `versionCode` and `versionName` per D7.
2. **iOS.** Provisioning for `mobi.giza.ios`, an archive from Xcode, and TestFlight.
3. **Desktop.** `packageVersion` per D7. Build `.dmg`, `.msi` and `.deb` on their own hosts.
Check that the Giza MSI installs beside a Bennu MSI rather than over it.
4. **Store listings.** Name, description, screenshots (taken after Phase 5), and a privacy policy
at `giza.mobi`. Both stores ask what is collected. The answer has not changed from Bennu.
5. **Release notes.** These must include the constraint 2 warning: *Moving from Bennu? Restore
your recovery phrase in Giza, then stop using it in Bennu. Running one wallet in two apps at
once can lose funds.*
## Phase 8 — the two apps together
Earlier phases each test themselves. This phase tests what only exists because there are two
apps.
| check | how | passes when |
|---|---|---|
| side by side, mobile | Bennu and Giza on one Android phone and one iPhone, each with its own profile | each app shows only its own profile, chats and wallet |
| side by side, desktop | both running on one Linux, macOS and Windows machine | two data directories (`curated`, `giza`), two key stores, neither app locked by the other |
| a seed carried across | restore a Bennu test seed in Giza | same npub, same first on-chain receive address, and the same DKG host key. A known-answer test in `jvmTest` pins all three to fixed vectors, so a future rename of a `mantra/` tag fails a test and not a user. There is no such test today |
| a mixed group | a Bennu member and a Giza member create a group, chat, and run a key ceremony with a third member on either app | the ceremony completes, and FROST signs with signers on both apps |
| a mixed group wallet | the regtest run (`GIZA_REGTEST=1`) with the operator on one app's build and a co-signer on the other's | every co-signer accepts. This is the strongest check that nothing on the wire changed |
| the `client` tag | inspect the published kind:30443 and relay list | `["client","giza"]` and `["client","Giza"]` |
## Phase 9 — following Bennu
This phase is ongoing, and it is only needed if D1 holds.
A merge from Bennu compares the merge base with each side as a whole. Phase 3's renames are
recognised as long as each file stays similar enough to its original. Most files change only
their `package` line and imports. A short file that is mostly imports can fall under git's 50%
default, so merge with a lower threshold. The procedure:
```bash
git fetch bennu
```
```bash
git merge -X find-renames=30% --no-commit bennu/bennu
```
```bash
docs/scripts/giza-rename.sh
```
Then resolve what remains, run `./gradlew check` (which now includes the brand guard), and
commit. The script handles files Bennu added after the fork: they arrive under
`com/machankura/bennu/` and it moves them. What it cannot handle is a Bennu commit that adds a
user-facing *Bennu* string. The guard catches that, and someone words it for Giza.
How this tends to go wrong: Bennu adds a schema version, and its JSON lands in Bennu's schema
directory. The script moves it. A reviewer should still check that the Room version in
`GizaDatabase` and the newest file in `mobi.giza.compose.database.GizaDatabase/` agree after
every merge that changed either.
Fixes that apply to both apps are cheaper written in Bennu and merged here than the other way
round. A fix written in Giza and merged to Bennu reverses the whole rename.
## Order, and what can run in parallel
| phase | needs | can run beside |
|---|---|---|
| 0 | — | — |
| 1 | 0 | — |
| 2 | 1 | 5, and 7's store work |
| 3 | 2 | 5 (unless the palette changes), 7's store work |
| 4 | 3 | 5, 7's store work |
| 5 | 0's brief | 2, 3, 4 |
| 6 | 4 | 5 |
| 7 | 0 for the store work; 5 and 6 for the builds | — |
| 8 | 7's builds | — |
| 9 | 6 (it needs the guard), then ongoing | everything after |
- Phases 2, 3 and 4 are one change each and land in order. Phase 3 is large and conflicts with
every open branch. Land it when no other branch is open on Giza, so that nothing is waiting to
merge across it.
- Phase 5 can run beside Phases 3 and 4. Its only overlap is `ui/theme/`, and only if the palette
changes. In that case land it after Phase 3.
- Phase 7's store work (listings, signing, enrolment) can start right after Phase 0. Only the
builds wait for Phase 5.
## What this does not do
- It does not move existing Bennu users. No store allows that. Users reinstall and restore their
seed (D1).
- It does not change the protocol. A Giza-only network would mean new derivation tags, and every
key derived from them would change.
- It does not rename anything in `lightning-kmp-app`. Its `Machankura` keychain service and
`com.machankura.compose` NFC package belong to that repository, and Bennu shares it.
- It does not add a relay. Phase 6 says where one goes when it exists.
## Risks and open questions
- **One seed in two apps (constraint 2).** This is the one way a user can lose money because of
the fork, and the only defence is copy. Ask whether Giza should check for this as well: for
example, by noticing on restore that the npub's key package carries `["client","bennu"]` with a
recent `created_at`, and warning before the wallet starts. That is not in this plan, and it is
worth deciding before Phase 7.
- **Phase 3 and open branches.** Every branch open against Bennu at the time of the fork needs
the Phase 9 procedure to come across.
- **The palette.** If the brief changes it, Phase 5 becomes a contrast exercise across six
schemes rather than an asset drop, and its estimate should be revised.
- **D4's suffix.** If anything outside this repository already refers to
`com.machankura.bennu.iosZK3TQ662GB` (a push certificate, an associated-domains file), that is
Bennu's and stays Bennu's. Giza starts clean at `mobi.giza.ios`.
- **iOS was not built on Linux.** Every iOS claim in this plan was read from `Config.xcconfig`,
`project.pbxproj` and `iosMain`, not checked by a build. Phase 3's last check is where that
changes.