From 1f39d167ce355e6dc911a58aa2925c81760e42a0 Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 28 Jul 2026 01:46:17 -0400 Subject: [PATCH] chore: tighten public documentation and private logging --- APPLE_BLE_BACKGROUND_PLAYBOOK.md | 2 +- BACKGROUND_STREETPASS_RESEARCH.md | 2 +- CHANGELOG.md | 7 +++++++ README.md | 6 +++--- StreetPassBluetoothService.swift | 8 +++++++- StreetPassLifecycle.swift | 14 ++++++++++++-- TESTING.md | 2 +- 7 files changed, 32 insertions(+), 9 deletions(-) diff --git a/APPLE_BLE_BACKGROUND_PLAYBOOK.md b/APPLE_BLE_BACKGROUND_PLAYBOOK.md index 7abcaa7..3a92cf2 100644 --- a/APPLE_BLE_BACKGROUND_PLAYBOOK.md +++ b/APPLE_BLE_BACKGROUND_PLAYBOOK.md @@ -145,7 +145,7 @@ Follow the generated runbook. The minimum useful evidence includes: - first/final telemetry deltas; - a comparable baseline without StreetPass active. -The project owner’s physical stress testing found no material battery effect. Treat that as a strong encouraging observation, while continuing to measure new hardware and iOS releases. +Repeated physical stress tests found no material battery change against the test baseline. Continue to measure after hardware, radio, or iOS changes. ## Pass conditions diff --git a/BACKGROUND_STREETPASS_RESEARCH.md b/BACKGROUND_STREETPASS_RESEARCH.md index 86c98a7..1feb650 100644 --- a/BACKGROUND_STREETPASS_RESEARCH.md +++ b/BACKGROUND_STREETPASS_RESEARCH.md @@ -67,7 +67,7 @@ The project has been exercised on paired physical iOS devices with: - termination and relaunch experiments; - local encounter notifications. -The project owner reports that heavy stress testing remains reliable when both parties have StreetPass installed and does not materially affect battery life in their tested conditions. +Heavy stress testing remained reliable when both parties had StreetPass installed and showed no material battery change in the tested conditions. The public repository intentionally summarizes those findings rather than committing raw reports, device names, device identifiers, signing IDs, or private filesystem paths. diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c66155..9b9fd9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to StreetPass will be documented in this file. The project f ## [Unreleased] +### Changed + +- Rephrased physical-test results around the measured conditions and baseline. +- Moved Bluetooth and lifecycle diagnostics to privacy-aware unified logging. + +## [0.2.0] - 2026-07-27 + ### Added - Public build configuration with ignored local signing overrides. diff --git a/README.md b/README.md index 55c18ac..5d4d4e7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # StreetPass -StreetPass is a local-first iOS experiment in opt-in, proximity-based social discovery. A person creates a profile on their device; the app exchanges a compact profile card with nearby StreetPass installations over Bluetooth Low Energy (BLE); and each device keeps its own short-lived encounter feed. +StreetPass is a local-first iOS app for opt-in, proximity-based social discovery. A person creates a profile on their device; the app exchanges a compact profile card with nearby StreetPass installations over Bluetooth Low Energy (BLE); and each device keeps its own short-lived encounter feed. There is no account service, analytics SDK, ad network, or required backend. The interesting part is the device-to-device behavior: when two people have StreetPass installed and Bluetooth access enabled, their phones can recognize a crossing without sending the profile through a server. @@ -8,9 +8,9 @@ There is no account service, analytics SDK, ad network, or required backend. The ## Project status -The core two-device flow has been repeatedly exercised on physical iPhone and iPad hardware, including foreground, background, persisted-profile, high-frequency tester, and unplugged battery trials. The project owner reports reliable bidirectional encounters under stress and no material battery impact in those trials. +The core two-device flow has been repeatedly exercised on physical iPhone and iPad hardware, including foreground, background, persisted-profile, high-frequency tester, and unplugged battery trials. Those runs produced reliable bidirectional encounters under stress without a material battery change against the test baseline. -Those results are real-world evidence, not a promise about every device, iOS release, radio environment, or usage pattern. See [TESTING.md](TESTING.md) for reproducible gates and [APPLE_BLE_BACKGROUND_PLAYBOOK.md](APPLE_BLE_BACKGROUND_PLAYBOOK.md) for the physical-device runbook. +Those results describe the tested devices and conditions; they are not a promise about every iOS release or radio environment. See [TESTING.md](TESTING.md) for reproducible gates and [APPLE_BLE_BACKGROUND_PLAYBOOK.md](APPLE_BLE_BACKGROUND_PLAYBOOK.md) for the physical-device runbook. StreetPass currently targets iOS 17 and uses: diff --git a/StreetPassBluetoothService.swift b/StreetPassBluetoothService.swift index 46870ca..41abd77 100644 --- a/StreetPassBluetoothService.swift +++ b/StreetPassBluetoothService.swift @@ -1,6 +1,7 @@ import Combine import CoreBluetooth import Foundation +import OSLog struct StreetPassBluetoothEncounter: Identifiable, Equatable, Codable { let id = UUID() @@ -96,6 +97,11 @@ struct StreetPassBluetoothTelemetry: Codable, Equatable { } final class StreetPassBluetoothService: NSObject, ObservableObject { + private static let logger = Logger( + subsystem: Bundle.main.bundleIdentifier ?? "StreetPass", + category: "Bluetooth" + ) + static let shared = StreetPassBluetoothService() static let serviceUUID = CBUUID(string: "E7F77E9A-0C77-42F7-AD13-0B6E3F5A4C01") static let profileCharacteristicUUID = CBUUID(string: "A3F55DD8-9F5B-49DA-95EA-1232FD0A9F21") @@ -683,7 +689,7 @@ final class StreetPassBluetoothService: NSObject, ObservableObject { } private func log(_ message: String) { - print("[StreetPassBLE] \(message)") + Self.logger.debug("\(message, privacy: .private)") } private static func managerStateDescription(_ state: CBManagerState?) -> String { diff --git a/StreetPassLifecycle.swift b/StreetPassLifecycle.swift index 2cefbb5..bc59000 100644 --- a/StreetPassLifecycle.swift +++ b/StreetPassLifecycle.swift @@ -1,7 +1,13 @@ import BackgroundTasks import Foundation +import OSLog import UIKit +private let lifecycleLogger = Logger( + subsystem: Bundle.main.bundleIdentifier ?? "StreetPass", + category: "Lifecycle" +) + struct StreetPassLaunchTelemetry: Codable, Equatable { var launches = 0 var bluetoothCentralLaunches = 0 @@ -316,7 +322,9 @@ enum StreetPassTrialReportStore { ofItemAtPath: url.path ) } catch { - print("[StreetPassTrial] Could not write report: \(error.localizedDescription)") + lifecycleLogger.error( + "Could not write trial report: \(error.localizedDescription, privacy: .private)" + ) } } @@ -745,7 +753,9 @@ enum StreetPassBackgroundRefresh { StreetPassTrialReportStore.writeLaunchSnapshot() } catch { StreetPassBackgroundRefreshTelemetryStore.recordScheduleFailure(error.localizedDescription) - print("[StreetPassRefresh] Could not schedule background refresh: \(error.localizedDescription)") + lifecycleLogger.error( + "Could not schedule background refresh: \(error.localizedDescription, privacy: .private)" + ) StreetPassTrialReportStore.writeLaunchSnapshot() } } diff --git a/TESTING.md b/TESTING.md index 0f94c30..78ce393 100644 --- a/TESTING.md +++ b/TESTING.md @@ -147,7 +147,7 @@ Scripts/prepare_live_battery_trial.sh \ The generated runbook supplies exact start, monitor, and finish commands. Record battery values only after disconnecting power. Keep a non-StreetPass baseline under comparable radio, screen, and movement conditions when making quantitative claims. -Project evidence to date includes repeated bidirectional physical-device trials, background-optimized stationary runs, persisted-profile relaunches, and aggressive tester-lab runs. The project owner reports no material battery impact under their stress testing. Public documentation intentionally does not include raw device identifiers or a universal drain claim. +Project evidence to date includes repeated bidirectional physical-device trials, background-optimized stationary runs, persisted-profile relaunches, and aggressive tester-lab runs. Those trials showed no material battery change against the recorded baseline. Public documentation intentionally omits raw device identifiers and does not make a universal battery claim. ## Interpreting failures