Commit Graph

183 Commits

Author SHA1 Message Date
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
Daniel Arantes Loverde
cef21aa160 [macos-runner] Fix wake/sleep jobs to use an actually-registered runner label
runs-on: docker matched no registered runner (labels are macos-release,
atomenta, pedifoods, lc-wallet-web). Use pedifoods, this repo's own
existing always-on runner, to run the wake/sleep SSH steps.
2026-07-30 11:46:04 -03:00
e24b92563b Merge pull request '[macos-runner] Add Gitea Actions workflows for self-hosted macOS CI' (#25) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#25
2026-07-30 11:43:51 -03:00
5dac551bd4 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-30 11:43:43 -03:00
bdddb7bba2 Merge pull request '[2026-07-resubmission] Add guest browsing flow with App Attest session for App Review resubmission' (#24) from fix/app-review/2026-07-resubmission into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#24
2026-07-30 11:43:25 -03:00
Daniel Arantes Loverde
dda7bbcb17 [macos-runner] Add Gitea Actions workflows for self-hosted macOS CI
Replaces bitrise.yml with equivalent test/beta/release pipelines running
on the self-hosted macos-release runner (act_runner inside a dockur/macos
VM). Each workflow wakes the VM over SSH before the job and stops it
after, since the VM can't be left running 24/7 without starving the
VPS's other services.
2026-07-30 11:35:58 -03:00
Daniel Arantes Loverde
017bd7168f [2026-07-resubmission] Add guest browsing flow with App Attest session for App Review resubmission
Adds a pre-login public store locator (guest session via DeviceCheck/App
Attest, keychain-backed token storage) so the app no longer forces sign-in
before showing any content, plus updated support URL metadata.
2026-07-30 11:35:25 -03:00
3e93196b92 Merge pull request 'Fix cart/checkout delivery fee and address sync' (#23) from fix/cart/delivery-fee-address-sync into main 2026-07-10 12:05:32 -03:00
Daniel Arantes Loverde
fc71228ad5 [cart-checkout] Prefer live appState.address.display over async selectedCustomerAddress for the name
Same class of bug as the earlier matching-cascade fix: selectedCustomerAddress
is resolved asynchronously against the address book and can lag behind or
mismatch. appState.address.display is set synchronously the moment the user
picks an address (AddressesView.selectAddress) — it's the authoritative live
value. customerAddressName had these backwards, checking the async value
first.
2026-07-10 11:43:15 -03:00
Daniel Arantes Loverde
a5878b8326 [cart-checkout] Fix address name hardcoded to 'Casa' in Checkout
CheckoutView.swift's addressSection showed the literal string "Casa"
as the address name/label regardless of which address was actually
selected — only the street/detail line below it (customerAddressLabel)
was wired to real state. Added customerAddressName, preferring
selectedCustomerAddress?.label then appState.address.display, matching
the same fallback pattern already used for the detail line.
2026-07-10 11:37:02 -03:00
Daniel Arantes Loverde
6b77775238 [cart-checkout] Geocode addresses locally when lat/long is missing
Explains why the delivery fee specifically never changed while other
address info (label, street) updated fine after the previous fix:
AddAddressFormView only sets latLong when the CEP lookup happens to
return coordinates (AddAddressFormView.swift:141-146) — plenty of saved
addresses have none. Without coordinates the backend can't distinguish
that address from the previous one, so the fee (and, in Checkout,
checkoutAddressWatchKey itself) never actually changes, without any
error surfacing since it likely falls back to some default fee instead
of rejecting.

Added LocationService.geocodeAddress(street:number:neighborhood:city:
state:zip:), a thin CLGeocoder wrapper, and call it in both
CartView.refreshDeliveryFee and CheckoutView+Logic.
validateDeliveryAddressIfNeeded whenever coordinates are missing,
persisting the result back into appState.address so it doesn't need to
re-geocode on every subsequent check.
2026-07-10 10:55:28 -03:00
Daniel Arantes Loverde
f706492823 [cart-checkout] Match selected address by coordinates before label, not after
CustomerAddress.id is genuinely optional (Services/ApiModels.swift:46) —
some address book entries have no id. AddressesView.selectAddress sets
appState.address.selectedId = address.id directly with no fallback, so
picking one of those addresses leaves selectedId nil. The matching
cascade in both CartView and CheckoutView+Logic then skipped straight to
a label match, which silently collides whenever two addresses share an
empty or duplicate label (common for unnamed entries), and finally fell
back to addresses.first — always redisplaying whatever's first in the
list regardless of what was tapped, with no error surfaced anywhere.

Coordinates are set immediately and reliably at selection time and are
far less likely to collide than a label. Checkout already had a lat/lng
fallback but ordered after the weak label match; promoted it ahead of
label matching in both files, and added the same fallback to Cart, which
didn't have one at all.
2026-07-10 10:49:18 -03:00
Daniel Arantes Loverde
4fc6a666b2 [cart-checkout] Fix delivery fee and address sync using stale cached profile
Cart's delivery fee and Checkout's address validation both fetched the
customer profile without forcing a cache refresh (2h TTL), then let that
possibly-stale address book unconditionally overwrite the just-picked
appState.address coordinates before building the fee/validation payload.
Result: changing the address on Home didn't reliably move the cart's
delivery fee, and Checkout's 'Alterar' could silently revert to the old
address when the stale coordinates made the backend report it as not
served.

Force-refresh the profile fetch and only use it to fill genuine gaps in
appState.address, never to override a live user selection.
2026-07-10 10:23:59 -03:00
380cd43657 Merge pull request 'WHAT! [ci-bitrise] Remove manage-ios-code-signing for good — no platform override exists' (#22) from fix/ci/apikey-json-escaping into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#22
2026-07-09 18:53:43 -03:00
7a1a396557 Merge branch 'main' into fix/ci/apikey-json-escaping 2026-07-09 18:53:07 -03:00
Daniel Arantes Loverde
b151cd2659 [ci-bitrise] Remove manage-ios-code-signing for good — no platform override exists
Same failure again with platform: iOS set. Unlike xcode-archive@5's error
('Define the platform step input manually to avoid this phase in the
future'), this step's error gives no such hint — it has no override.
Confirmed twice now: this step cannot run on a target with
SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx. Back to relying
on xcode-archive@5's own automatic_code_signing: api-key alone.
2026-07-09 18:28:49 -03:00
447b7c7595 Merge pull request '[ci-bitrise] Restore manage-ios-code-signing with platform pinned instead of removed' (#21) from fix/ci/apikey-json-escaping into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#21
2026-07-09 18:22:52 -03:00
455eeb048f Merge branch 'main' into fix/ci/apikey-json-escaping 2026-07-09 18:22:18 -03:00
Daniel Arantes Loverde
41bfc70171 [ci-bitrise] Restore manage-ios-code-signing with platform pinned instead of removed
Removing it earlier also removed the cert/profile provisioning it does
before archive — same mechanism LC Wallet's pipeline actually relies on.
The export failure ('No profiles for com.br.pedifoods.app were found',
'Cloud signing permission error') was that provisioning step missing,
not a Developer Portal or API key permission problem — both were already
confirmed fine. Should have looked for a platform override on this step
first, same as xcode-archive@5, instead of deleting it outright.
2026-07-09 18:13:54 -03:00
151cfcdd3d Merge pull request '[ci-bitrise] Pin xcode-archive platform input to skip broken auto-detect' (#20) from fix/ci/apikey-json-escaping into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#20
2026-07-09 18:00:39 -03:00
f6a67fc42d Merge branch 'main' into fix/ci/apikey-json-escaping 2026-07-09 18:00:03 -03:00
Daniel Arantes Loverde
44726ce120 [ci-bitrise] Pin xcode-archive platform input to skip broken auto-detect
Same SDKROOT = auto issue as manage-ios-code-signing, this time inside
xcode-archive@5's own platform auto-detection. The step's log names the
fix itself: 'Define the platform step input manually to avoid this
phase in the future.'
2026-07-09 17:56:12 -03:00
1c5fac4fe5 Merge pull request '[ci-bitrise] Drop manage-ios-code-signing — can't parse this multi-platform target' (#19) from fix/ci/apikey-json-escaping into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#19
2026-07-09 17:53:00 -03:00