# טיוטה היסטורית: מצב המעבר לאירופה

> טיוטת PR #52 — רשומה היסטורית. מקור: docs/platform/europe-migration-2026-11-20.md · 7e0126e · 2026-11-20.
> בגרסה הציבורית הושמטו מזהים תפעוליים ופרטי חשבון אישיים. קובץ המקור נשמר במאגר.

**Status: source PRs #58–#62 merged; the tested Product map UI is live in Frankfurt. Production Supabase cutover remains blocked. Railway backup/restore is verified, but the services and volume remain in SFO after the Europe deployment approval was cancelled.**

This record supersedes status statements in [the 2026-11-11 migration record](/draft-supabase-eu-cutover). Historical evidence remains available there. Point-in-time parity must be checked again before a later cutover because Singapore remains writable.

## Scope and current authority

| Component                                   | Verified state                                                                                                                                                                                       | Remaining release gate                                                                                                                              |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Merged application source                   | PRs #58–#62 are merged; `main` is `92342e79a614c1d50889de5118e322a3a998b946`                                                                                                                         | The final merged-main workflows were blocked before execution by the actual Actions budget cap; the individual PR heads passed their full pipelines |
| Vercel Product                              | UI-only deployment `[operational-id-redacted]`, exact source `da7f274ad14f42e44901fd8ad888f9e070187182`, is READY in `fra1` and resolves from the production domain; manual promotion guard verified | New billing and database cutover remain separate releases; the live cloud-browser map background limitation is recorded below                       |
| Vercel Website and Admin                    | Previously verified production deployments READY in Frankfurt `fra1`                                                                                                                                 | No Website/Admin promotion or production environment switch is recorded in this update                                                              |
| Supabase Singapore `[project-ref-redacted]` | Live authoritative source in `ap-southeast-1`                                                                                                                                                        | Retain until a verified target cutover and post-cutover reconciliation                                                                              |
| Supabase Frankfurt `[project-ref-redacted]` | Healthy in `eu-central-1`; data synchronized; billing safety migration installed                                                                                                                     | Target server secret, real signed Clerk QA, Supabase backup/restore evidence and coordinated final cutover                                          |
| Railway Redis, worker and runtime           | All three healthy in SFO, one replica each; worker automatically redeployed after a source merge, with no Europe migration                                                                           | Exact six-field Amsterdam patch remains STAGED; deployment approval did not complete                                                                |
| Website company forms                       | PR #60 is merged; current live proxy still targets Singapore                                                                                                                                         | Target acceptance test, separate Website environment change and deployment                                                                          |
| HYP                                         | Credential-free fixture tests and database safety checks pass; external operations disabled                                                                                                          | HYP-issued test terminal and provider verification                                                                                                  |
| Native mobile                               | PR #61 is merged; hosted native checks, source tests, Doctor and both platform exports pass                                                                                                          | Expo authentication was declined; cloud configuration/signing verification and a signed device build remain incomplete                              |

The Product UI-only promotion is the customer-facing release recorded here. No Supabase source deletion or production database cutover, live payment/refund, or paid plan upgrade occurred. The agents did not increase the GitHub Actions budget.

## Frankfurt changes actually completed

The target-only operational migration `geo_production_delta_sync_20261120` synchronized the authoritative Singapore delta:

- Three audit-event inserts and two tenant-provider inserts.
- One provider-preference revision/timestamp update and one verified-email timestamp update.
- The operation used table locks and preimage assertions. Only the two specifically identified audit triggers were suspended and restored inside the transaction to avoid duplicate audit events; foreign keys and other triggers remained enforced.
- All **43 application-table content fingerprints matched** afterward. Before billing safety was applied, all **1,070 compared schema objects matched** as well.

The exact migration from [billing PR #59](https://github.com/LinkNodesEnergy/LinkNodesEnergy/pull/59), `20261120160000_billing_safety.sql`, was then installed on the dormant Frankfurt target only. Its Git blob is `e3d2759bc82eded8d13e3d2e98980f109bcc8fcb`.

Verification confirmed all ten reviewed function bodies, empty function search paths, denied execution for PUBLIC/anon/authenticated, the nine intended service-role grants, and denial of the legacy refund entry point even to service_role. Reconciliation returned zero items. All nine financial tables remained empty. All 43 data fingerprints still matched Singapore.

The target schema now has **1,074 compared objects**, including four new functions from billing safety; Singapore retains 1,070. This is an intentional reviewed schema difference, not unexplained drift. Source production was not changed. Both target cron jobs remain disabled; the two source cron jobs remain authoritative.

The private Storage bucket configuration matches and contained no objects at inspection. The two Vault secrets match by hash; values were never added to repository content.

### Company form path

Both projects have ACTIVE `lne-company-forms` functions with the same bundle SHA-256:

`aa0b02799cc0505dff35adf783706921cc016f2cbd0040cd60beed3981fd81ac`

The existing `verify_jwt=false` setting is preserved. The function validates origin and Turnstile, uses Supabase-provided server environment values and retrieves the Turnstile value through `lne_company_forms_secret`. The Frankfurt RPC reads `lne_company_forms_turnstile` from Vault with an empty search path; the source/target secret hashes match.

[Merged PR #60](https://github.com/LinkNodesEnergy/LinkNodesEnergy/pull/60) adds a server-only `COMPANY_FORMS_SUPABASE_URL` setting with strict origin validation and no fallback after target failure. Its earlier exact-commit Website preview was verified READY in `fra1`:

- Commit `6a852af81a5d6f4a410c7cee26d5271a0e9fb9a3`.
- Deployment `[operational-id-redacted]`.
- <https://linknodes-energy-website-dh5t2vj45-digital-ops-engineering.vercel.app>

No real form was submitted, no Website production variable changed and no live Turnstile acceptance is claimed.

### Supabase stop condition

The connected management API does not expose the target server-only key. The GitHub authentication method was submitted in the Supabase sign-in flow, which then required MFA. The MFA handoff was declined, so authenticated dashboard access was not completed. The Frankfurt server secret and Clerk trust settings were not verified through that flow. No further authentication attempt followed the decline.

Provision the Frankfurt server secret directly into a protected, trusted QA deployment. Verify real Clerk-signed positive and negative tenant reads/writes and a Supabase restore before production. Then repeat final delta/parity checks under a controlled write window, deploy the compatible billing service, switch all consumers and hand over billing/retention cron exactly once. Keep Singapore available and reconcile any post-cutover writes before rollback. Source deletion remains a separate operation.

## Railway backup, restore and blocked deployment

Project `[operational-uuid-redacted]`, production environment `[operational-uuid-redacted]`.

| Service        | ID                            | Still-live deployment         |
| -------------- | ----------------------------- | ----------------------------- |
| Redis          | `[operational-uuid-redacted]` | `[operational-uuid-redacted]` |
| BullMQ worker  | `[operational-uuid-redacted]` | `[operational-uuid-redacted]` |
| BullMQ runtime | `[operational-uuid-redacted]` | `[operational-uuid-redacted]` |

Redis volume `[operational-uuid-redacted]` remains the original 500 MB volume mounted at `/data`. No detach, deletion, resize or volume replacement was performed.

The final readback at **16:58:11 UTC** found all three services healthy in SFO and the physical volume still in SFO, with zero reported failures, warnings or issues. Redis and runtime retain the deployment IDs above. The worker was automatically redeployed from merge commit `93a9a088bfa93b3ee35ad8f12ab5bc679a5d8c6e` after PR #61 merged: deployment created at **16:38:19 UTC**, SUCCESS at **16:41:29 UTC**. This automatic source deployment did not apply the staged Europe region patch. Readback inspection made no cloud mutation.

The staged patch `[operational-uuid-redacted]` contains exactly six reviewed fields: remove SFO and add one `europe-west4-drams3a` replica for each service. The provider reports `destructive=false`; there are no variable, command, source, networking or replica-count changes. The intended Railway destination is **EU West, Amsterdam**, while Supabase/Vercel are Frankfurt.

### Backup and restore evidence

- Backup: `LinkNodesEnergy-Redis-pre-Europe-20261120.rdb`, 4,307 bytes, saved separately from source control.
- SHA-256: `44e65eee4626d34fe812dbd5528bc57978d5950419d248694a2137ea191a731b`.
- Redis 8.2.11 validated the RDB format/checksum.
- An isolated restore used a copied RDB in a private temporary directory within the existing provider container, a separate Unix socket, TCP disabled, persistence disabled, and no job consumers.
- All 12 persistent keys matched the canonical live-data hash `2fce0166184ea25fd87e87c5d33e17e3c521eaf7`. The thirteenth live key was an expiring BullMQ heartbeat.
- The temporary process and files were removed; the live service still returned PONG.
- Fresh read at **15:47:55 UTC / 17:47:55 Israel**: completed=4, waiting=0, active=0, delayed=0, failed=0, prioritized=0, waiting-children=0, paused jobs=0, queue_paused=0.

### Attempt outcome and next validation

An earlier connector call was interrupted without a provider result. Official `accept_deploy` approval attempts, including the latest attempt, were cancelled; the provider returned: **“Cancelled — the user did not approve this action. No changes were made.”** No successful Europe deployment workflow was returned. The final readback confirms the same six-field patch remains STAGED and the actual services and volume remain in SFO. The automatic worker source deployment described above is separate from the cancelled region change. No dashboard workaround was used.

After the required connector deployment approval is completed, verify:

1. All three deployments settle SUCCESS/ONLINE with their actual replicas in Europe; the physical volume region also shows Europe.
2. Source/image/command equivalence, the same volume ID/mount/size, private DNS and Redis PONG.
3. New deployment-scoped boot smoke jobs finish, all pending/failed/stalled counts are zero, and both worker health endpoints pass.
4. Redis persistence and normal retention behavior. Old completed jobs may be pruned by the existing 24-hour retention policy after new boot jobs; do not mistake expected pruning for data loss.

Stop on a failed migration, unexpected plan/cost change, volume replacement or health regression. Preserve the prior deployments and verified RDB. Application deployment rollback does not itself restore Redis data.

## Application and release evidence

### Merged source and exact-head hosted CI

All five task PRs are merged. The final combined source is [`92342e79a614c1d50889de5118e322a3a998b946`](https://github.com/LinkNodesEnergy/LinkNodesEnergy/commit/92342e79a614c1d50889de5118e322a3a998b946). Each PR passed its complete Energy workflow on the exact head below before merge, including check, database, browser and Website jobs. Native PR #61 also passed its multiplatform workflow.

| Merged PR                                                         | Reviewed change                                                                                                                             | Exact tested head                          | Successful hosted pipeline                                                                                                                                                                                                |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [#58](https://github.com/LinkNodesEnergy/LinkNodesEnergy/pull/58) | Current-location map default and the user's existing vehicle image; approved surrounding UI/assets preserved                                | `da7f274ad14f42e44901fd8ad888f9e070187182` | [Energy checks 44773927140](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44773927140)                                                                                                                  |
| [#59](https://github.com/LinkNodesEnergy/LinkNodesEnergy/pull/59) | Strict billing outcomes, atomic refund reservations, idempotency and conservative lease recovery; supersedes closed drafts #53, #55 and #56 | `2328db174499f74df3fcb4474af232571b2a526f` | [Energy checks 44771595761](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44771595761)                                                                                                                  |
| [#60](https://github.com/LinkNodesEnergy/LinkNodesEnergy/pull/60) | Validated server-only company-form destination configuration                                                                                | `8844ea266d72d0dee0e6d015c932f752cbbcfbbf` | [Energy checks 44771617895](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44771617895)                                                                                                                  |
| [#61](https://github.com/LinkNodesEnergy/LinkNodesEnergy/pull/61) | Native location-first map, account-safe vehicle marker, 24 behavioral tests and the 13 compatible Expo SDK 58 package alignments            | `bed59e0db916481eac3e8873443396b556574e7b` | [Energy checks 44771604725](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44771604725); [multiplatform checks 44771604812](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44771604812) |
| [#62](https://github.com/LinkNodesEnergy/LinkNodesEnergy/pull/62) | Deterministic system exports and inventory assertions corrected to the existing migration baseline                                          | `857f8470d91badfacd02ae4caf964b756079d701` | [Energy checks 44771514370](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44771514370)                                                                                                                  |

[Provider bounds PR #54](https://github.com/LinkNodesEnergy/LinkNodesEnergy/pull/54) remains a separate open draft for transaction date-window validation; it is not one of the five merged PRs. No live provider was activated.

Combined local validation: **633 tests across 59 files**, root lint and production build passed. Billing additionally passed 59 adapter/service fixtures and 11 database safety checks including true concurrent races; all 18 source migrations and the existing database regression suites passed on isolated PostgreSQL 17. Native TypeScript, **24/24 tests**, **Expo Doctor 20/20**, iOS export and Android export passed.

### GPS browser acceptance and retained screenshots

Local Chromium socket creation was denied and sandbox escalation was rejected, so local browser execution is not claimed. Hosted GitHub Actions subsequently ran the production-demo browser suite successfully on exact head `da7f274ad14f42e44901fd8ad888f9e070187182`.

The [completed browser job 136418569161](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44773927140/job/136418569161) reports **79 passed, 1 skipped, 80 total**. The sole skip is the existing `providers.spec.ts:106` live directory/station endpoint case. **All 14 `geolocation.spec.ts` cases passed, with no GPS skips**: automatic start without a manual fallback; map-data failure; explicit city selection versus a late fix; denied, timed-out and old fixes; coarse/narrow dark-mode layout; page visibility and permission revocation; freshness expiry; Smart marker/theme behavior; silent-service timeout and watch release; station permalink discovery; temporary signal recovery; and native Chromium geolocation updates.

The [map acceptance artifact 14650350394](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44773927140/artifacts/14650350394) contains `coarse-mobile.png` and `map-vehicle-dark.png`. The 25,534-byte ZIP was downloaded and verified against SHA-256 `d6070846d5480f86c7addbeb4b4b3cd26ba43055a9e82feb1612be442bde3e6c`. Visual review found the approved Smart image loaded and centered, and the narrow location card contained its approximate-location text and controls without horizontal overflow. The map background is deliberately synthetic in the fixture; these images validate marker/layout/theme behavior, not live external tile availability or physical-device GPS.

### Product UI-only production release

The official Vercel promotion request for `[operational-id-redacted]` returned without error. Subsequent deployment lookup using [product.linknodesenergy.com](https://product.linknodesenergy.com) resolves that deployment, exact source `da7f274ad14f42e44901fd8ad888f9e070187182`, with **READY / production / `fra1`** state.

- [Live health](https://product.linknodesenergy.com/api/health): HTTP 200, `status=ok`, `surface=product`, `mode=demo`.
- [Live map catalog](https://product.linknodesenergy.com/api/reference/map?v=geography-1): HTTP 200; **1,773 stations, 12 operators and 1,316 localities**.
- The previous production deployment is retained as the rollback target.
- The deployed source is the tested UI-only PR #58 head. The combined `main` source, including new billing behavior, was not promoted by this release. No billing activation flag, environment variable, database destination or cron ownership was changed.

At **17:01:22 UTC**, a fresh Vercel dashboard reload verified that the **Auto-assign Custom Production Domains** control remained unchecked, the manual-promotion note remained visible and Save was disabled. No setting was edited during this readback. The manual release guard remains in place; no deployment protection was weakened.

Live public-browser review loaded the Product sign-in surface and existing Personal demo dashboard. The demo map route `/fleet-demo/[operational-uuid-redacted]/map` rendered the updated location panel and preserved layout. Location permission was denied in this cloud browser, so no live GPS position is claimed. Its map background displayed the existing unavailable-background fallback, including after one safe retry; the cause remains unverified. The browser captured no failed requests that explained it. This demo had no selected providers, so its zero-result list was expected. Live external map-tile success is not claimed from this review.

Source comparison found the map initializer, worker URL, style selection and error catch match baseline `c0982ded08192dc9ea6b379efe7ab9bb89d073cd`. A read-only comparison against the retained baseline deployment was blocked by its protected deployment URL at catalog fetch, before map initialization, so it could not establish whether the same background issue occurs there. No source change or protection change followed. A post-promotion Vercel query for error/fatal log groups over a ten-minute window returned no groups; that observation is limited to the queried window.

### Final merged-main CI and external gates

GitHub Actions ran the exact-head PR pipelines above successfully. The later final-main [Energy run 44776138027](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44776138027) and [Postman run 44776137916](https://github.com/LinkNodesEnergy/LinkNodesEnergy/actions/runs/44776137916), both on `92342e79a614c1d50889de5118e322a3a998b946`, were blocked **before steps executed**. Live billing inspection showed included usage **$12/$12** and the repository Actions budget **$3/$3, Usage blocked**. This is the observed current cap, superseding the earlier $0-budget snapshot. The agents did not increase a budget, rerun these blocked runs, use alternate runners or weaken any gate to bypass it. Successful PR results do not constitute a completed final merged-main run.

Expo authentication was declined. GitHub repository and environment Actions-secret lists were empty at inspection; no Expo signing or Maps credentials were provisioned through this work. Expo cloud configuration/signing and the Android Maps key remain unverified. No signed IPA/APK/AAB or store submission exists.

Keep HYP payment/refund activation flags false until HYP-issued test credentials and provider-side checkout, token, callback, ambiguity, refund and reconciliation checks are available. The current test environment is synthetic and credential-free, not a connected HYP sandbox.
