iOSmacOSToolingGoodCRM

Caging the Release Script and Demo Showcase Before Shipping v1.0: GoodCRM's TestFlight Archive Guards and Reminder Isolation

Before GoodCRM 1.0 shipped on the US App Store, the November 25 audit checked release_testflight.py and the demo showcase and caught three ship-blocking traps: reusing stale archives under current Git commits (R22), silently ignoring --validate/--wait under xcodebuild (R41), and leaving demo reminders in UNUserNotificationCenter (R30).

GoodCRM (1.0) is now live on the US App Store (id6837223780) for iPhone, iPad, and Mac, with HarmonyOS in preparation. Most of the November 25 deep review on 7db1048 (docs/architecture/DEEP_REVIEW_REMEDIATION.md) focused on database recovery and sync fences, but three findings — R22, R41, and R30 — caught release-day bugs in the TestFlight script and demo mode.

R22: Reusing a Stale .xcarchive Under the Current Git Commit

tools/release_testflight.py accepts --archive-path so you can export and upload an already-built .xcarchive without recompiling.

Before the audit, passing an old archive path barely checked anything. An archive with the wrong Bundle ID, mismatched extension versions, or missing iPad multitasking orientations could flow straight into export, while summary.json attributed it to the current git rev-parse HEAD and the requested --version.

Now inspect_archive(), check_archive_versions(), and archive_provenance() enforce three gates before any upload runs:

  1. Strict plist and extension parity: inspect_archive() verifies ApplicationProperties and the main app Info.plist against PlatformSpec (me.mahui.app.goodcrm for both GoodCRMiOS and GoodCRMMac). On iOS, it verifies that GoodCRMShareExtension (me.mahui.app.goodcrm.share) matches the main app’s version and build number, and that non-fullscreen iPad builds declare all four orientations (Portrait, PortraitUpsideDown, LandscapeLeft, LandscapeRight).
  2. Full archive digest and provenance separation: archive_digest() walks every file, directory, and internal symlink (rejecting symlinks that escape the archive root) to compute a deterministic SHA-256 stored in <archive>.goodcrm-provenance.json. Fresh local builds record mode = "built_here" and attach source_commit only when the working tree is clean, pre/post Git metadata match, and xcodegen was not skipped. Reused archives are labeled reused_recorded_archive or external_archive — never misattributed to HEAD.
  3. Tamper checks across export and upload: Both archive_digest() and exported_artifact_fingerprint() are re-checked across export, altool --validate-app, and altool --upload-package.

R41: Refusing Unsupported --validate and --wait Combinations

resolve_upload_tool() supports --upload-tool (auto, xcodebuild, altool), --validate, and --wait.

Previously, passing --upload-tool xcodebuild --validate --wait silently fell through xcodebuild -exportArchive without running altool --validate-app or waiting for App Store Connect processing — and exited 0 as if those flags had been honored.

The fix fails fast in preflight:

if requested == "xcodebuild" and (validate or wait):
    raise ReleaseError("--validate and --wait require --upload-tool auto or altool.")

main() also rejects --validate with --archive-only, --wait with --archive-only or --export-only, and altool without explicit API Key or Apple ID credentials before spending minutes archiving.

R30: Isolating Demo-Library Reminders from UNUserNotificationCenter

GoodCRM includes a one-tap B2B consultant demo showcase (enterDemoShowcase() at line 2073 of WorkspaceModel.swift), stored in a separate GoodCRM-DemoShowcase directory.

Previously, entering the demo library called the normal reminder scheduler and registered fictional follow-ups with UNUserNotificationCenter. Exiting back to the user’s empty or real library left those sample notifications armed to fire on the user’s device.

In WorkspaceModel.swift (lines 3059 and 3078), refreshReminders() and requestAndReconcileReminders() now short-circuit whenever isDemoShowcaseActive is true:

if isDemoShowcaseActive {
    let report = try? await service.reconcileDemoReminders(
        now: ActionDates4.instant(now),
        timeZone: TimeZone.current.identifier
    )
    guard self.openGeneration == generation, self.service === service else { return }
    reminderCapability = .unknown
    reminderNotice = nil
    reminderPlans = report?.plans ?? []
    return
}

The demo showcase computes its reminder plan list purely in-app without touching AppleNotificationScheduler4 or system permissions. When exitDemoShowcase() runs, it cancels background tasks, clears demo recents, switches back to primaryDir, and deletes GoodCRM-DemoShowcase, leaving the real library’s schedule untouched.

Verification Scope

In DEEP_REVIEW_REMEDIATION.md, R22 and R41 are covered by simulated archive and CLI preflight tests inside the 183 passing Python tool tests (alongside R21, R23, and R43–R45 release-evidence checks), and R30 is covered by the 70-test Apple sync/notification/capture XCTest group inside the 586 passing Apple host tests (1 optional legacy vector skipped), plus 936 passing HarmonyOS host tests. Simulated release tests and local signed IPA checks remain distinct from physical iPad, Intel Mac, and live store-account verification, which are tracked separately on the hardware checklist.

✦

Comments

  • Loading…

Comments are reviewed before publishing; email is visible only to me.