Collections · salesforce · mobile16 Nov 2026 · staging

Read once.
Serve from Postgres.

A resident's residence stage used to cost one live Salesforce call on every screen. Salesforce changes now arrive as events, are stored once, and are served from Postgres.

Property opens that failed13 Nov QA load testmeasured
At 100 users, 30.3% of property opens returned 503 connector_unavailable, 30× the 1% error budget.
Users one connector box carries modelled
217→8824.1×
8 query workers, about 1 s per Salesforce read
Salesforce reads a second at 10,000 modelled
369→91−75%
Peak 711 → 175. 278 reads a second removed
Stage reads sent to Salesforce by design
100%→0%
While that box's feed is running
Share of the 10,000 target modelled
2.2%→8.8%
91.2% still to go. Next limit: other live reads
WhyQA load test · 13 Nov · 9 resident journeys · 1 to 200 users

Residents hit the live read.

Every resident journey that opens a residence read its stage from Salesforce, live, through one connector box. That box answers about 8 reads a second.

Errors that were live Salesforce reads measured
84.6%
15,934 of 18,824 errors across the batch
Removed by stored readiness measured
43.4%
8,173 errors were the stage read itself
Journeys that passed at 200 users measured
0 of 9
Handover booking was stopped at 100 and not run at 200
What a resident sawerror share and slowest 5% of requestsmeasured
Handover · owner
Books the key handover appointment.
38.9%requests failed at 100 users
Run stopped at 100. Not run at 200.
Portfolio · every resident
Opens the app and sees their residences.
7.2 sp95 at 200 users
4.8× the 1.5 s budget · 20.6% failed
Construction · owner
Follows progress, photos and payments.
40.5%requests failed at 200 users
From 0% at 50 users
Resident journeys against the service levelsp95 response per cell · error rate when above 1% · colour is the verdict PassWarnFailStoppedReads stage
Service levels: p95 ≤ 1,500 ms, p99 ≤ 3,000 ms, errors ≤ 1%, Apdex ≥ 0.85. A blue dot marks the six journeys that read the residence stage.
Errors by causecount per user level Stage readOther live readsRate limitTimeout
30-minute soak at 25 users13 Nov, 18,865 requestsFail · 4 of 4 checks
Even at 25 users, every check missed. 212 of the 420 503s were the stage read.
Where the 18,824 errors gowhat this change fixes, and what it leaves
Howsalesforce 4f2fdee · collections 775c354 · mobile 499aadc

One event, stored once, read many times.

Salesforce changes flow left to right and are written once. Resident reads flow right to left and stop at Postgres. The grey path is the old live read, kept as a fallback.

Readiness, end to end New stored pathLive fallbackSent, never received
SALESFORCE CONNECTOR BOX · PER ORG PLATFORM API · WORKERS + POSTGRES MOBILE APP WRITE PATH · WHEN SALESFORCE CHANGES READ PATH · WHEN A RESIDENT OPENS A SCREEN Salesforce orgs corven-ai · 6 objects omniyat-ai · 1 object Status__c · holders CDC slots 5 / 5 used 2 objects sweep only 25,000 events / day cap Readiness engine sweep every 15 s lookback 5 min · walk 24 h retry ×3 · 100 targets / pass heartbeat on every pass event_id = sha256(state) same state, same id CDC push sweep 1 Ingest dedupe by event_id newer source_modstamp wins signed WS ≤ 10 s ack 2 Postgres app.readinesses box cursors = heartbeat outbox · deferred refresh 1 transaction 3 notice No listener /session/changes 0 subscribers in the app 6 Read router flags: live → shadow → stored per box: stored only if feed runs heartbeat under 600 s 3 DB statements · 0 Salesforce calls reads stored row 5 Live read 16 in flight · 8 waiting ≈ 1 s each · 8 reads / s 5 s budget, 1 retry Salesforce SOQL per request 369 reads / s at 10k QA mean 863 ms fallback query Used when a box's feed is off, filling or stopped, for any write request, and for a unit with no stored row. GET /properties list · polled every 60 s GET /properties/{id} stage · shared for 5 s 5 navigators gated on stage, 1 of 5 values zod schema, hand-written GET stage 4
1A change reaches the connector
≤ 15 s by sweep, seconds by CDC

The engine computes each holder's readiness and publishes only a changed state.

3The platform stores it once
1 txn row, notice, refresh task

Duplicates are acknowledged and dropped. An older state never overwrites a newer one.

5A resident reads Postgres
0 calls to Salesforce per stage read

Before, every stage read was a live Salesforce read of about 1 s, queued behind 16 others.

Feedper box, decided on every read

Stored only while the feed is alive.

The platform serves a box's stored copy only after its backfill finished and its heartbeat is fresh. Anything else falls back to Salesforce, so a dead feed costs speed, not correctness.

Feed state per boxfrom code
off filling running stopped sweep > 0 backfill done no heartbeat 600 s heartbeat returns Salesforce Salesforce Postgres Salesforce serves ↑
A stopped box logs connector_readiness_feed_stopped. Shadow mode logs connector_readiness_copy_mismatched and corrects the row.
Where each environment standsfrom config
Environment · boxSweepPub/SubFlagsServes stage from
Staging · corven-ai15 sonshadow + storedPostgres if running
Staging · omniyat-ai15 sonshadow + storedPostgres if running
Productionnoneno box configunsetSalesforce, live
Shipped in api-v0.3.166 and connector-v0.26.0, staging only. Production has no readiness box config in the repository.
Every timer on the pathlog scale, 1 second to 7 days ConnectorPlatformMobile
The platform waits 600 s for a heartbeat that the connector writes on every 15 s pass. That is 40× headroom before a box falls back to Salesforce.
Contracts4 boundaries · 3 repositories

Who promises what.

Each boundary names its producer, its consumer, the shape on the wire and what keeps the two sides in step. Two of the four have no enforced guard.

SalesforceCDC push and SOQL sweep→ Connector engine5 of 5 CDC slots used
corven-ai Property__c · Customer_Investment__c · Relationship__c · Resident__c · Account · User
omniyat-ai SalesOrder__c on channel OMNIYAT_Invitation__chn
ready_for_viewing = Status__c is "Ready for Viewing"
Objects swept6 + 1
CDC topics3
Sweep-only objects2
Guardfake-org SOQL
Connectorsigned WebSocket, one slot per box→ Platform ingestgolden files
prehandover.readiness.changed.v1 · schema 1.0.0
envelope: event_id, correlation_id, causation_id, occurred_at, source_id, property_id, person{ref, locator}, replayed
payload: property_status, investment_status, ready_for_viewing, manager | null, holds, source_modstamp
Golden files5
Ack timeout10 s
Parked after12 refusals
SignatureEd25519
Platform APIHTTPS, OpenAPI properties.yaml→ Mobile readsguard is advisory
GET /api/v1/properties → {properties: [{id, label, stage, isPrimary, building}]}
GET /api/v1/properties/{id} → the same property
stage ∈ construction · pre_handover · handover · post_handover · living
503 connector_unavailable · Retry-After 3 · Cache-Control private, no-store
Readiness fields exposed0
Stage values5
Error codes mobile knows5 of ~45
Contract lockapi-v0.3.163
Platform eventsWebSocket or poll, per session→ Mobile change listenerno consumer
property.readiness_changed → resource.changed notice
GET /session/changes (WebSocket) · /session/changes/poll (last-event-id)
Meant to tell the app to read a residence again. The mobile app has no client for either path.
Notices sentevery change
Mobile listeners0
Push sentnone
Fallback60 s list poll
Mobile2 reads · 31 call sites · 5 gated navigators

The app reads stage, nothing else.

Mobile never sees readiness fields. It reads one value, stage, and routes the resident to the right part of the app from it.

2
API reads carry everything
/properties · /properties/{id}
31
places read the list
useRouteResidence
5
navigators gate on stage
ResidencePhaseGate
5 s
one stage read shared
mobile #373 · not in a build yet
60 s
list poll in the foreground
refetchInterval 60_000
0
timeout on property reads
plain fetch, no abort
7 days
reads persisted on device
queryCache
0
retries on 503 connector
shows Retry button instead
A stage change during a sessionwhat the resident sees, second by secondfrom code
The 60 s poll refreshes the list only. The stage the gates use has no interval, so the resident stays on the old stage until the app regains focus, a notification is tapped, or a 409 forces a reload.
Risks and gapsbusiness impact first

What can still go wrong.

Ordered by severity. Each card states the number behind it, what it means for the business, and where the evidence lives.

Nexteach step has a measurable exit

From staging to 10,000 residents.

Prove the gain first, close the contract gaps second, then take it to production.