OrbitSpaceDocs
Developer guides

Production integration and recovery

A successful request validates connectivity. Production also requires business ownership, durable jobs, idempotent recovery, event handling, usage control and observability.

Persist the business job

Store your job ID and owner/customer, allowed service ID, request digest, idempotency key, Invocation/Goal ID, observed state version and accepted result. Keep access tokens, capability URLs and Secret values out of job rows.

Authorize the user, persist submission intent, call the platform, save its ID, then observe. Recover lost responses with the original key/input; recover process restarts by reading the recorded platform resource.

HTTP error policy

Native HTTP APIs use RFC 9457 Problem Details with code and request_id extensions. Make decisions from status/code, not by parsing human-readable detail.

HTTPAction
400Correct fields, schema, cursor or parameters
401Check credentials, expiry and audience; renew through the supported flow
403Correct scope/project/resource authorization
404Missing or invisible resource; do not infer cross-tenant existence
409Reload versions or the original idempotent result
429Respect Retry-After and distinguish rate, concurrency and usage limits
5xx/network failureBounded GET retries; recover submissions with their original key/input

Stopping observation and cancelling execution are different product actions. An HTTP timeout does not prove that work was not accepted.

Tenant and application quotas

Permissions, tenant quota, application quota, service concurrency and Runtime capacity intersect. Application registration does not grant unlimited inference. Administrators can bound admissions, active concurrency, tokens, cost and compute.

text
GET /api/v1/integration-clients/{id}/quota/status
GET /api/v1/usage/quota/status
GET /api/v1/application-metrics

These endpoints require their own authority. Do not issue management credentials to an end user just to show progress. Customer billing needs an explicit pricing contract rather than a guess from token counts.

Token and cache semantics

Invocation usage includes input/output tokens, cache reads/writes, reporting flags, model-cost microunits, compute milliseconds and elapsed time. cache_read_reported/cache_write_reported distinguish an authoritative zero from missing reporting.

REST int64 fields are decimal strings. Use safe decimal/BigInt handling and the configured currency/unit. Do not unconditionally add cache hits to input totals again or rebill parent aggregate usage as another execution.

Event handling and observability

Use SSE for current execution, JSON event pages for history and signed Webhooks for backend updates. Log business and platform correlation IDs plus bounded error codes. Keep raw Provider data, chain of thought, credentials and capability URLs out of ordinary logs.

Monitor duplicate processing, consumer failures and stream reconnection separately. Validate fields; do not inject arbitrary tool output as HTML or execute returned commands automatically.

Acceptance before launch

TestRequired behavior
Duplicate submissionOne idempotent logical execution
Accepted request, lost responseRecover with the original key
SSE/process restartReload snapshot and backfill business history
Duplicate/out-of-order WebhookNo duplicate business effects or state regression
Credential expiry/revocationExplicit failure and closed unauthorized access
Approval/input waitSupported interaction path, not an infinite loop
Quota exhaustion/Host lossAccurate reason; queued is not running
Interrupted/invalid downloadFail and remove this incomplete transfer
Uncertain external effectReconcile before retrying

Use an isolated project and test identity. Documentation contract tests do not replace qualification of your actual service, model route, domain tools and network.