Commit Graph

205 Commits

Author SHA1 Message Date
Daniel Arantes Loverde
6187dc1907 [app-attest-env] Clear stale App Attest key on local DCError, not just server 403
Root cause of the permanent stuck-at-challenge symptom: a stale
appAttestKeyId in Keychain (Secure Enclave key invalidated by an app
reinstall or signing change) makes generateAssertion fail every time
with DCError code 2 (invalidInput). Only NetworkError 403 was clearing
the stored key, so this local rejection was never recovered from -
every guest-authed call kept retrying the same broken key forever.
Catch DCError here too and fall through to fresh attestation.
2026-07-31 14:09:41 -03:00
Daniel Arantes Loverde
e9e3e9da1f [app-attest-env] Log the actual error behind guest-session App Attest failures
Guest session handshake fails silently after the challenge step - no
console output, just a generic "could not load" message in the UI.
DCAppAttestService errors (generateKey/attestKey/generateAssertion)
propagate up uncaught by anything that logs them. Add explicit logging
at each step so the real thrown error is visible instead of debugging
blind.
2026-07-31 14:05:29 -03:00
Daniel Arantes Loverde
0cf3ab7b4f [app-attest-env] Fix App Attest environment mismatch for distribution builds
com.apple.developer.devicecheck.appattest-environment was hardcoded to
"development" for every build, including the App Store/TestFlight
distribution build. Apple's App Attest servers validate this claim
against how the app was actually signed/distributed, so a "development"
claim on a real distribution build fails - guest session handshake
never gets past the challenge step, no store/city data ever loads.
Parameterized per configuration: development for Debug, production for
Release, via an APP_ATTEST_ENVIRONMENT build setting.
2026-07-31 13:41:31 -03:00
32f12d6c0e Merge pull request '[2026-07-resubmission] Add missing location usage description' (#40) from fix/app-review/2026-07-resubmission into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#40
2026-07-31 12:01:51 -03:00
69002f4754 Merge branch 'main' into fix/app-review/2026-07-resubmission 2026-07-31 12:01:42 -03:00
Daniel Arantes Loverde
246208b515 [2026-07-resubmission] Add missing location usage description
App Store Connect flagged a validation warning: code references a
location API (guest store locator) but Info.plist has no
NSLocationWhenInUseUsageDescription, which would cause an App Review
rejection if left unaddressed. Added via INFOPLIST_KEY_* build setting
since this target generates its Info.plist from build settings rather
than a static file.
2026-07-31 11:58:41 -03:00
e1e21c1e28 Merge pull request '[macos-runner] Don't auto-submit for review after upload' (#39) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#39
2026-07-31 11:53:23 -03:00
dd5760e3e9 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 11:53:14 -03:00
Daniel Arantes Loverde
c6ebd5db2b [macos-runner] Don't auto-submit for review after upload
Binary upload itself succeeded - the only failure was
upload_to_app_store's default auto-submission colliding with an
existing in-progress review submission. CI should deliver the build;
submitting for review stays a deliberate manual step in App Store
Connect.
2026-07-31 11:52:24 -03:00
e738688e36 Merge pull request '[macos-runner] Fix build number bump - agvtool was silently no-oping' (#38) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#38
2026-07-31 11:38:09 -03:00
1bd23a800b Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 11:38:00 -03:00
Daniel Arantes Loverde
007227f0ea [macos-runner] Fix build number bump - agvtool was silently no-oping
Upload rejected with "bundle version must be higher than previously
uploaded version: 1" - agvtool new-version requires VERSIONING_SYSTEM =
apple-generic, which this project never sets, so it did nothing every
run despite reporting success. Pass CURRENT_PROJECT_VERSION directly
via xcargs instead, parameterized from the job's run number.
2026-07-31 11:36:50 -03:00
90385bd020 Merge pull request 'ci/gitea-actions/macos-runner' (#37) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#37
2026-07-31 11:14:22 -03:00
abeb2fa83c Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 11:14:14 -03:00
Daniel Arantes Loverde
57a4ad3086 [macos-runner] Set manual signing on the app target's Release configuration
Baked directly into the project instead of overriding at build time -
no tool can programmatically edit this project's .pbxproj (xcodeproj
gem can't parse its format), and a command-line xcargs override applies
to the whole build graph, breaking the SPM package's own targets which
must stay on Automatic. Debug config left untouched so local Xcode
development still uses automatic signing.
2026-07-31 11:12:59 -03:00
Daniel Arantes Loverde
7445561e5c [macos-runner] Revert update_code_signing_settings - unusable on this project format
The xcodeproj gem can't parse PediFoods.xcodeproj's .pbxproj (newer
Xcode format than any released gem version supports), so the runtime
override always fails with a misleading "very old project file" error.
Signing config for the app target needs to live in the checked-in
project settings instead (set once via Xcode's GUI), since no
command-line override can be scoped to a single target without also
breaking the SPM package's own ephemeral targets.
2026-07-31 10:54:04 -03:00
ceda06acc1 Merge pull request '[macos-runner] Disable credential helper and askpass for checkout clone' (#36) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#36
2026-07-31 10:44:44 -03:00
f03db25058 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 10:44:36 -03:00
Daniel Arantes Loverde
28f145f392 [macos-runner] Disable credential helper and askpass for checkout clone
17-minute hang on git clone, far past the http.lowSpeedLimit abort
threshold, isn't explained by a data-transfer stall. Now that the VM has
a real GUI session (auto-login), git-credential-osxkeychain could be
popping a GUI dialog nobody's there to dismiss, bypassing
GIT_TERMINAL_PROMPT. Disable the credential helper and force askpass to
fail immediately instead of prompting.
2026-07-31 10:41:36 -03:00
dece29e8b4 Merge pull request '[macos-runner] Scope manual signing to the app target only' (#35) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#35
2026-07-31 10:21:35 -03:00
0dab971a93 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 10:21:27 -03:00
Daniel Arantes Loverde
cfa054a593 [macos-runner] Scope manual signing to the app target only
Blanket xcargs (CODE_SIGN_STYLE=Manual etc.) applied to every target in
the build, including the SPM package's own generated targets (PediFoods,
pedi-foods_PediFoods) which explicitly reject provisioning profiles and
need to stay Automatic. Use update_code_signing_settings scoped to just
"PediFoods App" instead, guarded behind DEVELOPMENT_TEAM being set so
Bitrise's existing automatic-signing path is untouched.
2026-07-31 10:20:33 -03:00
e00a62c5c6 Merge pull request '[macos-runner] Pass DEVELOPMENT_TEAM into xcargs for SPM package targets' (#34) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#34
2026-07-31 10:06:16 -03:00
9351cbd31c Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 10:06:08 -03:00
Daniel Arantes Loverde
d21ee2e7a6 [macos-runner] Pass DEVELOPMENT_TEAM into xcargs for SPM package targets
Main app target signed fine after the manual signing override, but the
SPM-generated pedi-foods_PediFoods target still failed with "requires a
development team" - it needs DEVELOPMENT_TEAM directly since profile
specifiers only map to the app's own bundle ID. Already available as a
job env var, just wasn't being passed into xcodebuild's build settings.
2026-07-31 10:05:32 -03:00
a677e89423 Merge pull request 'ci/gitea-actions/macos-runner' (#33) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#33
2026-07-31 09:39:39 -03:00
19d3deb237 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 09:39:30 -03:00
Daniel Arantes Loverde
3e82e6e1fe [macos-runner] Force manual code signing in the assemble lane's xcargs
xcodebuild ignored sigh's downloaded provisioning profile because the
Xcode project's signing style is Automatic, which needs an interactive
Apple ID session unavailable in headless CI. Override at build time via
xcargs instead of changing the checked-in project signing settings.
2026-07-31 09:38:29 -03:00
Daniel Arantes Loverde
47cf46e007 [macos-runner] Guard checkout against hanging on prompts or a stalled clone
git clone froze for 9+ minutes on one run with no clear cause. Set
GIT_TERMINAL_PROMPT=0 so it fails fast instead of hanging if credential
auth ever goes wrong, and abort via http.lowSpeedLimit/lowSpeedTime if
the transfer genuinely stalls instead of just being slow.
2026-07-31 09:32:10 -03:00
15b90385e9 Merge pull request '[macos-runner] Add diagnostics to the keychain step to find the real cause' (#32) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#32
2026-07-30 18:48:35 -03:00
b3e19753e6 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-30 18:48:27 -03:00
Daniel Arantes Loverde
303886b103 [macos-runner] Add diagnostics to the keychain step to find the real cause
Identity is visible via the same commands over interactive SSH but not
from this job's own process, even within a single merged step - adding
whoami/HOME/path/keychain-info printouts to see what's actually
different about this execution context before guessing further.
2026-07-30 18:48:01 -03:00
0246f92e2b Merge pull request '[macos-runner] Merge keychain unlock and fastlane into a single step' (#31) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#31
2026-07-30 18:45:00 -03:00
c05f9619e1 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-30 18:44:52 -03:00
Daniel Arantes Loverde
247e59b5f1 [macos-runner] Merge keychain unlock and fastlane into a single step
Identity was visible with find-identity inside the unlock step itself
but still invisible to fastlane in the next step - each run: block
likely spawns a distinct process/session on this host executor, so the
unlock doesn't survive across steps even though keychain search-list
membership does. Run unlock and fastlane in the same shell invocation
to remove that boundary entirely.
2026-07-30 18:44:29 -03:00
595d74d209 Merge pull request '[macos-runner] Use a dedicated CI keychain instead of the login keychain' (#30) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#30
2026-07-30 18:41:44 -03:00
380349a5f1 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-30 18:41:36 -03:00
Daniel Arantes Loverde
a0f18644d7 [macos-runner] Use a dedicated CI keychain instead of the login keychain
A Gitea Actions job runs in a different macOS security session than an
interactive SSH login - login.keychain-db's unlock state and search-list
membership don't reliably carry over across that boundary, so the
identity was invisible to the job even after successful unlock. Point
the workflow's unlock step at a dedicated ci-signing.keychain-db instead,
created independent of any login session.
2026-07-30 18:40:51 -03:00
4e50150f99 Merge pull request '[macos-runner] Force login keychain into the job session's search list' (#29) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#29
2026-07-30 18:31:27 -03:00
a3300c000a Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-30 18:31:19 -03:00
Daniel Arantes Loverde
d84fcc6ac4 [macos-runner] Force login keychain into the job session's search list
Unlocking alone wasn't enough - the launchd session's default keychain
search list apparently doesn't include the login keychain by default,
so sigh/fastlane still found zero identities even after a successful
unlock. Explicitly set it as both the search list and default keychain,
and print find-identity in the step itself to verify before fastlane runs.
2026-07-30 18:30:10 -03:00
6d87521d50 Merge pull request '[macos-runner] Unlock login keychain explicitly before fastlane signing steps' (#28) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#28
2026-07-30 18:22:43 -03:00
0a2ed66604 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-30 18:22:33 -03:00
Daniel Arantes Loverde
54728cdc71 [macos-runner] Unlock login keychain explicitly before fastlane signing steps
act_runner's launchd daemon now runs as loverde_vm_mac (UserName set),
but its background session doesn't inherit the unlock state from an
interactive SSH session - the login keychain is still locked when
fastlane/sigh looks for signing identities, so none are found. Unlock it
explicitly at the start of each signing job instead.
2026-07-30 18:21:54 -03:00
2c90d3d772 Merge pull request '[macos-runner] Replace actions/checkout@v4 with a plain git clone step' (#27) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#27
2026-07-30 17:49:34 -03:00
10ebfb1ea6 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-30 17:49:26 -03:00
Daniel Arantes Loverde
d9c2035807 [macos-runner] Replace actions/checkout@v4 with a plain git clone step
actions/checkout@v4 is a JS action, and act_runner's host-executor JS
action path hits a known upstream caching bug on this runner (nested
hostexecutor/.cache/act path never gets the downloaded action, causing
MODULE_NOT_FOUND on every run). Introducing a config.yaml to work around
it (workdir_parent) triggers a separate act_runner bug requiring a Docker
socket that doesn't exist on this Mac. Side-stepping both by doing the
checkout as a plain shell git clone, which the host executor runs fine.
2026-07-30 17:48:47 -03:00
2f83821a11 Merge pull request 'ci/gitea-actions/macos-runner' (#26) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#26
2026-07-30 13:08:35 -03:00
c76f074563 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-30 13:08:29 -03:00
Daniel Arantes Loverde
8af8c7cb5b [macos-runner] Replace SSH-based VM wake/sleep with a dedicated runner container
Drop the SSH + restricted-key design entirely. wake/sleep now runs on a
new macos-ctl runner (its own Docker container on the VPS, Docker socket
mounted) which runs docker start/stop macos directly on the sibling
container - no SSH indirection, and no borrowing of another project's
runner (pedifoods-web) to do it.
2026-07-30 11:57:09 -03:00