oficina / meet Public

Review fixes: old iPhone apps, APNs topics, the Mac move

Human

Prompt

Fable reviewed Calls native/levelup-phase0 @a5c6af7: APPROVE AFTER FIXES. 1. native/ios/README.md: say to DELETE the old iPhone app(s) first (net.amadan.oficina.calls.ios and any works.oficina.meet TestFlight build) — they all claim oficina-calls:// and iOS picks one arbitrarily. 2. APNs topics: fix the stale comments at RemoteKnocks.swift and internal/calls/config.go (both apps are now works.oficina.calls); add a 'for Paul' line: if CALLS_APNS_TOPIC_IOS / CALLS_APNS_TOPIC_MACOS are set on the server they must change to works.oficina.calls when the new builds ship, or apns.go treats rejections as Gone and silently deletes tokens. Update the misleading works.oficina.calls.mac fixture in apns_test.go if trivial. 3. native/README.md: add the Mac move — the installed Calls.app can't be found by Sparkle, so with the quiet updater 0.4.16 fails every check invisibly; give the manual reinstall steps, starting with 'Sign out in the old Calls', and the correct tidy-up for Calls' keychain item (service net.amadan.oficina.calls, account session). Mention the archive becomes works.oficina.calls-<build>.zip and that release-calls-0.4.16.sh hard-codes the old IDs and build/Calls.app.

From this commit's own message. The prompt ledger has no entries for it — which is what a squashed, rebased or amended commit looks like, and what every commit looks like in a repo without a ledger.

Summary

The iOS README says to delete the old net.amadan.oficina.calls.ios and works.oficina.meet builds first, since they all claim oficina-calls://. The APNs comments in RemoteKnocks.swift and config.go say both apps are works.oficina.calls; README.md tells Paul to change CALLS_APNS_TOPIC_IOS/_MACOS to works.oficina.calls when the builds ship, or DeviceTokenNotForTopic deletes tokens silently; the apns test uses neutral per-platform topics. native/README.md gains 'Moving the Mac app to works.oficina.calls (once)': why Sparkle refuses (invisibly, under the quiet updater), the reinstall starting with Sign out, Calls' real keychain item (service net.amadan.oficina.calls, account session), the new archive name and the stale 0.4.16 release script.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 4bb362c9a8e8572eac84a96e2184124132e076d4 parent a5c6af7
6 files changed, +69 −12
  • README.md +7 −1
  • internal/calls/apns/apns_test.go +6 −5
  • internal/calls/config.go +7 −3
  • native/README.md +38 −0
  • native/apple/Sources/CallsKit/RemoteKnocks.swift +5 −3
  • native/ios/README.md +6 −0

CI passed — run details

CI log
=== vet ===
go vet ./...
=== fmt ===
=== test ===
go test ./...
ok  	amadan.net/oficina/calls/callscore	(cached)
ok  	amadan.net/oficina/calls/cmd/calls	13.259s
?   	amadan.net/oficina/calls/cmd/calls-contract	[no test files]
ok  	amadan.net/oficina/calls/cmd/quality-summary	(cached)
ok  	amadan.net/oficina/calls/internal/calls	12.581s
ok  	amadan.net/oficina/calls/internal/calls/apns	0.007s
ok  	amadan.net/oficina/calls/internal/calls/hub	(cached)
?   	amadan.net/oficina/calls/internal/calls/icons	[no test files]
?   	amadan.net/oficina/calls/internal/calls/keymailtest	[no test files]
ok  	amadan.net/oficina/calls/internal/calls/relay	(cached)
ok  	amadan.net/oficina/calls/internal/calls/seal	(cached)
?   	amadan.net/oficina/calls/internal/calls/teamstate	[no test files]
ok  	amadan.net/oficina/calls/internal/callstest	12.203s
ok  	amadan.net/oficina/calls/protocol	(cached)
?   	amadan.net/oficina/calls/scripts/writeestilo	[no test files]
=== migration-check ===
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo migration check
rastrillo migration check: models and migrations agree
=== race ===
CGO_ENABLED=1 go test -race ./internal/...
ok  	amadan.net/oficina/calls/internal/calls	87.370s
ok  	amadan.net/oficina/calls/internal/calls/apns	1.022s
ok  	amadan.net/oficina/calls/internal/calls/hub	(cached)
?   	amadan.net/oficina/calls/internal/calls/icons	[no test files]
?   	amadan.net/oficina/calls/internal/calls/keymailtest	[no test files]
ok  	amadan.net/oficina/calls/internal/calls/relay	(cached)
ok  	amadan.net/oficina/calls/internal/calls/seal	(cached)
?   	amadan.net/oficina/calls/internal/calls/teamstate	[no test files]
ok  	amadan.net/oficina/calls/internal/callstest	47.136s
diff --git a/README.md b/README.md
index 136af6b..97d76f8 100644
--- a/README.md
+++ b/README.md
@@ -143,7 +143,13 @@ Apple push is a sixth group, and all of it or none of it:
`CALLS_APNS_KEY` (the `.p8` as Apple issues it, PEM and multi-line),
`CALLS_APNS_KEY_ID`, `CALLS_APNS_TEAM_ID`, `CALLS_APNS_TOPIC_IOS` and
`CALLS_APNS_TOPIC_MACOS`, with `CALLS_APNS_SANDBOX` for a development
-build's tokens. Unset, the server sends no push and says so nowhere —
+build's tokens. **For Paul:** if `CALLS_APNS_TOPIC_IOS` or
+`CALLS_APNS_TOPIC_MACOS` is set on the server, change both to
+`works.oficina.calls` when the `works.oficina.calls` builds ship (they were
+`net.amadan.oficina.calls.ios` and `net.amadan.oficina.calls`). A token pushed
+under a topic that is not its app's is refused as `DeviceTokenNotForTopic`,
+which `apns` treats as gone and deletes, silently. Unset, the server sends no
+push and says so nowhere —
a knock still reaches every member in the room over their own stream,
which is where this app was before push existed. Partly set, startup
refuses: half a push key is a mistake to catch at boot rather than in a
diff --git a/internal/calls/apns/apns_test.go b/internal/calls/apns/apns_test.go
index 9094156..4db3b1a 100644
--- a/internal/calls/apns/apns_test.go
+++ b/internal/calls/apns/apns_test.go
@@ -40,7 +40,7 @@ func client(t *testing.T, handler http.HandlerFunc) (*Client, *httptest.Server)
t.Cleanup(server.Close)
c, err := New(Config{
KeyID: "ABC123DEFG", TeamID: "TEAM123456", Key: key,
- Topics: map[string]string{"ios": "works.oficina.calls", "macos": "works.oficina.calls.mac"},
+ Topics: map[string]string{"ios": "test.topic.ios", "macos": "test.topic.macos"},
Host: server.URL, HTTP: server.Client(),
})
if err != nil {
@@ -167,10 +167,11 @@ func TestTheRequestCarriesWhatApplesRequires(t *testing.T) {
if path.Load() != "/3/device/devicetoken123" {
t.Fatal("wrong path", path.Load())
}
- // The topic follows the platform: the two apps have different bundle
- // identifiers, and a token sent under the wrong one is refused with
- // DeviceTokenNotForTopic.
- if topic.Load() != "works.oficina.calls.mac" {
+ // The topic follows the platform: the server holds one per platform
+ // (both works.oficina.calls in production since 2026-11-14), and a
+ // token sent under the wrong one is refused with
+ // DeviceTokenNotForTopic. Distinct here so the test sees which was used.
+ if topic.Load() != "test.topic.macos" {
t.Fatal("wrong topic for macos", topic.Load())
}
if pushType.Load() != "alert" || priority.Load() != "10" {
diff --git a/internal/calls/config.go b/internal/calls/config.go
index ae1cacd..c7f8e0e 100644
--- a/internal/calls/config.go
+++ b/internal/calls/config.go
@@ -70,9 +70,13 @@ type Config struct {
APNsKeyID string
// CALLS_APNS_TEAM_ID, the Apple developer team.
APNsTeamID string
- // CALLS_APNS_TOPIC_IOS and CALLS_APNS_TOPIC_MACOS: the two bundle
- // identifiers. Separate because a token is issued per app, and one
- // sent under the other app's topic is refused.
+ // CALLS_APNS_TOPIC_IOS and CALLS_APNS_TOPIC_MACOS: the bundle
+ // identifier of the iPhone app and of the Mac app. Both are
+ // works.oficina.calls since 2026-11-14 (they were
+ // net.amadan.oficina.calls.ios and net.amadan.oficina.calls). Kept
+ // separate because a token is issued per app, and one sent under a
+ // topic that is not its app's is refused as DeviceTokenNotForTopic,
+ // which apns treats as Gone: the token is deleted.
APNsTopicIOS string
APNsTopicMacOS string
// CALLS_APNS_SANDBOX sends to Apple's sandbox host, which is where a
diff --git a/native/README.md b/native/README.md
index f08be21..29b7a23 100644
--- a/native/README.md
+++ b/native/README.md
@@ -710,6 +710,44 @@ Developer ID signing, notarization and App Store packaging remain follow-up work
The iPhone target, device builds and Safari tests are described in
[ios/README.md](ios/README.md).
+## Moving the Mac app to works.oficina.calls (once)
+
+From 2026-11-14 the Mac app is `works.oficina.calls`, installed as
+**Oficina Calls.app** with the display name "Oficina Calls". Every release
+up to 0.4.16 is `net.amadan.oficina.calls`, installed as `Calls.app` with
+the display name "Calls". Sparkle looks for the update inside the archive by
+the installed app's file name, then by its display name, and only then by
+bundle ID. "Oficina Calls.app" with a new ID matches none of them, so Sparkle
+refuses the update: "No suitable install is found in the update". Calls'
+updater is quiet, so 0.4.16 fails this way on every check from the day the
+first `works.oficina.calls` build is in the feed, and nobody sees it. It has to
+be reinstalled by hand, once:
+
+1. Sign out in the old Calls (home screen, **Sign out**), then quit it.
+2. Move `/Applications/Calls.app` to the Bin.
+3. Download the new release's zip, open it, and drag **Oficina Calls.app** to
+ Applications. Open it and sign in again. macOS treats it as a new app, so it
+ asks again for the camera and microphone, and for Screen Recording at the
+ first share.
+4. Optional tidy-up. The old app's data stays under the old ID:
+ - `defaults delete net.amadan.oficina.calls`;
+ - in Keychain Access, the login keychain's generic password with
+ **service `net.amadan.oficina.calls`, account `session`**. This is the
+ shape `KeychainSessionStore` uses (`SessionStore.swift`), and the new app
+ keeps the same shape under `works.oficina.calls`. The
+ `<id>.session` / `<id>.store` names in rastrillo/native's
+ `docs/mac-updates.md` are the shared library's, not Calls';
+ - the old "Calls" rows in System Settings ▸ Privacy & Security (Camera,
+ Microphone, Screen Recording).
+
+**For the next release.** The release archive is now named
+`works.oficina.calls-<build>.zip` (release_mac.py names it after the bundle
+ID). The app to package is `native/build/Oficina Calls.app`. The last release
+script, `/Users/paulcampbell/amadan.net/oficina/release-calls-0.4.16.sh`
+(outside this repository), hard-codes the old IDs (`BUNDLE_ID`,
+`IOS_BUNDLE_ID`, lines 36-37) and `build/Calls.app` (lines 211-257). Don't
+copy it unchanged for the next release.
+
## Quality reports and Report a problem
The apps send a connection-quality report every 30 seconds in a call and one
diff --git a/native/apple/Sources/CallsKit/RemoteKnocks.swift b/native/apple/Sources/CallsKit/RemoteKnocks.swift
index 030e551..2aab4c9 100644
--- a/native/apple/Sources/CallsKit/RemoteKnocks.swift
+++ b/native/apple/Sources/CallsKit/RemoteKnocks.swift
@@ -19,9 +19,11 @@ import Foundation
/// about a knock, which is exactly where every device was before this
/// existed. It is never a reason to fail a join, and never a sheet.
@MainActor public enum RemoteKnocks {
- /// The platform name the server stores alongside the token. The two
- /// apps have different bundle identifiers and therefore different APNs
- /// topics, so a token is useless without it.
+ /// The platform name the server stores alongside the token. The server
+ /// holds an APNs topic per platform (CALLS_APNS_TOPIC_IOS and _MACOS) and
+ /// sends each token under its platform's topic. Both apps are
+ /// works.oficina.calls since 2026-11-14, so today the two topics are the
+ /// same; a token sent under any other topic is refused.
public static var platform: String {
#if os(iOS)
return "ios"
diff --git a/native/ios/README.md b/native/ios/README.md
index 28f31d6..7d4383f 100644
--- a/native/ios/README.md
+++ b/native/ios/README.md
@@ -99,6 +99,12 @@ extension is `works.oficina.calls.broadcast`. Earlier builds were
app: it installs beside the old one, signed out, and asks for the camera and
microphone again.
+**Delete the old iPhone apps first.** Before installing a `works.oficina.calls`
+build, delete every earlier Calls from the phone: the `net.amadan.oficina.calls.ios`
+development build ("Calls") and any `works.oficina.meet` TestFlight build. They
+all claim `oficina-calls://`, and when two apps claim a scheme iOS opens one of
+them arbitrarily, so "Join in the app" could land in the old one.
+
**Signing.** The simulator build is unsigned, so it has no App Group and cannot
broadcast; ReplayKit broadcasts need a device anyway. Before the first signed
device build, in the Apple Developer portal (Certificates, Identifiers &