Repository navigation
Auto-ship CodeCaps for Mac to TestFlight on every merge (CC-165) - #254
Conversation
macos-ship.yml was workflow_dispatch only, so a merge to main never reached TestFlight (CodeCaps for Mac sat at 0.1.12 from Oct 3). It also read the stale ASC_* repository secrets, which App Store Connect answers with HTTP 401, and was on the retired 0.1.N marketing train. - Push to main on the Mac native tree (ios/CodeCapsCompanion/** plus the eight exact Sources/QuotaCore files the Mac targets compile), workflow_dispatch, and a catch-up cron behind scheduled-ship-gate.sh (codecaps-mac). - ASC key from Fleet-OPS prod /asc through the same step as ios-ship.yml; mac-appstore-gm-prepare.sh accepts the staged ASC_KEY_PATH. - Marketing train 1.0.N with its own state cache family, so the 0.1.N build sequence cannot carry over. cancel-in-progress is now false. - scripts/macos-ship-workflow.test.mjs pins all of it in the iOS ship contract check, including parity of the ASC step with ios-ship.yml. Refs CC-165 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
🤔 Insufficient Task ContextI found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details. 🔍 What I need to validate:
💡 How to improve the task context:
|
Review finding on PR 254: the doc named a path under ~/apps/ios-fleet. The step now describes the freshness check by purpose. Refs CC-165 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations.
|
| Options | Enabled |
|---|---|
| Bug | ✅ |
| Performance | ✅ |
| Security | ✅ |
| Business Logic | ✅ |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Stale: every finding fixed or answered at 7a604f7, CI green. (1) Critical, Infisical project UUID at macos-ship.yml:224: answered in the resolved thread and withdrawn by Kody; the literal is a Fleet-OPS project identifier, not a credential, identical to ios-ship.yml:215 merged in #253, pinned by both contract tests, and secrets.ASC_INFISICAL_PROJECT_ID does not exist. (2) High, local path in docs/IOS-TESTFLIGHT.md: fixed in 05c6568, no ~/ path remains. (3) Medium, task description: the PR body states the full trigger, gate, credential and version contract and refs CC-165. Dismissed by CLAUDE per owner ruling 2026-10-17.
Refs CC-165. Sibling of CC-163 (PR 253, the iOS companion).
| 489ab54 PiP dragging and logos (#250) |
ios/CodeCapsCompanion/App/Models/CompanionQuotaModel.swiftand 30 more | never | triggers || 7111f49 Wait for Swift CI before TestFlight ships (#245) |
.github/workflows/macos-ship.yml| never | triggers || b3fc6bb Muse bars and logo cache (#242) |
Sources/QuotaCore/QuotaWindowVocabulary.swift| never | triggers || 6a89804 QuotaCore window vocabulary (#226) |
Sources/QuotaCore/QuotaWindowVocabulary.swift| never | triggers |codecaps-macflips toautoRemedy, so the deploy check also dispatches this workflow when the Mac build falls behind.Summary
Enables automatic TestFlight shipping for CodeCaps for Mac: a merge to
mainthat touches the Mac app's native tree now archives and uploads a build with no human step and publishes "What to Test". Previouslymacos-ship.ymlwasworkflow_dispatchonly, so merges never reached TestFlight and the Mac build remained at the retired0.1.Ntrain.What changed
.github/workflows/macos-ship.ymlpushtrigger onmainscoped to the Mac native tree:ios/CodeCapsCompanion/**, the eight exactSources/QuotaCorefiles theCodeCapsCompanionMac/CodeCapsWidgetsMactargets compile (explicit files, not a directory wildcard, so unrelated QuotaCore edits do not ship), the workflow itself, the Infisical action/script,scripts/ios-fleet/**(test scripts excluded), and the Mac ship/signing scripts.scheduletick (11,41 * * * *) to catch merges that GitHub's recursion guard does not announce as push runs.gatejob (ubuntu) that restores ship state, runsscheduled-ship-gate.shwith--eventand matching path prefixes for app keycodecaps-mac, exposesshould_ship, and only then waits for Swift CI compile checks. The Mac runner starts only when the commit should ship and has compiled.shipnow requiresgatesuccess andshould_ship == '1';fetch-depth: 0is used for both checkouts.cancel-in-progress: falseso a later push queues behind an in-flight upload instead of cancelling it mid-archive.prod /ascvia universal auth;ASC_KEY_ID/ASC_ISSUER_IDgo toGITHUB_ENV, and the multiline key is staged to a mode-600 file byscripts/ios-stage-asc-key.sh, exposing onlyASC_KEY_PATH. The stale same-named repositoryASC_*secrets are no longer read.IOS_DIST_P12_*andMAC_INSTALLER_P12_*remain repository secrets, scoped to the signing-import step.ios-fleet-state-codecaps-mac-v1-in both gate and ship, so the retired0.1.Nbuild sequence cannot carry over.scripts/mac-appstore-gm-prepare.shumask 077.ASC_KEY_PATH(pre-staged key file) as the primary input, retainingASC_KEY_P8for local legacy callers; validates the staged file exists..p12files from disk after the keychain import.Contract tests
scripts/macos-ship-workflow.test.mjspins the whole wiring: push/schedule triggers, gate prefixes derived from and cross-checked againstproject.ymlcompiled sources, parity withios-ship.yml's shared-file list, exclusion of the separate SwiftPM/Sparkle tree and test-only changes, credential sourcing with no stale-secret reads, absence of gate overrides/force-ship, cache key family,1.0.Nmarketing train andcodecaps-macapp config, and the Mac profile map bundle IDs..github/workflows/ios-ship-contract.ymlnow also runs the Mac contract test and triggers onscripts/mac-*, the new test, andmac-appstore-profiles.json.Docs
docs/IOS-TESTFLIGHT.mdcovering what builds, what triggers it, credentials, version train, gates, and how to diagnose a missing build.Functional impact
Mac TestFlight builds ship automatically from
main, use the same centrally managed ASC key as the iOS ship, are pinned to the1.0.Nversion train, and cannot silently regress to manual-only without failing theiOS ship contractcheck.Review findings to address
.github/workflows/macos-ship.yml:224) rather than sourced from a repository secret.~/apps/ios-fleet/...) in a public doc (docs/IOS-TESTFLIGHT.md:43).Summary
Updates the CodeCaps iOS/Mac TestFlight runbook (
docs/IOS-TESTFLIGHT.md) so the "When a Mac build is missing" guidance no longer includes a leaked operational invocation. The step now points readers to the fleet's TestFlight freshness check forcodecaps-macand describes what its verdict means, instead of embedding a full local path, script name, runtime, and command-line flag.Changes
docs/IOS-TESTFLIGHT.md— Mac build troubleshooting stepnode ~/apps/ios-fleet/ios_testflight_freshness.mjs --app codecaps-mac) with a reference to running the fleet's TestFlight freshness check forcodecaps-mac.Impact
mainpush run exists, treat a failed ASC credential load as an Infisical owner fix, then run the freshness check.Review Notes