# בדיקות חנות פנימיות — P8

> תיעוד היסטורי. מקור: docs/mobile-p8-internal-store-testing.md · 6a466bf.
> בגרסה הציבורית הושמטו מזהים תפעוליים ופרטי חשבון אישיים. קובץ המקור נשמר במאגר.

**Verified status on 2026-11-11:** Expo EAS project `@company-account/linknodes-energy` exists (project ID `[expo-project-id-redacted]`); publishable mobile production configuration and approved 1024×1024 RGB store icon are configured. The internal-only EAS workflow passed official `eas workflow:validate` earlier. **No signed IPA/AAB, TestFlight upload, Google Play Internal release or physical-device verification has been proven.**

## Scope and protected baseline

- The approved React Native UI, artwork, maps, onboarding/authentication and all production web/server code remain locked.
- Original `apps/mobile/app.json` IDs are unchanged: iOS bundle ID and Android package both `com.linknodesenergy.app`.
- This PR adds only submission targeting for internal testing, a manual-only Expo workflow and tests/documentation.
- There is **no automatic release on a push to main**, no App Store public-review submission and no Play production rollout.
- Do not send a sandbox/mock Google Maps key, a placeholder store icon, or a build with missing Clerk/Supabase publishable keys to testers.

## Current activation blocker

The user completed device authorization for EAS and the `@company-account/linknodes-energy` project was created. The authenticated sandbox session was temporary and has since stopped; **there is no proven persistent CI/EAS session or `EXPO_TOKEN`**. The original personal `expo.owner=[account-redacted]` must not be switched in source until the Expo project is actually transferred to an authorized company Organization account.

Account ownership must be settled before signing: the user says Apple Developer membership is active but currently personal; no Google Play Console developer account exists. Apple and Google store account ownership, credentials and TestFlight/Play app records remain unverified. Never paste passwords or access tokens into chat or commit signing credentials.

## External account prerequisites (user-owned approval)

1. EAS project is already linked and known. Before corporate release: create the company's Expo Organization, transfer the existing EAS project via Expo Project settings > General > Transfer project using authorized Owner/Admin permissions on both accounts, then update only `expo.owner` after the actual transfer; preserve `extra.eas.projectId` and both app identifiers. A new separate EAS project would be destructive and is not required.
2. Apple Developer Program: the current membership is reported as personal. The existing Account Holder should first request conversion to Organization membership through Apple Developer account support, supplying the registered legal entity details and D-U-N-S number. An Organization is not created inside a personal App Store Connect team. Create a separate corporate Developer membership only if ownership/legal structure specifically requires it; do not register the app ID under the wrong team. After confirmation, verify App Store Connect app record `com.linknodesenergy.app`, distribution credentials, upload permissions and TestFlight tester group.
3. Google Play Console: register a new **Organization** developer account for the actual legal entity, not an unregistered product/brand; align legal name/address and D-U-N-S and finish required owner and organization verification. Create the app record for `com.linknodesenergy.app`, configure Play App Signing, upload signing key/service account with least privilege and an Internal tester list. Follow any first-upload/account verification prompts in Play Console.
4. Approved store icon **DONE**: `apps/mobile/assets/linknodes-icon-1024.png` is 1024×1024 opaque RGB and is linked via `expo.icon`. SHA-256 provenance test keeps the approved SVG locked; no asset replacement or new visual direction is permitted.
5. Native Android Maps SDK key is **NOT CONFIGURED**: create a key restricted to `com.linknodesenergy.app` plus the **Google Play app-signing SHA-1** for installations from Play Internal Testing; independently include the EAS/upload keystore SHA-1 only if testing direct EAS-signed Android installations. Bind it only to the Maps SDK for Android. Inject it via secure EAS build config as `GOOGLE_MAPS_ANDROID_API_KEY`; never use a QA dummy or unrestricted key for signed test builds.
6. Production mobile publishable variables **CONFIGURED in Expo**: `EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY`, `EXPO_PUBLIC_SUPABASE_URL`, `EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY`, and `EXPO_PUBLIC_API_BASE_URL=https://product.linknodesenergy.com`. They still require actual signed-device verification. Never expose `SUPABASE_SERVICE_ROLE_KEY`, `HYP_*` or provider credentials in Expo client builds.
7. Keep `EXPO_PUBLIC_TELEMETRY_ENABLED=false` and `EXPO_PUBLIC_GRAFANA_MOBILE_ENABLED=false` until independent PostHog/Grafana live-telemetry validation.
8. Confirm app-store privacy policy, account deletion for users creating accounts, store payment policy treatment and tester-facing disclosure of unavailable supplier integrations.

## Store listing URLs — verified live (2026-11-11)

- Privacy policy: `https://linknodesenergy.com/company/privacy` — HTTP 200, HTML title identifies LinkNodes Energy.
- Terms: `https://linknodesenergy.com/company/terms` — HTTP 200, LinkNodes Energy.
- Support/contact: `https://linknodesenergy.com/company/contact` — HTTP 200, LinkNodes Energy.
- Product-scoped privacy and terms also respond, but company-site URLs above are the stable preferred store listing destinations.
- This verifies **reachability and page identity only**, not legal accuracy, store-policy compliance or adequacy of the privacy disclosures.

Run the optional read-only checker from `apps/mobile`:

```bash
pnpm test:store-pages
pnpm release:store-pages
```

The checker requests only those public URLs, does not follow redirects, authenticates to nothing and never modifies a deployed resource. Never use its success as proof of account deletion or privacy compliance.

## Organization/account ownership handoff

- **Apple:** Request conversion of the personal Apple Developer Program membership to Organization first (Apple Account Holder, D-U-N-S, legal entity documents). Do not mistake App Store Connect Users/Access for a new standalone Organization membership. A separate account may be preferable if the legal owner differs; decide before registering `com.linknodesenergy.app`.
- **Google:** Create a Play Console Organization account with the same intended legal publisher, official website and required company verification/D-U-N-S. Do not use the product brand as a substitute for a registered legal name.
- **Expo:** Its existing project is under personal `[account-redacted]`. When the corporate Expo Organization exists, transfer the **same** Expo project (preserve project ID `[expo-project-id-redacted]`) through the Expo dashboard, then update `owner` in code with review. No fresh Expo project, reset of build numbers, or new bundle ID.
- **Secrets:** Configure scoped EAS credentials in Expo/Apple/Google directly. Never paste API keys, service-account JSON, passwords, private keystores or 2FA codes into public source or release issue comments.

## Native on-device QA matrix — not yet completed

| Test case                                                        | iOS TestFlight | Android Play Internal |
| ---------------------------------------------------------------- | -------------- | --------------------- |
| App installs, opens with approved icon and correct name          | Pending        | Pending               |
| Sign-up, sign-in/MFA, sign-out and secure session restore        | Pending        | Pending               |
| Tenant/workspace selection and cross-tenant isolation            | Pending        | Pending               |
| Maps tiles, nearest station, foreground-only location permission | Pending        | Pending               |
| Network-offline, 403/401 and retry/error states                  | Pending        | Pending               |
| Customer data/access scope, logout/login, account lifecycle      | Pending        | Pending               |
| Crash, sensitive data redaction and telemetry opt-in             | Pending        | Pending               |

**External policy gates:** The mobile account screen currently does not expose a validated account-deletion path, and sign-up/onboarding must be verified with real test identities. Apple/Google digital subscription purchase rules must be evaluated separately from physical fuel/charging payments. Do not represent unconnected supplier APIs or HYPE as working production features to testers.

## Exact runbook — after prerequisites

From `apps/mobile` in an **authenticated** Expo build environment, with EAS project linked:

```bash
node scripts/release-preflight.mjs --profile production --platform all
eas whoami
eas project:info
eas credentials -p ios
eas credentials -p android
eas workflow:run .eas/workflows/internal-store-testing.yml
```

The last command is a **manual, consequential release action**. Run it only with explicit test-release authorization and a passing preflight. The workflow builds **store-signed** iOS `.ipa` and Android `.aab`; its submission targets are *TestFlight* and *Google Play internal*, not public tracks. If a workflow or credentials step fails, stop and inspect that job; do not retry paid/financial workflows or change UI assets.

## Required observed evidence to mark this phase complete

- Expo build ID, git SHA, version/build number, `distribution=store`, platform and build status for each artifact.
- Apple App Store Connect/TestFlight build processing success, appropriate internal group and a tester install on a physical iPhone.
- Google Play Internal track build processing success, tester link and real Android install with live Google Maps tiles.
- Clerk sign-in/sign-out, tenant isolation, map/foreground location, API data, offline/permission handling and crash monitoring gate (where enabled) checked on both devices with synthetic/test accounts.
- Record rollback: revoke/unassign internal build; submit a newly signed version for app-code defects; do not force OTA updates into mismatched native runtimes.

## Actual current outcome

The EAS project, approved store icon, public mobile build configuration and internal testing workflow are in place. Public store policy/support links were reachable on the date above. **No Apple/Google corporate team, signed native release artifacts, store submission or device installation has been verified.** Public app-store release is a separate later decision.
