Name Stash on what it publishes (NIP-89 client tag), with an opt-out #10
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/client-tag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the "Add client tag" issue. NIP-89's
clienttag, plus the opt-out the spec attaches to it.What lands
["client", "Stash"]on every event the app publishes, applied inNostrRepository.sign— every one of the app's publish sites funnels through there, so it is the only place the tag has to go, and the only place the opt-out has to be honoured.Name-only, not the full tuple. The spec's form is
["client", <name>, "31990:<pubkey>:<d>", "<relay hint>"], and nokind:31990for Stash exists yet — re-checked today against damus, nos.lol, nostr.band, primal and haven with a kind-0 positive control on each. An address pointing at nothing is worse than no address: a reader who follows it learns only that the app lied.docs/NIP89_HANDLER.mdcarries the ready-to-sign handler event and thenakline; adding the last two entries afterwards is additive and changes nothing for readers who only look at the name.The opt-out is a requirement, not a courtesy — "this has privacy implications for users, so clients SHOULD allow users to opt-out of using this tag." Settings → Publishing → Name Stash on what you publish, on by default. Opting out means the tag is absent, not blank: a
["client",""]would still say an app that sets client tags published this.One design call
The signer reads the preference on every sign rather than holding a copy of it. A cached flag has to be re-set from preferences at startup and again on every toggle, and either wiring failing is invisible from the outside — the app would go on naming itself on the events of someone who turned it off. One source of truth, so a relaunch and a toggle reach the signer by the same path.
Verification
393/393 JVM tests (389 on the base + 4 new).
88/88 on device,
expected=88 started=88 passed=88 failed=0— not a truncated run.8 of 8 mutations of the tag rule caught by the JVM suite: opt-out ignored, opt-out inverted, duplicate guard removed, tag prepended, caller's tags dropped, app named wrong, tag key wrong, guard reading the wrong element.
3 of 3 wiring mutations caught on device — the ones no JVM test can fail on:
applyTo(tags, true))applyTo(tags, false))ClientTagPublishE2ETestis what those land on: preference written before the app starts, real private-key login, real save, tags read back off the relay. The rule test and the settings test both pass while that link is missing.Notes for merging
mainafter #6–#9 merged; sits directly onff39aee.versionCode = 21, deliberately not 20:fix/bunker-reloginlanded on 19 and two different debug APKs carrying 19 are already out for testing. Two builds sharing a versionCode is how a sideloaded upgrade silently refuses; 20 stays free for whatever is built next off main.kind:31990, and a relay hint.The 88/88 and 393/393 above were re-run after the rebase onto
main— the earlier numbers were measured on the pre-merge base and do not apply to this tip.a3f2daa4892e7ed9ff35