Core Reliability Contract
Status
onestep core provides an at-least-once async task runtime. It is intended to be stable for application code and connector plugins, but only the APIs listed in this document should be treated as compatibility commitments.
Stable Application API
OneStepAppTaskContextSource,Sink,DeliveryEnvelopeMemoryQueue,IntervalSource,CronSource,WebhookSource,HttpSinkNoRetry,MaxAttempts,RetryPolicy,RetryAction,RetryDecisionTaskEvent,TaskEventKind,InMemoryMetrics,StructuredEventLogger
Application code may import these names from onestep.
Stable Plugin API
ResourceRegistryResourceSpecHandlerResourceBuildContextResourceValidationContextregister_resource_typeload_resource_pluginsConnectorOperationError,ConnectorOperation,ConnectorErrorKind
Connector packages may rely on these names when implementing resource handlers or normalizing backend failures.
Operational API
ControlPlaneReporterwhenonestep[control-plane]is installedControlPlaneReporterConfigwhenonestep[control-plane]is installed- identity helpers exported from
onestep - low-level WebSocket transport classes when
onestep[control-plane]is installed
These APIs are supported for operational integration, but changes may require coordination with onestep-control-plane.
Internal API
Anything not listed above should be treated as internal even when it can be imported by module path.
Delivery Semantics
onestep is at-least-once. It does not provide exactly-once delivery.
For a successful delivery, the runtime:
- calls
delivery.start_processing() - invokes the task handler
- runs success hooks
- sends the handler result to selected sinks
- calls
delivery.ack() - emits a success event
Because sink sends happen before ack(), a process crash or ack() failure after a successful sink send can produce duplicate downstream output. Production handlers and sinks should be idempotent when duplicate output matters.
Multi-sink fan-out is not transactional. If an earlier sink succeeds and a later sink fails, the earlier send is not rolled back. A retry may send to the earlier sink again.
Failure Semantics
- Handler, predicate, hook, sink, and timeout failures enter the task retry/dead-letter path.
- Retry policies decide whether the delivery is retried or failed.
- Dead-letter publish failure retries the original delivery.
- Delivery
fail()failure falls back to retrying the original delivery. - Cancellation retries the delivery.
Stop Controls
drainstops new fetches and waits for inflight deliveries to finish.pause_taskstops new fetches for one task and waits for that task's inflight deliveries.resume_tasklets a paused task fetch again.- Shutdown waits for inflight work up to
shutdown_timeout_s. - Sources that cannot safely cancel a fetch should set
fetch_is_cancel_safe = Falseand implementrelease_unstarted()on deliveries that have been claimed but not processed.
YAML And Resource Contracts
- Strict YAML mode rejects unknown fields.
- Resource handlers own strict field validation for plugin resource types.
app.strict_envcatches missing environment variables without defaults.- YAML remains a wiring layer, not a workflow DSL.
- Plugin resources register through the
onestep.resourcesentry point group.
Local Reliability Verification
Run core non-integration tests plus every plugin suite in isolated pytest processes:
./scripts/run-reliability-checks.shThis avoids pytest module-name collisions between plugin test suites while preserving the same coverage expected from local core changes.
Release Checklist
Before releasing core, answer:
- Does this change affect stable application APIs?
- Does this change affect stable plugin APIs?
- Does this change alter delivery, retry, dead-letter, drain, pause, resume, shutdown, or cancellation semantics?
- Does this change alter reporter payloads, topology fields, task lifecycle events, runtime identity, remote-control behavior, or WebSocket protocol behavior?
- Do any plugins need a lower-bound dependency update such as
onestep>=<new-version>? - Does
CHANGELOG.mddescribe the user-visible behavior and compatibility impact? - Does
onestep-control-planeneed coordination?