TRVLSPORT Developers
Only the current contract is available.

Contract v1 · generated reference

RuntimeHandler.holdsExpirySweep

OP-RUNTIME-HOLDS-EXPIRY-SWEEP is a scheduled operation owned by Traveler.

Back to the complete API catalogue

Authority and transport

Actor
Firebase scheduler
Authentication
platform invocation
Authorization
platform-only
Resource boundary
server-derived from verified payload and stored state
Transport
SCHEDULED
Deployed export
holdsExpirySweep
App Check
NOT_APPLICABLE
Canonical source
functions/src/properties/traveler/payments/scheduled.ts

Request schema

This operation accepts no client-supplied request parameters. Its managed platform trigger and recovery behavior are documented below.

Response schema

Promise<void> managed scheduler acknowledgement

States, consistency and recovery

State path
SCHEDULED → BOUNDED_STALE_HOLD_SCAN → PER_HOLD_TRANSACTION → CAPACITY_RELEASED_OR_NOOP → PLATFORM_RETRY
Reads
at most 200 active expired holds plus authoritative inventory
Writes
per-hold expiry and capacity release transaction
Transaction
one Firestore transaction per stale hold so one poisoned row cannot block the sweep
Idempotency
safe bounded rerun over current authoritative state
Concurrency
fresh state is re-read before each governed write
Retry/replay
Firebase scheduler retryCount is 3; subsequent schedules also converge state
Rate limits
Managed schedule only; there is no public caller quota.
Audit
bounded count/failure telemetry without customer or payment payloads

Error contract

No public error envelope; a thrown execution failure is governed by the scheduler's configured retry policy. Never treat an unknown error as success.

No public error code is exposed by this managed trigger.

Producer test references

Evidence tier: SEMANTIC_CORE_REFERENCE.

Reviewer-mapped semantic/core references

  • packages/backend-firebase/test/operation-contracts.test.mjs

Protocol or inventory references

  • packages/backend-firebase/test/operation-contract-detector.mjs

These references prove export, wrapper or protocol behavior only. They are not counted as complete operation semantics.

Example availability

NOT_PUBLIC_TRANSPORT: This handler is provider- or platform-invoked and has no public client invocation.

Common integration contract

Sandbox and Production are isolated

Run examples only in a governed sandbox or local emulator. Sandbox identities, App Check tokens, payment fixtures and data do not grant Production access. The typed ports do not ratify a public numeric quota; enforcement may be stricter. Honor RATE_LIMITED and the server's retry-after value.

Authentication and authorization

Firebase Auth proves identity. App Check proves the approved app where a callable requires it. Roles, organization membership, requester identity and resource ownership are derived and rechecked by the server.

Authentication guide

Errors and recovery

Stable error codes distinguish validation, denial, conflict, expiry, authority pending, rate limiting and temporary unavailability. Never infer success from an HTTP redirect or a browser state.

Error catalogue

Idempotency, concurrency and retry

Reuse an idempotency key only for an identical retry. A new intent needs a new key. Preserve version preconditions and reload after a conflict.

Retry guidance

Changes and escalation

Check compatibility before adopting a new contract version. Review the changelog, service status and support guidance before retrying a persistent failure.

Common failure families
FamilyClient decision
Authentication / authorizationRefresh or step up only when instructed; do not retry a denial unchanged.
Validation / conflict / expiryCorrect or reload state, then obtain confirmation for a new intent.
Rate limited / unavailableHonor retry-after and use bounded backoff; inspect service status.
Unknown / serverFail closed and escalate with a privacy-safe correlation id.

Executable network examples are published only when the exact wire schema is producer-proven. Check the selected operation's example-availability status; an unresolved schema is a release blocker, not permission to guess.

Verified examples and local-only recovery snippets